citizen_418 · 2022-06-28 13:43
Hi, recently I started using org-mode a lot - even running orgzly on my phone and syncing with syncthing.
This however, created a problem - If I modify the org buffer in emacs, don't write it into a file and then also modify the file externally (through syncthing), revert-buffer just asks if I want to throw away changes and reload or not. Few times I also got an option C-r (I believe it was called rebase buffer) that reverted the buffer AND reapplied my changes.
My question is: Do you know how is this C-r option triggered or how I could recreate it? I am looking for a way to do something similar to git rebase: take changes made to a file, update the file to new version and reapply those changes.
globalcandyamnesia · 2022-06-28 16:55
I use `ediff-current-file` to resolve issues created by syncthing. I've never heard of the C-r option but I'm very curious about it.
arthurno1 · 2022-06-28 22:10
> Few times I also got an option C-r (I believe it was called rebase buffer) that reverted the buffer AND reapplied my changes.
> Do you know how is this C-r option triggered or how I could recreate it?
What C-r does depends on how your Emacs is configured. You should be able to check what is bound to C-r with C-h k and than C-r Return. If you haven't rebound C-h k from default.
citizen_418 · 2022-06-28 23:23
Awesome! that seems to do the job
citizen_418 · 2022-06-28 23:26
Apart from evil mode, I have unmodified keybindings. This popped up only on few occasions in context menu: something like "file on disk was modified. Do you want to overwrite it? y/n/q/C-r/C-h" ... might have been r when I think about it though.