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: Tue, 14 Jun 2022 13:23:08 +0200
User-agent: mu4e 1.7.26; emacs 29.0.50

Emanuel Berg <incal@dataswamp.org> writes:

>>>> "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.
>>>
>>> OK, but is that hooked to whatever adheres to the interface
>>> you showed,
>>
>> No, it's independent of my specific use-case but would be
>> nice to have in general in scripting scenarios, i.e., where
>> a script/program invokes emacsclient in order to let the
>> user edit something where the user should be able to
>> propagate back to the calling program if his edits were
>> successfully completed or aborted.
>
> This
>
>   (server-send-string (car server-buffer-clients) "-error die")
>
> ?
>
> https://superuser.com/questions/295156/how-to-set-the-exit-status-for-emacsclient

Indeed, that seems to do the job.  (I haven't tested but the SO answer
suggests it used to work.)

Thanks,
Tassilo



reply via email to

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