[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use emacs as a "diff3 -m" compatible merge tool?

From: Tassilo Horn
Subject: Re: How to use emacs as a "diff3 -m" compatible merge tool?
Date: Mon, 13 Jun 2022 07:21:00 +0200
User-agent: mu4e 1.7.27; emacs 29.0.50

Emanuel Berg <> writes:

Hi Emanuel,

>> And how can I influence the exit code? (I could do (kill-emacs
>> my-exit-code) but would be more happy if I could also use the merge
>> command with emacsclient where I obviously don't want to kill emacs.)
> Why not, isn't this supposed to be a shell tool? If so, see
> emacs(1) as you know ...
> If not, and if it isn't supposed to be exited, how can there be an
> exit code to begin? (To end with, without ending anything.)

"emacsclient <file>" exits on `server-edit' (C-x #) (or goes to the next
buffer if more than one file were specified on the command line) but
won't make emacs itself exit.  So there is an exit code for emacsclient
but it seem one cannot influence it.

>> How do I print the merge buffer's contents to stdout?
> Here is some material on that but if you use Emacs as a shell
> tool you don't need it


  (append-to-file (point-min) (point-max) "/dev/stdout")

seems to do the trick!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]