From: Tassilo Horn <tsdh@gnu.org>
To: Emanuel Berg <incal@dataswamp.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to use emacs as a "diff3 -m" compatible merge tool?
Date: Mon, 13 Jun 2022 07:21:00 +0200 [thread overview]
Message-ID: <87mtehxgm2.fsf@gnu.org> (raw)
In-Reply-To: <87h74suo6g.fsf@dataswamp.org>
Emanuel Berg <incal@dataswamp.org> 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
>
> https://stackoverflow.com/a/41435631
Indeed,
(append-to-file (point-min) (point-max) "/dev/stdout")
seems to do the trick!
Thanks,
Tassilo
next prev parent reply other threads:[~2022-06-13 5:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 10:52 How to use emacs as a "diff3 -m" compatible merge tool? Tassilo Horn
2022-06-09 19:53 ` Michael Heerdegen
2022-06-10 16:42 ` Tassilo Horn
2022-06-10 18:50 ` Michael Heerdegen
2022-06-12 11:31 ` Robert Pluim
2022-06-10 22:52 ` Emanuel Berg
2022-06-13 5:21 ` Tassilo Horn [this message]
2022-06-13 8:09 ` Robert Pluim
2022-06-13 9:34 ` Tassilo Horn
2022-06-13 9:52 ` Michael Heerdegen
2022-06-13 11:18 ` Robert Pluim
2022-06-13 21:13 ` Emanuel Berg
2022-06-14 7:50 ` Tassilo Horn
2022-06-14 10:06 ` Emanuel Berg
2022-06-14 11:23 ` Tassilo Horn
2022-06-13 13:34 ` Tassilo Horn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mtehxgm2.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=help-gnu-emacs@gnu.org \
--cc=incal@dataswamp.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).