Oops, forgot to reply all on my last message. Attached is the patch. On Wed, Nov 4, 2020 at 8:44 PM Stefan Monnier wrote: > > > It looks like I was able to make progress today. Just by modifying > > server.el, I've gotten `emacsclient -ce "..."` to create a new frame > > based on the currently selected frame's terminal when called in a dumb > > terminal. > > Great! > > > Unfortunately, the command for calling ediff is still very > > unpleasant: > > > > emacsclient -ucF "((delete-frame-on-ediff-quit . t))" \ > > -e "(ediff-merge-with-ancestor \"${local}\" \"${other}\" \"${base}\" > > nil \"${output}\")" \ > > -e "(add-hook 'ediff-quit-hook (lambda () (when (frame-parameter nil > > 'delete-frame-on-ediff-quit) (delete-frame))))" > > I think the problem is that emacsclient lacks the equivalent of `-f`, > i.e. calling a particular ELisp function where the remaining arguments > can be consumed by that function. That would solve the problem of > quoting (your above script will stumble when encountering > a file name with quotes in it or with a final backslash). > > > So perhaps introducing a wrapper script for ediff merges would still be useful. > > We should be able to add a convenience `batch-ediff-merge-with-ancestor`. > Bonus points if you manage to make it work with `emacs --batch -f` as > well as with `emacsclient --`. > > > Stefan >