I would like to be able to use ediff with \"git mergetool\".
I found some patches that alter the source code, which I don\'t want to do. Instead, I\'d like to add ed
There is a way to use the ediff-merge-files-with-ancestor function with emacsclient.
The simplest one (for the GNU/Linux user) is to do a shell read from a pipe after the emacsclient call. An hook added in append to ediff-quit-hook (it must be run after ediff-cleanup-mess otherwise ediff session is not terminated properly) will shot a character in the pipe through shell-command.
A more refined one will use a semaphore.
And here arrives the Unix power user.
Then arrives the Emacs Guru (Stefan Monnier) and tells you that you can call
emacsclient --eval '(progn (ediff-merge-files-wit.......) (recursive edit))'
after adding
(throw 'exit )
somewhere at the end of ediff-quit-hook. No named pipe, no semaphores, just Emacs LISP. Simple, elegant and does not require weird tests to avoid using pipes or semaphores when they are not used.
Thank you Stefan!