From: Peter Ludemann <peter.ludemann@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Michael Albinus <michael.albinus@gmx.de>, 55599@debbugs.gnu.org
Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line
Date: Wed, 1 Jun 2022 13:04:42 -0700 [thread overview]
Message-ID: <CAHjfyZ0XTMfn6OzWjb_uP9F5oZiqwEQJbUZLrmV-DRNVn1AOhA@mail.gmail.com> (raw)
In-Reply-To: <83mtewf9g4.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2073 bytes --]
On Wed, 1 Jun 2022 at 12:52, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Peter Ludemann <peter.ludemann@gmail.com>
> > Date: Wed, 1 Jun 2022 10:54:02 -0700
> > Cc: Michael Albinus <michael.albinus@gmx.de>, 55599@debbugs.gnu.org
> >
> > I start the emacs daemon from a terminal by:
> > emacs --daemon
> >
> > During startup, there might be some prompts (e.g., I get a pagination
> prompt from parsing a tar file, when
> > emacs is loading my last session's files), and I can deal with them at
> the terminal.
> >
> > When I shutdown the emacs daemon, I would like to also do this at the
> terminal:
> > emacsclient -e '(save-buffers-kill-emacs)'
> > but that doesn't work if there are any prompts (e.g., saving a file or
> killing a shell process).
> > A work-around is to do:
> > emacsclient -c -e '(save-buffers-kill-emacs)'
> > and that lets me see the prompts in the minibuffer.
> >
> > However, it seems that "emacsclient -e" has access to the terminal's
> stderr.
> > Evidence: I get an error message at the terminal (not in a minibuffer)
> if I do something with an error, such as
> > emacsclient -e '(man fprintf)'
> >
> > If stderr is being passed in to the evaluation code in daemon mode, then
> it would be nice to also have stdin
> > passed in, which would allow interaction at the terminal.
>
> stderr is not passed. What happens is that any messages sent by the
> server are echoed by the client on its own stderr.
>
> However, the reverse direction is not supported. For it to be
> supported, we need a way to tell the server to wait for the client to
> return the user's response. Such a feature doesn't exist, AFAIK, so
> to support it we need to extend the client-server protocol.
>
That sounds like a lot of work for a very small pay-off (at least, in the
scenario I've given), especially as there's an easy work-around.
Feel free to close this bug/feature-request as "wontfix". ;)
And, again, thank-you for your prompt and very helpful responses (and your
patience with someone who knows very little about the internals of emacs)
[-- Attachment #2: Type: text/html, Size: 3355 bytes --]
next prev parent reply other threads:[~2022-06-01 20:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 19:56 bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Peter Ludemann
2022-05-24 7:34 ` Michael Albinus
2022-05-24 9:29 ` Peter Ludemann
2022-05-24 11:31 ` Eli Zaretskii
2022-05-28 18:27 ` Peter Ludemann
2022-05-28 19:25 ` Eli Zaretskii
2022-05-28 19:39 ` Eli Zaretskii
2022-05-31 19:34 ` Peter Ludemann
2022-06-01 2:30 ` Eli Zaretskii
2022-06-01 17:54 ` Peter Ludemann
2022-06-01 19:52 ` Eli Zaretskii
2022-06-01 20:04 ` Peter Ludemann [this message]
2023-09-13 1:43 ` Stefan Kangas
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=CAHjfyZ0XTMfn6OzWjb_uP9F5oZiqwEQJbUZLrmV-DRNVn1AOhA@mail.gmail.com \
--to=peter.ludemann@gmail.com \
--cc=55599@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=michael.albinus@gmx.de \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).