help-gnu-emacs
[Top][All Lists]
Advanced

[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 11:34:49 +0200
User-agent: mu4e 1.7.27; emacs 29.0.50

Robert Pluim <rpluim@gmail.com> writes:

Hi Robert,

>     Tassilo> "emacsclient <file>" exits on `server-edit' (C-x #) (or goes to 
> the next
>     Tassilo> buffer if more than one file were specified on the command line) 
> but
>     Tassilo> won't make emacs itself exit.  So there is an exit code for 
> emacsclient
>     Tassilo> but it seem one cannot influence it.
>
> Thereʼs `server-edit-abort', but that doesnʼt (currently) allow you to
> tell emacsclient which exit code to use. I guess it could be extended.

Maybe.  I guess there's a problem with "emacsclient file1 file2" when
you abort the edit of file1 but complete the one of file2.

In the end, the exit code is probably not that important.  At least the
pacdiff script asks you if the merge result should be used.

>     >>> 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
>
>     Tassilo> Indeed,
>
>     Tassilo>   (append-to-file (point-min) (point-max) "/dev/stdout")
>
> Except on platforms that donʼt have "/dev/stdout".

Sure, but those don't matter to me.  Maybe I'll bring that topic up on
emacs-devel once I have a working solution for GNU systems.

Thanks,
Tassilo



reply via email to

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