[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: |
Fri, 10 Jun 2022 18:42:42 +0200 |
User-agent: |
mu4e 1.7.26; emacs 29.0.50 |
Michael Heerdegen <michael_heerdegen@web.de> writes:
Hi Michael,
>> How do I print the merge buffer's contents to stdout? 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.)
>
> Never did something like this before. I spent some time trying to
> understand the code in server.el however. Seems `server-send-string'
> can be used for this. Maybe search for the occurrences - e.g. in
> `server-edit-abort' (and the rest of server.el).
>
> The available "options" are explained in the doc of
> `server-process-filter' AFAIU. I think you are interested in those
> "accepted by the client" - especially -print and -error.
Thanks, I will have a look. Do I understand it correctly that your
answer is specifically about the emacsclient case?
If so, I'd rather tackle my usual sysadmin work "emacs -Q -l minimal.el
..." use-case first where (kill-emacs my-exit-code) would be ok. But
how do I print buffer contents to emacs' stdout?
Bye,
Tassilo