Received: (at 55599) by debbugs.gnu.org; 24 May 2022 11:31:39 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 24 07:31:39 2022 Received: from localhost ([127.0.0.1]:51137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ntSlH-00006B-27 for submit <at> debbugs.gnu.org; Tue, 24 May 2022 07:31:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ntSlC-0008PJ-HK for 55599 <at> debbugs.gnu.org; Tue, 24 May 2022 07:31:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34862) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1ntSl6-0000bb-S1; Tue, 24 May 2022 07:31:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=yqm2d+LE5SqVqyKl4P6lL/e5ov2KQ9kfHBk9cQPg+C4=; b=lRee4XwH8KVf ktO8uTv6rzIGFub1SEEGRSPKcrx/ojgG1p1iCPLRo7n9ZnDQ7ETjLE/1O+RahSY9cNqzs7Z9RuuS1 y9o0bczs9PG27J8OKoskpTAzJw1dSH70UF5x7ExSUsVZVmVlBHKa6m2NtpwcB25A4eGNkYFdDgHin oI+u07n1W9OA1yly3FUKm9rRINXMt15CtvsnJy3Enc/780egaAV4zOX6D5xG3iktESFV9xIo/YKAh +x6YEZyQelBJCWnKUcIQCYpBf3wW61wINzk8ouoO0ndzf3V2V6NaIVCOTI4HdQf99MCeZgNE3k/FZ 29Hd2UXEUYSFj9xEPot2TQ==; Received: from [87.69.77.57] (port=2209 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1ntSl5-0006Ks-Qj; Tue, 24 May 2022 07:31:28 -0400 Date: Tue, 24 May 2022 14:31:16 +0300 Message-Id: <83k0ab5fqz.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Peter Ludemann <peter.ludemann@HIDDEN> In-Reply-To: <CAHjfyZ0Fd6xvxn2zxqa20_rhBS=GsBbJJCO2eQfd+3j4coSMWA@HIDDEN> (message from Peter Ludemann on Tue, 24 May 2022 02:29:37 -0700) Subject: Re: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line References: <CAHjfyZ1yaJHqvkBkkw7zRktZJVA6xC+j-aPehGVERrKmtPbQiw@HIDDEN> <87r14jo02m.fsf@HIDDEN> <CAHjfyZ0Fd6xvxn2zxqa20_rhBS=GsBbJJCO2eQfd+3j4coSMWA@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55599 Cc: michael.albinus@HIDDEN, 55599 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Cc: 55599 <at> debbugs.gnu.org > From: Peter Ludemann <peter.ludemann@HIDDEN> > Date: Tue, 24 May 2022 02:29:37 -0700 > > 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). "emacsclient -e" is not meant to support execution of interactive Lisp programs, especially not when there's no client frame through which to interact with the user. If you want interaction via emacsclient, start emacsclient normally, and then invoke those interactive Lisp programs in the client frame that the server opens. I see no bugs in the behavior you report, and no change from previous Emacs versions. So I'm unsure what issues are being discussed here (but see below). > 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. You can do anything from the command line, as long as you make sure the Lisp program you invoke via the -e switch doesn't ask any questions. E.g., you can invoke a Lisp program that deletes the desktop lock file in a kill-emacs-hook, provided that you write such a hook yourself and set it in the same Lisp program you pass via -e. The change that triggered this bug report supports "normal" use of emacsclient, whereby the server session is terminated interactively. If you insist on doing that noninteractively, you will have to write your own Lisp program to do that. Alternatively, feel free to request a new feature of emacsclient whereby you could terminate the server session non-interactively via some new command-line option; then the implementation of such a feature will have to do all that internally.
bug-gnu-emacs@HIDDEN
:bug#55599
; Package emacs
.
Full text available.Received: (at 55599) by debbugs.gnu.org; 24 May 2022 09:30:24 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 24 05:30:24 2022 Received: from localhost ([127.0.0.1]:51066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ntQrw-0001nD-C4 for submit <at> debbugs.gnu.org; Tue, 24 May 2022 05:30:24 -0400 Received: from mail-pf1-f181.google.com ([209.85.210.181]:45049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <peter.ludemann@HIDDEN>) id 1ntQrs-0001mw-Ai for 55599 <at> debbugs.gnu.org; Tue, 24 May 2022 05:30:23 -0400 Received: by mail-pf1-f181.google.com with SMTP id x143so15941095pfc.11 for <55599 <at> debbugs.gnu.org>; Tue, 24 May 2022 02:30:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Gen1gFF5T3PY2s4yoc7ZWJGgZ8Mhogzw4ChOQ3qSLz0=; b=UWqgxpJyITMTJsEjzMyXTBg7CRlw+imTUcqUa2g37R8EapBi75ybcVzLeijf9UE0x6 TtGaIEv7Nmm3RWEIiVvHlOxqLX8qLrg+/vCCpQq2E1AZwXNqKGsbutZIClHB9vlsi2xg 00q0L/Vxjjy0DAJGU8NwEOK8viBg9HqOcStQi103NxsE0z5AF7eB7WBRjcEitD3HeG91 +D0p0UlmCxrGlqFQ0mPu9KkoxgGh6GG/kbieN27k53adxf/9J4cA8dAJl5LvYzntKJgE Jg3D6jZaPu5a7Z7yZVd0kmX0hrQPj0RmPhtiY+44GVOs8nKtqvheNdlYE70sHWumGZkV sMNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Gen1gFF5T3PY2s4yoc7ZWJGgZ8Mhogzw4ChOQ3qSLz0=; b=YUmwJpVmu1FUy8nfA8ETPhOEuH4gwLrANmVuHtLooAMky0GEo2e/0z1219RSaKlRCo XWANdV53mMrMoyXoakM06nfvVDglCKbvHWNoci7So+K8OwRj8hXZNfB3+n6rwzYd86L2 EQxQTAf5xNnYklI3MOjqotWdar2yju7KDeqxUGkpX5cg2yUN/Fn5V9djHsIenMar+vzT IxVBCDwaHBjx74I4OeQTLzvUM8SuA8uu2ntPaVxP2cLR2npJ6NhsOZBw70A5FHxULBbQ 80mAlW5VCeRLOroXei8w2R3Hfb2hu03lZgMViEutFbCWGg2ztPLxkJdqCD0rLeDS07IO wOqA== X-Gm-Message-State: AOAM533VxDd+Z8i6QFuDBNe5uIN8xpGBm7seQvSd91osZ/ZjMenrM9Vq O4Wp3+JBYF05kg+aA4fx0Zhn8IgY92d5WzX2lZE= X-Google-Smtp-Source: ABdhPJzKAxcZiMD7TIT81U2vORLcQBhP8kqR7p4k5Fz82BbJMlPEIGIjGq4UsOH8uVFoyQsAAGGYYSCWI8ssN+wqgn8= X-Received: by 2002:a05:6a00:2d0:b0:518:95f8:d00a with SMTP id b16-20020a056a0002d000b0051895f8d00amr11374128pft.8.1653384614180; Tue, 24 May 2022 02:30:14 -0700 (PDT) MIME-Version: 1.0 References: <CAHjfyZ1yaJHqvkBkkw7zRktZJVA6xC+j-aPehGVERrKmtPbQiw@HIDDEN> <87r14jo02m.fsf@HIDDEN> In-Reply-To: <87r14jo02m.fsf@HIDDEN> From: Peter Ludemann <peter.ludemann@HIDDEN> Date: Tue, 24 May 2022 02:29:37 -0700 Message-ID: <CAHjfyZ0Fd6xvxn2zxqa20_rhBS=GsBbJJCO2eQfd+3j4coSMWA@HIDDEN> Subject: Re: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line To: Michael Albinus <michael.albinus@HIDDEN> Content-Type: multipart/alternative; boundary="0000000000009afd5005dfbe9aaa" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55599 Cc: 55599 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --0000000000009afd5005dfbe9aaa Content-Type: text/plain; charset="UTF-8" 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@HIDDEN> wrote: > Peter Ludemann <peter.ludemann@HIDDEN> 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. > --0000000000009afd5005dfbe9aaa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:verdana,= sans-serif">I don't want to unconditionally save buffers; I want to con= ditionally 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.)</div><div class=3D"gmail_default" style=3D"font-famil= y:verdana,sans-serif"><br></div><div class=3D"gmail_default" style=3D"font-= family:verdana,sans-serif">There's a more general problem here (althoug= h 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 scre= en rather than to the terminal. (e.g., yes-or-n-p's prompt).</div><div = class=3D"gmail_default" style=3D"font-family:verdana,sans-serif"><br></div>= <div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">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, th= e lower level kill-emacs doesn't delete the lock file (and the response= to bug=C2=A055560 is that that's a deliberate design decision). So, th= ere's no way of doing from the command line "kill-emacs-and-remove= -lock-file", it seems.</div></div><br><div class=3D"gmail_quote"><div = dir=3D"ltr" class=3D"gmail_attr">On Tue, 24 May 2022 at 00:34, Michael Albi= nus <<a href=3D"mailto:michael.albinus@HIDDEN" target=3D"_blank">michael= .albinus@HIDDEN</a>> wrote:<br></div><blockquote class=3D"gmail_quote" s= tyle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pad= ding-left:1ex">Peter Ludemann <<a href=3D"mailto:peter.ludemann@HIDDEN= m" target=3D"_blank">peter.ludemann@HIDDEN</a>> writes:<br> <br> Hi Peter,<br> <br> > When I try to kill an emacs server from the command line by:<br> >=C2=A0 =C2=A0 emacsclient -e '(save-buffers-kill-emacs)'<br> > nothing appears to happen if there are any unsaved buffers.<br> ><br> > I presume that this is because the prompt goes to the usual place (bel= ow<br> > the mode line in the screen), which of course isn't visible from t= he<br> > command line because there isn't any screen when using "emacs= client -e".<br> ><br> > This is a follow-up to bug 55560, where it was suggested that kill-ema= cs is<br> > inappropriate and instead I should use save-buffers-kill-emacs.<br> <br> There is an optional ARG which lets Emacs silently save all file-visiting<b= r> buffers without asking. So you must call<br> <br> =C2=A0 emacsclient -e '(save-buffers-kill-emacs t)'<br> <br> Best regards, Michael.<br> </blockquote></div> --0000000000009afd5005dfbe9aaa--
bug-gnu-emacs@HIDDEN
:bug#55599
; Package emacs
.
Full text available.Received: (at 55599) by debbugs.gnu.org; 24 May 2022 07:35:08 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 24 03:35:08 2022 Received: from localhost ([127.0.0.1]:50878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ntP4O-00055d-1z for submit <at> debbugs.gnu.org; Tue, 24 May 2022 03:35:08 -0400 Received: from mout.gmx.net ([212.227.15.18]:34245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <michael.albinus@HIDDEN>) id 1ntP4L-000552-QF for 55599 <at> debbugs.gnu.org; Tue, 24 May 2022 03:35:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1653377699; bh=Rve5Mmht+KWvooiF2UcizVcJQPQSS+NMBpJygwvumBk=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=SJJdoCpFW1iNluu5PUqTRlq0JpMru3NAiMQm0kzRZHzQ2rktqfowvkCqzLEqYNZAW 20sfrfutX3WrJHcjrZLfUb0ecbbZIGHh4JOu3FC7Jeb8C5peugCaCW8wv9qUORScmy /oQ44wVLyKUSwUZc++YY5uoXCBd5e1rPLUSg9idk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.149.14]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MeU4s-1nIyJy3I9c-00aWx6; Tue, 24 May 2022 09:34:58 +0200 From: Michael Albinus <michael.albinus@HIDDEN> To: Peter Ludemann <peter.ludemann@HIDDEN> Subject: Re: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line References: <CAHjfyZ1yaJHqvkBkkw7zRktZJVA6xC+j-aPehGVERrKmtPbQiw@HIDDEN> Date: Tue, 24 May 2022 09:34:57 +0200 In-Reply-To: <CAHjfyZ1yaJHqvkBkkw7zRktZJVA6xC+j-aPehGVERrKmtPbQiw@HIDDEN> (Peter Ludemann's message of "Mon, 23 May 2022 12:56:17 -0700") Message-ID: <87r14jo02m.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:EBS+aKazAqL9jo80jKAEm/kTdedlRFSrDN6yWAeG774Lip1Sk3n ic3EjMXkyZo/3QJM6kcEMgKxFMVppQgEBXxqQKjQAp01rLypBoyukaaIf9UBE79S6RFrdrZ 177czfeEyex6lwyQP+i3iGn6FOKPVhQU1uaUBUO4h6Kps3O9v4t9ygIEDTkoZcuVm62+HxZ z6T6e8Bt5hiaRk3ZyaRvQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:zE0+qO1TgjU=:6tJpyA7T2GFM2BLdJDkU+U P3ux87RBun8AlzyyQQfGT/V1j+9exRt17FNrpQ2MpHGxWAC9hXw8LZ2UPiavJ4++3LOU6w4m4 5KWXeizHabtEEcVK4CnhpLsuY/sMYpAqXSLzZ+lvXo6/0/KP7RS7i4Ir4R8/MNGjQKT/exwQZ 8KZuAmoyCrYPIpCfOD94cUA+8CMG+uWk4FSimt8uO6IfzVkxOsEh6ysHjMu6nx9pUpAzCYcgp ppNkfif2ihz3DstfwW1d4zPptvOWcPP++yprIKzeH5UC+fpcQ9TkRBnNHiG3EvSg6kYd68E6w 4Vwrs1FfAqIWdXypgVTg4bOWUF0kfhkOtBB5vAHpCopBTU7zP20voeYXMbKK+AyrkLZnE6jsm wmnFunC1k+uzziWDb1ncONXqPhofdOHGHQ7WQAY2tP026RPD2wMrudkBctD0n4lhw1pfEMF/W nyZv1okyVNE+a4mrQsl3xPS3+czsmPsmdqVeN3AJ/O8Itq5DTk2IljwO6TxdDaIOYhP6qKLwg 0A3DixvtrCpEeragDVadwvAyRGTyaXwobnA9elTGZ9Z+/NYXk9TQSHLm6dzzycn/4pYEDQyOg kzbP22ppxMSFsFR4IuRU+39DvquTHzI8rV5wHSAisodYfuntVItzbR2Uem26/peX8V/yIQu4L w1ilprbfzUBkkdnPtPkHihDfrQL3loAt60BBhFS2bDHohctJNkiJfdmMOpFghMBJTYmngrmsL iU8e2k1VtJFizr68lqaN1OYzc6o8RcmQdnwqXxMZFw+1W9371N6hHAjazlcPkdBrm/kaCXRwm cdEBfIiTNwF+zutYqHhtP3MDZr+Kv9ME1gILKXB8i452twMqTCKUqpfNFmU6UNzGS4KB1H3IR h4cmgNTQDooxo8D+aJtv6kG+gOcykDdBXo7iNAdcAwAZfP/ntogGcCPTcF2sSTCvIwDFmvzvG 6C8tNrYlJluBTjP/hk0WucUDM7tPtN6HO3V0pAwZBdhYVTbWn3f8agV42TOwnDFNMMGk9ZL3i fSPwgGYcmGSky6tdLs/eJeXmvQqzGftGxj7KaMrqMX43ywn4s9Ey322DMIZHH6h0j7eEmlpxg OPE633Id5bHiLYzVbArdiZQhQiu7O6Hy8bO5Bd76UyxGjgPiYiZdz+LzA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55599 Cc: 55599 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Peter Ludemann <peter.ludemann@HIDDEN> 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.
bug-gnu-emacs@HIDDEN
:bug#55599
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 23 May 2022 19:57:01 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 23 15:57:01 2022 Received: from localhost ([127.0.0.1]:50263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ntEAm-0001cU-FM for submit <at> debbugs.gnu.org; Mon, 23 May 2022 15:57:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:41576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <peter.ludemann@HIDDEN>) id 1ntEAk-0001cN-T6 for submit <at> debbugs.gnu.org; Mon, 23 May 2022 15:56:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <peter.ludemann@HIDDEN>) id 1ntEAk-0008HD-JE for bug-gnu-emacs@HIDDEN; Mon, 23 May 2022 15:56:58 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:46648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <peter.ludemann@HIDDEN>) id 1ntEAi-0005Sx-Ht for bug-gnu-emacs@HIDDEN; Mon, 23 May 2022 15:56:58 -0400 Received: by mail-pj1-x102d.google.com with SMTP id v5-20020a17090a7c0500b001df84fa82f8so246222pjf.5 for <bug-gnu-emacs@HIDDEN>; Mon, 23 May 2022 12:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=2W1x74dCPfp82XaNkRe4jYdirTb+OQ2L1LQok4ecgIw=; b=kNLdsmpz2lcmM67VoqUIjB3egcC1FZzUijhMzO31+FAd+bQquCdOz9lh5TmIU016RS COsp3veAvi1auasYz5Kvg4VF2kOeq+tfh6Mgej9k44h06OUPNCQ4sCw4FYC0ofZyH7/F CgVHHIWfgcfhBcCTH+jQGVx714fK5dnEGS5vweLwgebLN4TvldZ9WqeqG7ctmkH01l4T WPvYBmXHh/yFfSkLhbrTrChrlgVCoxiPNKrNJe4Fr3UB0m7j6G6m9pxP6O24L+B+Ador LkN7p70M8tkFjI8fXP3leDhLx//J0+zsKwAtrQtphOaHKYsyX5g+l4rngIj0LeGEfNjF ZR4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=2W1x74dCPfp82XaNkRe4jYdirTb+OQ2L1LQok4ecgIw=; b=WQf0/qX39bm6BD61EEEQ2q+/sd6RPn63PRXHHDJW40Mj+wMVFjPXvt62M51IV1VJdH xhLjLzhmT1yo9bVkLLVQMOOVjqpUlKf7O9vEhfb+tVY3u4kbC0ETxmuMrzchAafZz5F5 5CMV3cFQUvd93rdwD868C5+OjFffT1hD5zMUVlbpn6c6M7F+FZdjo4PrTvilhGlMEEza vNL9l8pO5Ag0g+fER75XmUdQOC0voXDpNhNV8RkH5mFH9Y93mz4eIQoQh33UG4VuH3i/ eE5ByRtjvV0qWLMSQpFo0G3VyqhMyWTVucvqBxnNrueDk2lvLQVxmt7xY05veOVt/TIk 8ebw== X-Gm-Message-State: AOAM5321pyrAqL+jJjbHLno2w65Zo/a1+KCL1qcScd/+bG5YxdDww6OU KHgMvhxPz+ldL/Dh/tg4lBBFKposNvMDczTMhlSLEWAg6/0= X-Google-Smtp-Source: ABdhPJwFR1T64LJ3qbdN3WC9zdBHKg+VcJTMD372IU1HZrsYvHV7lW6/LHziMe4sjGabLkvXgBXk9saznWILHSf9LtU= X-Received: by 2002:a17:902:a9c9:b0:161:5b73:5ac9 with SMTP id b9-20020a170902a9c900b001615b735ac9mr24520922plr.14.1653335814432; Mon, 23 May 2022 12:56:54 -0700 (PDT) MIME-Version: 1.0 From: Peter Ludemann <peter.ludemann@HIDDEN> Date: Mon, 23 May 2022 12:56:17 -0700 Message-ID: <CAHjfyZ1yaJHqvkBkkw7zRktZJVA6xC+j-aPehGVERrKmtPbQiw@HIDDEN> Subject: save-buffers-kill-emacs doesn't give a visible prompt when called from command line To: bug-gnu-emacs@HIDDEN Content-Type: multipart/alternative; boundary="000000000000e9eccc05dfb33d36" Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=peter.ludemann@HIDDEN; helo=mail-pj1-x102d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --000000000000e9eccc05dfb33d36 Content-Type: text/plain; charset="UTF-8" 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. Probably not relevant, but including for completeness: I have the following "my-exit" function added to kill-emacs-query-functions; I've confirmed that this use of daemonp behaves as expected and that the "Really kill Emacs?" prompt doesn't happen: (defun my-exit () (or (daemonp) (yes-or-no-p "Really kill Emacs? "))) In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2022-05-21 built on penguin Repository revision: 208102fa470e3417320062cdb48a9967d80bf092 Repository branch: master System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure --prefix=/home/peter/.local --with-gnutls PKG_CONFIG_PATH=/home/peter/.local/lib/pkgconfig:' Configured features: FREETYPE GIF GMP GNUTLS JPEG LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XFT XIM XPM LUCID ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Apropos Minor modes in effect: global-auto-revert-mode: t display-time-mode: t savehist-mode: t desktop-save-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: ~/src/pykythe/emacs/prolog hides /home/peter/.local/share/emacs/29.0.50/lisp/progmodes/prolog Features: (shadow sort mail-extr emacsbug message yank-media rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils shortdoc help-fns radix-tree misearch multi-isearch mule-util apropos time-date term/xterm xterm finder-inf package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars cl-extra help-mode seq gv subr-x byte-opt bytecomp byte-compile cconv autorevert filenotify grep compile text-property-search comint ansi-color ring cus-load time savehist desktop frameset cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice simple cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads inotify dynamic-setting font-render-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 91186 8875) (symbols 48 9960 1) (strings 32 29163 1620) (string-bytes 1 904097) (vectors 16 15493) (vector-slots 8 175522 6636) (floats 8 79 477) (intervals 56 533 0) (buffers 992 12)) --000000000000e9eccc05dfb33d36 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:verdana,= sans-serif">When I try to kill an emacs server from the command line by:</d= iv><div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">= =C2=A0 =C2=A0emacsclient -e '(save-buffers-kill-emacs)'<br></div><d= iv class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">nothing= appears to happen if there are any unsaved buffers.</div><div class=3D"gma= il_default" style=3D"font-family:verdana,sans-serif"><br></div><div class= =3D"gmail_default" style=3D"font-family:verdana,sans-serif">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 becaus= e there isn't any screen when using "emacsclient -e".</div><d= iv class=3D"gmail_default" style=3D"font-family:verdana,sans-serif"><br cla= ss=3D"gmail-Apple-interchange-newline">This is a follow-up to bug 55560, wh= ere it was suggested that kill-emacs is inappropriate and instead I should = use save-buffers-kill-emacs.<br></div><div class=3D"gmail_default" style=3D= "font-family:verdana,sans-serif"><br></div><div class=3D"gmail_default" sty= le=3D"font-family:verdana,sans-serif">Probably not relevant, but including = for completeness:</div><div class=3D"gmail_default" style=3D"font-family:ve= rdana,sans-serif"><br></div><div class=3D"gmail_default" style=3D"font-fami= ly:verdana,sans-serif">I have the following "my-exit" function ad= ded to kill-emacs-query-functions; I've confirmed that this use of=C2= =A0daemonp behaves as expected and that the "Really kill Emacs?" = prompt doesn't happen:</div><div class=3D"gmail_default" style=3D"font-= family:verdana,sans-serif">=C2=A0</div><div class=3D"gmail_default" style= =3D"font-family:verdana,sans-serif">(defun my-exit ()<br>=C2=A0 (or (daemon= p)<br>=C2=A0 =C2=A0 =C2=A0 (yes-or-no-p "Really kill Emacs? ")))<= br></div><div class=3D"gmail_default" style=3D"font-family:verdana,sans-ser= if"><br></div><div class=3D"gmail_default" style=3D"font-family:verdana,san= s-serif"><br></div><div class=3D"gmail_default" style=3D"font-family:verdan= a,sans-serif">In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit= , Xaw3d scroll bars)<br>=C2=A0of 2022-05-21 built on penguin<br>Repository = revision: 208102fa470e3417320062cdb48a9967d80bf092<br>Repository branch: ma= ster<br>System Description: Debian GNU/Linux 11 (bullseye)<br><br>Configure= d using:<br>=C2=A0'configure --prefix=3D/home/peter/.local --with-gnutl= s<br>=C2=A0PKG_CONFIG_PATH=3D/home/peter/.local/lib/pkgconfig:'<br><br>= Configured features:<br>FREETYPE GIF GMP GNUTLS JPEG LIBXML2 MODULES NOTIFY= INOTIFY PDUMPER PNG<br>SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_B= ARS X11 XAW3D XDBE<br>XFT XIM XPM LUCID ZLIB<br><br>Important settings:<br>= =C2=A0 value of $LANG: en_US.UTF-8<br>=C2=A0 locale-coding-system: utf-8-un= ix<br><br>Major mode: Apropos<br><br>Minor modes in effect:<br>=C2=A0 globa= l-auto-revert-mode: t<br>=C2=A0 display-time-mode: t<br>=C2=A0 savehist-mod= e: t<br>=C2=A0 desktop-save-mode: t<br>=C2=A0 tooltip-mode: t<br>=C2=A0 glo= bal-eldoc-mode: t<br>=C2=A0 show-paren-mode: t<br>=C2=A0 electric-indent-mo= de: t<br>=C2=A0 mouse-wheel-mode: t<br>=C2=A0 menu-bar-mode: t<br>=C2=A0 fi= le-name-shadow-mode: t<br>=C2=A0 global-font-lock-mode: t<br>=C2=A0 font-lo= ck-mode: t<br>=C2=A0 buffer-read-only: t<br>=C2=A0 column-number-mode: t<br= >=C2=A0 line-number-mode: t<br>=C2=A0 transient-mark-mode: t<br>=C2=A0 auto= -composition-mode: t<br>=C2=A0 auto-encryption-mode: t<br>=C2=A0 auto-compr= ession-mode: t<br><br>Load-path shadows:<br>~/src/pykythe/emacs/prolog hide= s /home/peter/.local/share/emacs/29.0.50/lisp/progmodes/prolog<br><br>Featu= res:<br>(shadow sort mail-extr emacsbug message yank-media rmc puny dired<b= r>dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config<br>g= nus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev<br>gmm= -utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util<br>mail-prsvr= mail-utils shortdoc help-fns radix-tree misearch<br>multi-isearch mule-uti= l apropos time-date term/xterm xterm finder-inf<br>package browse-url url u= rl-proxy url-privacy url-expand url-methods<br>url-history url-cookie url-d= omsuf url-util mailcap url-handlers<br>url-parse auth-source cl-seq eieio e= ieio-core cl-macs eieio-loaddefs<br>password-cache json map url-vars cl-ext= ra help-mode seq gv subr-x<br>byte-opt bytecomp byte-compile cconv autoreve= rt filenotify grep compile<br>text-property-search comint ansi-color ring c= us-load time savehist<br>desktop frameset cl-loaddefs cl-lib iso-transl too= ltip eldoc paren<br>electric uniquify ediff-hook vc-hooks lisp-float-type e= lisp-mode mwheel<br>term/x-win x-win term/common-win x-dnd tool-bar dnd fon= tset image<br>regexp-opt fringe tabulated-list replace newcomment text-mode= lisp-mode<br>prog-mode register page tab-bar menu-bar rfn-eshadow isearch = easymenu<br>timer select scroll-bar mouse jit-lock font-lock syntax font-co= re<br>term/tty-colors frame minibuffer nadvice simple cl-generic cham georg= ian<br>utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean<br>= japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european<br>et= hiopic indian cyrillic chinese composite emoji-zwj charscript charprop<br>c= ase-table epa-hook jka-cmpr-hook help abbrev obarray oclosure<br>cl-preload= ed button loaddefs faces cus-face macroexp files window<br>text-properties = overlay sha1 md5 base64 format env code-pages mule<br>custom widget keymap = hashtable-print-readable backquote threads inotify<br>dynamic-setting font-= render-setting x-toolkit x multi-tty<br>make-network-process emacs)<br><br>= Memory information:<br>((conses 16 91186 8875)<br>=C2=A0(symbols 48 9960 1)= <br>=C2=A0(strings 32 29163 1620)<br>=C2=A0(string-bytes 1 904097)<br>=C2= =A0(vectors 16 15493)<br>=C2=A0(vector-slots 8 175522 6636)<br>=C2=A0(float= s 8 79 477)<br>=C2=A0(intervals 56 533 0)<br>=C2=A0(buffers 992 12))<br></d= iv></div> --000000000000e9eccc05dfb33d36--
Peter Ludemann <peter.ludemann@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#55599
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.