all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Ludemann <peter.ludemann@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 55599@debbugs.gnu.org
Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line
Date: Tue, 24 May 2022 02:29:37 -0700	[thread overview]
Message-ID: <CAHjfyZ0Fd6xvxn2zxqa20_rhBS=GsBbJJCO2eQfd+3j4coSMWA@mail.gmail.com> (raw)
In-Reply-To: <87r14jo02m.fsf@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1750 bytes --]

I don't want to unconditionally save buffers; I want to conditionally save
them. (Actually, I wouldn't mind if it didn't save the buffers at all; when
I restart emacs, it finds the ".#" files, and that suffices.)

There's a more general problem here (although you might decide it's too
much trouble to fix) -- it seems that when "emacsclient -e" is used, any
prompts go to the non-existent screen rather than to the terminal. (e.g.,
yes-or-n-p's prompt).

Also, save-buffers-kill-emacs does two things: (conditionally) saves the
buffers and deletes the ~/.emacs.d/.emacs.desktop.lock file. On the other
hand, the lower level kill-emacs doesn't delete the lock file (and the
response to bug 55560 is that that's a deliberate design decision). So,
there's no way of doing from the command line
"kill-emacs-and-remove-lock-file", it seems.

On Tue, 24 May 2022 at 00:34, Michael Albinus <michael.albinus@gmx.de>
wrote:

> Peter Ludemann <peter.ludemann@gmail.com> writes:
>
> Hi Peter,
>
> > When I try to kill an emacs server from the command line by:
> >    emacsclient -e '(save-buffers-kill-emacs)'
> > nothing appears to happen if there are any unsaved buffers.
> >
> > I presume that this is because the prompt goes to the usual place (below
> > the mode line in the screen), which of course isn't visible from the
> > command line because there isn't any screen when using "emacsclient -e".
> >
> > This is a follow-up to bug 55560, where it was suggested that kill-emacs
> is
> > inappropriate and instead I should use save-buffers-kill-emacs.
>
> There is an optional ARG which lets Emacs silently save all file-visiting
> buffers without asking. So you must call
>
>   emacsclient -e '(save-buffers-kill-emacs t)'
>
> Best regards, Michael.
>

[-- Attachment #2: Type: text/html, Size: 2678 bytes --]

  reply	other threads:[~2022-05-24  9:29 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 [this message]
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
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHjfyZ0Fd6xvxn2zxqa20_rhBS=GsBbJJCO2eQfd+3j4coSMWA@mail.gmail.com' \
    --to=peter.ludemann@gmail.com \
    --cc=55599@debbugs.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.