Fossil Forum
Post: Emacs hangs trying to process fossil merge markers.
Hi all:
In v2.26 the merge markers were updated to include a new recommended section as well as the local, remote and ancestor segments. This is apparently giving emacs heartburn under some circumstances.
I think it could be the emerge package trying to parse the markers and going off the deep end (90% cpu use, editor hung trying to read the file that shows as conflicted in vc-fossil display).
This is the first time I have had this issue. I'm not quite sure what triggered emacs to go off the deep end this time. It has handled the standard 2.26 merge markers without issue before.
After I used vi to edit the file and resolve the merge, I could once again load the file into a buffer without hanging emacs.
Is there a flag/setting to do a merge using standard merge markers?
Thanks.
-- rouilj
This is apparently giving emacs heartburn under some circumstances.
Have you got an example we can reproduce this with? Every line of my code is done in emacs and this hasn't yet happened to me.
Is there a flag/setting to do a merge using standard merge markers?
No, but... libfossil's f-merge is stuck in the stone age in that regard so produces the older-style conflict markers.
I just spent 30 minutes trying to reproduce the merge and what I created looked like a successful conflicted merge with the recommended section. Now I can't reproduce the hang.
However I also cleaned out my saved desktop and restarted emacs with no buffers loaded. So I might have destroyed emacs state about the merged file that was causing the issue.
Now that I know it can happen, I'll have a workaround editing outside of emacs or maybe trying emacs -q to see if I can get around the hang.
I had a couple of odd things happening on the system at the same time, so it's not impossible that something else was happening on my computer. But the emacs issue survived a reboot but apparently didn't survive a reboot and wiping stored state.
Thanks for confirming my research that there is no alternate format for recording merge conflicts.
-- rouilj
I just spent 30 minutes trying to reproduce the merge and what I created looked like a successful conflicted merge with the recommended section. Now I can't reproduce the hang.
FWIW, markdown-mode hangs frequently for me in emacs once it has a lot of inlined backtick pieces. Perhaps there's similar parsing quirk in the edit mode you're using. One way to test that: when this happens, switch to fundamental mode. If the lag goes away, the problem is in the editor mode. (That's my (frequent) workaround for markdown-mode on large docs.)
Yup, switching to fundamental mode was my thought after I fired up vim and cleaned the file 8-).
I would have had to use emacs -q first to prevent the buffer from going into it's normal fossil/python mode when touching the file.