Merging files in emacs
I used the emacs merge function for, weirdly, the first time today. It is fabulous. You start it by typing
and it prompts for the two file names, it afterwards refers to these as A and B. It gives a split window with the two parent files on the top and the merged file at the bottom. The merged file is initially equal to A. You move from difference to difference using
C-c C-c n for forward and C-c C-c p for back.
The difference is marked out in all three windows and you type
C-c C-c b
to change to the B version, or
C-c C-c a
to go back to the A version. If you want to make further changes you need to enter edit mode, using
C-c C-c e
The buffer containing the merged file can be saved in the usual way. The only thing I disliked about it was that the keystrokes, with their C-c C-c prefixes, were longer than need be.