Start a new topic

Questions merging/sync conflicts

 Hi,


I do not understand how to solve version conflicts. So, I have beorg with .org files in iCloud and emacs, which has the same files open. Normally, emacs has an option to update the buffer if the file updates - I have found it out.

However, if I change something in emacs buffer (I have not saved it yet) and then I change things in beorg I end up with 2 versions (iCloud and emacs buffer) and in emacs I have only the option to revert to file or overwrite the file with emacs buffer contents. Either way I will loose either buffer or beorg contents. 


How do people handle such situation? I can't imagine I am the first one :)



Emacs does have the ability to diff the open buffer and the file saved on disk. So in the case where you have unsaved changes in Emacs, and have modified the same file in beorg you could run the command diff-buffer-with-file in Emacs and then accept the changes made in beorg to merge them in.


I would be interested to see how other people workaround this - and if they have any suggestions for how beorg could be improved with this use case.

Ah, diff-buffer could do the trick, yes. Meanwhile,  I've found this blog post: https://christiantietze.de/posts/2019/03/sync-emacs-org-files/

Basically, it boils down to activate autosave and auto-revert. I am testing it now, it seems to work reasonably well — apart from the somehow erratic iCloud sync intervals. 

Ah, diff-buffer could do the trick, yes. Meanwhile,  I've found this blog post: https://christiantietze.de/posts/2019/03/sync-emacs-org-files/

Basically, it boils down to activate autosave and auto-revert. I am testing it now, it seems to work reasonably well — apart from the somehow erratic iCloud sync intervals. 

I use the same approach, and works fine for me (in my case with WebDAV). Like mentioned in the article you just have to be careful not to edit too close at same time. Maybe in the future BeOrg could do something like 3-way merge because it has the history of the files that get changed.
Login or Signup to post a comment