From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Peter Ludemann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 May 2022 19:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 55599@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16533358216235 (code B ref -1); Mon, 23 May 2022 19:57:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 May 2022 19:57:01 +0000 Received: from localhost ([127.0.0.1]:50263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntEAm-0001cU-FM for submit@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 ) id 1ntEAk-0001cN-T6 for submit@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 ) id 1ntEAk-0008HD-JE for bug-gnu-emacs@gnu.org; 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 ) id 1ntEAi-0005Sx-Ht for bug-gnu-emacs@gnu.org; Mon, 23 May 2022 15:56:58 -0400 Received: by mail-pj1-x102d.google.com with SMTP id v5-20020a17090a7c0500b001df84fa82f8so246222pjf.5 for ; 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 Date: Mon, 23 May 2022 12:56:17 -0700 Message-ID: Content-Type: multipart/alternative; boundary="000000000000e9eccc05dfb33d36" Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=peter.ludemann@gmail.com; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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
When I try to kill an emacs server from the command line by:
= =C2=A0 =C2=A0emacsclient -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 becaus= e there isn't any screen when using "emacsclient -e".

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.

Probably not relevant, but including = for completeness:

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:
=C2=A0
(defun my-exit ()
=C2=A0 (or (daemon= p)
=C2=A0 =C2=A0 =C2=A0 (yes-or-no-p "Really kill Emacs? ")))<= br>


In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit= , Xaw3d scroll bars)
=C2=A0of 2022-05-21 built on penguin
Repository = revision: 208102fa470e3417320062cdb48a9967d80bf092
Repository branch: ma= ster
System Description: Debian GNU/Linux 11 (bullseye)

Configure= d using:
=C2=A0'configure --prefix=3D/home/peter/.local --with-gnutl= s
=C2=A0PKG_CONFIG_PATH=3D/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_B= ARS X11 XAW3D XDBE
XFT XIM XPM LUCID ZLIB

Important settings:
= =C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-un= ix

Major mode: Apropos

Minor modes in effect:
=C2=A0 globa= l-auto-revert-mode: t
=C2=A0 display-time-mode: t
=C2=A0 savehist-mod= e: t
=C2=A0 desktop-save-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 glo= bal-eldoc-mode: t
=C2=A0 show-paren-mode: t
=C2=A0 electric-indent-mo= de: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 fi= le-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lo= ck-mode: t
=C2=A0 buffer-read-only: t
=C2=A0 column-number-mode: t=C2=A0 line-number-mode: t
=C2=A0 transient-mark-mode: t
=C2=A0 auto= -composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compr= ession-mode: t

Load-path shadows:
~/src/pykythe/emacs/prolog hide= s /home/peter/.local/share/emacs/29.0.50/lisp/progmodes/prolog

Featu= res:
(shadow sort mail-extr emacsbug message yank-media rmc puny direddired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
g= nus-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-uti= l apropos time-date term/xterm xterm finder-inf
package browse-url url u= rl-proxy url-privacy url-expand url-methods
url-history url-cookie url-d= omsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio e= ieio-core cl-macs eieio-loaddefs
password-cache json map url-vars cl-ext= ra help-mode seq gv subr-x
byte-opt bytecomp byte-compile cconv autoreve= rt filenotify grep compile
text-property-search comint ansi-color ring c= us-load time savehist
desktop frameset cl-loaddefs cl-lib iso-transl too= ltip eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type e= lisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fon= tset 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-co= re
term/tty-colors frame minibuffer nadvice simple cl-generic cham georg= ian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
= japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
et= hiopic indian cyrillic chinese composite emoji-zwj charscript charprop
c= ase-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preload= ed 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)
=C2=A0(symbols 48 9960 1)=
=C2=A0(strings 32 29163 1620)
=C2=A0(string-bytes 1 904097)
=C2= =A0(vectors 16 15493)
=C2=A0(vector-slots 8 175522 6636)
=C2=A0(float= s 8 79 477)
=C2=A0(intervals 56 533 0)
=C2=A0(buffers 992 12))
--000000000000e9eccc05dfb33d36-- From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 May 2022 07:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Peter Ludemann Cc: 55599@debbugs.gnu.org Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.165337770819573 (code B ref 55599); Tue, 24 May 2022 07:36:01 +0000 Received: (at 55599) by debbugs.gnu.org; 24 May 2022 07:35:08 +0000 Received: from localhost ([127.0.0.1]:50878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntP4O-00055d-1z for submit@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 ) id 1ntP4L-000552-QF for 55599@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 References: Date: Tue, 24 May 2022 09:34:57 +0200 In-Reply-To: (Peter Ludemann's message of "Mon, 23 May 2022 12:56:17 -0700") Message-ID: <87r14jo02m.fsf@gmx.de> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Peter Ludemann 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. From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Peter Ludemann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 May 2022 09:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: 55599@debbugs.gnu.org Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.16533846246899 (code B ref 55599); Tue, 24 May 2022 09:31:01 +0000 Received: (at 55599) by debbugs.gnu.org; 24 May 2022 09:30:24 +0000 Received: from localhost ([127.0.0.1]:51066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntQrw-0001nD-C4 for submit@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 ) id 1ntQrs-0001mw-Ai for 55599@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@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: <87r14jo02m.fsf@gmx.de> In-Reply-To: <87r14jo02m.fsf@gmx.de> From: Peter Ludemann Date: Tue, 24 May 2022 02:29:37 -0700 Message-ID: Content-Type: multipart/alternative; boundary="0000000000009afd5005dfbe9aaa" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 wrote: > Peter Ludemann 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
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.)

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).

=
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.

On Tue, 24 May 2022 at 00:34, Michael Albi= nus <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:
>=C2=A0 =C2=A0 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 (bel= ow
> the mode line in the screen), which of course isn't visible from t= he
> command line because there isn't any screen when using "emacs= client -e".
>
> This is a follow-up to bug 55560, where it was suggested that kill-ema= cs 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

=C2=A0 emacsclient -e '(save-buffers-kill-emacs t)'

Best regards, Michael.
--0000000000009afd5005dfbe9aaa-- From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 May 2022 11:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Peter Ludemann Cc: michael.albinus@gmx.de, 55599@debbugs.gnu.org Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.1653391899406 (code B ref 55599); Tue, 24 May 2022 11:32:01 +0000 Received: (at 55599) by debbugs.gnu.org; 24 May 2022 11:31:39 +0000 Received: from localhost ([127.0.0.1]:51137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntSlH-00006B-27 for submit@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 ) id 1ntSlC-0008PJ-HK for 55599@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 ) 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 ) 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@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Peter Ludemann on Tue, 24 May 2022 02:29:37 -0700) References: <87r14jo02m.fsf@gmx.de> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 55599@debbugs.gnu.org > From: Peter Ludemann > 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. From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Peter Ludemann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 May 2022 18:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Michael Albinus , 55599@debbugs.gnu.org Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.165376248814746 (code B ref 55599); Sat, 28 May 2022 18:29:01 +0000 Received: (at 55599) by debbugs.gnu.org; 28 May 2022 18:28:08 +0000 Received: from localhost ([127.0.0.1]:38876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nv1AW-0003pl-2L for submit@debbugs.gnu.org; Sat, 28 May 2022 14:28:08 -0400 Received: from mail-pl1-f177.google.com ([209.85.214.177]:38703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nv1AS-0003pF-9c for 55599@debbugs.gnu.org; Sat, 28 May 2022 14:28:06 -0400 Received: by mail-pl1-f177.google.com with SMTP id n18so6890284plg.5 for <55599@debbugs.gnu.org>; Sat, 28 May 2022 11:28:04 -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=afE7Vxr8qLdVdkTUy6lxZoRfRPFBIqJx7vvUGWXU1Bg=; b=HGFDO6ioH707aaa/N9pbyKahLcIxgXzvzwqThqqSjYXL7rWcH21ZsPDllJv4M8ZMVR 89KBAFCk3PWb1/YcgW6zxSOIFn7q+lm+VTR/VbctMr+vkZ0ZMCBCtshOnRtyNPCgUtCd TWRmyvnCTh5DEp4BggIAZJu94fyEYDxDubRslATKYM/r10ncsEChMW29voq9aTiy0mCk QpiQCtvWZ64776di1Ewair793yWx594f9jBOzViTawl+5HgUoZy44lhcxz9Ka9xaM6Kv 9/4i5gsCQ0tYmGvIJ+JLD+Ouy+XafOhIsIwc5ssQJ6fydusmHSGU4N9gJT8DPAmUNgP0 L+RA== 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=afE7Vxr8qLdVdkTUy6lxZoRfRPFBIqJx7vvUGWXU1Bg=; b=kVgJPCQdY9fgUciu5rKwvujpKfL4PjVGkudD4t3S6tic1YYE+Cx71EbOC8XRVi4M01 qXWHxKh2VnOb5bmMdxlGtW7ipnmJDDKmL49qcr3YaWSRHkN1NR0E8cv9c4J8aVtcxE40 EeJY8aS2bbYHyGcCI1JLZ4wqVRv3a80B6TyMF9CPJR1UxLQVeHXfHmQhLl0VKElRh/fq Jckp5DzPXoof+eSvSTUQGL0OUu251baJimY8/fmALcBOvmuhh8oXjR1mp7fMd1yeRHl9 mTeYoLqVYporSoKNeIji0YOEDOwx6XibLkj2FIWMF6kmT/Rggc2AfQYoYwUQJfCRP0Th a7/g== X-Gm-Message-State: AOAM530C+lbXtwM1zwOfjHK96mf9pFAJerk2vlmB9AijslxCUxKlk/B8 k85ARe2an53LT8cf0XoM44XR5YtCbvIM318OuOw= X-Google-Smtp-Source: ABdhPJz6DSHkJcjfi7i3bz1QsI4w6PtLCgwy20eDAjz1RqR6Uy6YZ4SrwJpXpTrX6wROlWSg9TmRLYCI5JvVN3rLm5s= X-Received: by 2002:a17:902:854c:b0:159:a70:deca with SMTP id d12-20020a170902854c00b001590a70decamr49572956plo.142.1653762478360; Sat, 28 May 2022 11:27:58 -0700 (PDT) MIME-Version: 1.0 References: <87r14jo02m.fsf@gmx.de> <83k0ab5fqz.fsf@gnu.org> In-Reply-To: <83k0ab5fqz.fsf@gnu.org> From: Peter Ludemann Date: Sat, 28 May 2022 11:27:22 -0700 Message-ID: Content-Type: multipart/alternative; boundary="00000000000010cd4205e0169528" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000010cd4205e0169528 Content-Type: text/plain; charset="UTF-8" It seems that there is a way to get an interactive message to the terminal in batch mode ... During daemon startup (with an existing .emacs.desktop file), I get this on my terminal: bunzip2ing contrib-protobufs-2021-06-07-15-56.tbz2... bunzip2ing contrib-protobufs-2021-06-07-15-56.tbz2...done Parsing tar file... Parsing tar file...done Please type y, n, ! or i, or C-v/M-v to scroll: This seems to be from make-progress-reporter, which (if I read the code correctly) ends up calling (message "%s %s %s" text pulse-char suffix)). And that message displays interactively on the terminal. So, there is a way to have the messages from emacsclient --eval display on the terminal, but in some (most?) situations they don't. (The definition for message says: "In batch mode, the message is printed to the standard error stream, followed by a newline.") So, I infer that yes-or-no-p should just use "message" and all will be fine. (Another example of a prompt that should go to the terminal but doesn't: "Active processes exist; kill them and exit anyway" should use "message".) As to your suggested feature request: I'm not requesting termination of the server non-interactively - I'm just saying that when the shutdown command comes from the command line, the messages be output to the terminal, the way "message" does and not the way yes-or-no-p does. On Tue, 24 May 2022 at 04:31, Eli Zaretskii wrote: > > Cc: 55599@debbugs.gnu.org > > From: Peter Ludemann > > 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. > --00000000000010cd4205e0169528 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It seems that there is a way = to get an interactive message to the terminal in batch mode ...

<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">=C2=A0= =C2=A0 During daemon startup (with an existing .emacs.desktop file), I get= this on my terminal:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 bunzip2ing contrib-p= rotobufs-2021-06-07-15-56.tbz2...=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 bunz= ip2ing contrib-protobufs-2021-06-07-15-56.tbz2...done
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 Parsing tar file...
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Parsing tar = file...done
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Please type y, n, ! or i, or C-v= /M-v to scroll:=C2=A0

This seems to be from=C2=A0make-progress-rep= orter, which (if I read the code correctly) ends up calling=C2=A0(message &= quot;%s %s %s" text pulse-char suffix)). And that message displays int= eractively on the terminal.

So, there is a way to have the messages fr= om emacsclient --eval display on the terminal, but in some (most?) situatio= ns they don't. (The definition for message says: "In batch mode, the message is printe= d to the standard error stream,=C2=A0<= /span>followed by a = newline.") So, I infer that yes-o= r-no-p should just use "message" and all will be fine. (Another e= xample of a prompt that should go to the terminal but doesn't:= =C2=A0"Active processes exist; kill them and exit anyway" should = use "message".)

As to your suggested=C2=A0feature request: I= 'm not requesting termination of the server non-interactively - I'm= just saying that when the shutdown command comes from the command line, th= e messages be output to the terminal, the way "message" does and = not the way yes-or-no-p does.

On Tue, 24 May 2022 = at 04:31, Eli Zaretskii <eliz@gnu.org> wrote:
>= ; Cc: 55599@debb= ugs.gnu.org
> From: Peter Ludemann <peter.ludemann@gmail.com>
> Date: Tue, 24 May 2022 02:29:37 -0700
>
> I don't want to unconditionally save buffers; I want to conditiona= lly 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&= #39;s too much trouble to fix) -- it seems that
> when "emacsclient -e" is used, any prompts go to the non-exi= stent 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<= br> interact with the user.=C2=A0 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.=C2=A0 So I'm unsure what issues are being discussed her= e
(but see below).

> Also, save-buffers-kill-emacs does two things: (conditionally) saves t= he buffers and deletes the
> ~/.emacs.d/.emacs.desktop.lock file. On the other hand, the lower leve= l 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.=C2=A0 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 o= f
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.=C2=A0 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.
--00000000000010cd4205e0169528-- From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 May 2022 19:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Peter Ludemann Cc: michael.albinus@gmx.de, 55599@debbugs.gnu.org Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.165376596520237 (code B ref 55599); Sat, 28 May 2022 19:27:01 +0000 Received: (at 55599) by debbugs.gnu.org; 28 May 2022 19:26:05 +0000 Received: from localhost ([127.0.0.1]:38917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nv24b-0005GK-AB for submit@debbugs.gnu.org; Sat, 28 May 2022 15:26:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nv24X-0005Fq-JF for 55599@debbugs.gnu.org; Sat, 28 May 2022 15:26:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33206) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nv24S-0002ab-2H; Sat, 28 May 2022 15:25:56 -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=JWXtaAhT/XvqSq5WGH2ETVITVbFCPdzryQ7CsGMSoEE=; b=dmeoeGP7ipb8 6Tl+MO0/k7quTtQLNE7YPypWL7x8YTwitryKqPAAAweHN10WeyXknCdavSB6HYLok1PxKUaAOnPCC 5S2K4yfuC/uLpHFHAXYP6elKTyQmSnkVtFse0TXf0jkqugTZlD3P8SGWFud05x0mXZjXZWeTPl5Fa xJZzV06Tet0nzY6GsgNWFYtfmmxsHj1E/wNRQj+pU2eANc4+swmCdy96XgJ8xjIX6o0g2ARWs31Lz 3CB/YN+pV69D0xvFcn7qoJEascJnuffC3Pmet/P1jsVhjDuwwbPyoxESY25k9VKWUDvjeu/49XPtg pHVlCznT2TjK9qLoumS9pA==; Received: from [87.69.77.57] (port=3654 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nv24R-0006gH-Gv; Sat, 28 May 2022 15:25:55 -0400 Date: Sat, 28 May 2022 22:25:53 +0300 Message-Id: <83fsktlari.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Peter Ludemann on Sat, 28 May 2022 11:27:22 -0700) References: <87r14jo02m.fsf@gmx.de> <83k0ab5fqz.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Peter Ludemann > Date: Sat, 28 May 2022 11:27:22 -0700 > Cc: Michael Albinus , 55599@debbugs.gnu.org > > It seems that there is a way to get an interactive message to the terminal in batch mode ... > > During daemon startup (with an existing .emacs.desktop file), I get this on my terminal: > > bunzip2ing contrib-protobufs-2021-06-07-15-56.tbz2... > bunzip2ing contrib-protobufs-2021-06-07-15-56.tbz2...done > Parsing tar file... > Parsing tar file...done > Please type y, n, ! or i, or C-v/M-v to scroll: > > This seems to be from make-progress-reporter, which (if I read the code correctly) ends up calling > (message "%s %s %s" text pulse-char suffix)). And that message displays interactively on the terminal. During startup of the daemon, it can still have its original standard output/error streams (and even that is not guaranteed if it is not invoked from the shell prompt), but once it starts, the standard output/error streams are closed b y the system and are no longer available, AFAIK. > So, there is a way to have the messages from emacsclient --eval display on the terminal, but in some > (most?) situations they don't. (The definition for message says: "In batch mode, the message is printed to > the standard error stream, followed by a newline.") So, I infer that yes-or-no-p should just use "message" > and all will be fine. yes-or-no-p needs to ask a question and get the response. > As to your suggested feature request: I'm not requesting termination of the server non-interactively - I'm just > saying that when the shutdown command comes from the command line, the messages be output to the > terminal, the way "message" does and not the way yes-or-no-p does. The terminal is still taken by the client frame it displays. From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 May 2022 19:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: peter.ludemann@gmail.com Cc: michael.albinus@gmx.de, 55599@debbugs.gnu.org Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.165376676621523 (code B ref 55599); Sat, 28 May 2022 19:40:02 +0000 Received: (at 55599) by debbugs.gnu.org; 28 May 2022 19:39:26 +0000 Received: from localhost ([127.0.0.1]:38947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nv2HW-0005b5-Fn for submit@debbugs.gnu.org; Sat, 28 May 2022 15:39:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nv2HT-0005as-BD for 55599@debbugs.gnu.org; Sat, 28 May 2022 15:39:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nv2HL-0004Qe-GM; Sat, 28 May 2022 15:39:18 -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=yWXJvLe44Wsyif8pAJvs1hMWU4AtmCkbrvpUr3h0GsU=; b=QMkHlvPyaqUG fSMDLC0OCKhrbfixd4/IN7G7RNOTetZoMPwKBnp8adzToDEE6mDJTZG/9k8e1Ohe7v8ZHXXca6pJc S48LasmjfZzz6hcFRXh/400BrZI117r/XN+NTkoiIMUjg50yMMs+3+ZkCZGGYCEUF3L+24pXJXgZn QfFw4psJs6aakx7xyiSEBr26YyU9ScZyVgUI/a0uXUbfMU7pZITbe/5CWXAcsww7SZgh6MwJJV9ZQ ZV1ka+wu40xKaR4pxYcoMi3DqifJuTXhvufqxtvVR8f6bF2ZCHPNEG/Smka6JBbJd08S1sYnE6rc2 NPZNLs99RbU9j2I1KY8Gqg==; Received: from [87.69.77.57] (port=4470 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nv2HK-0006bt-Vr; Sat, 28 May 2022 15:39:15 -0400 Date: Sat, 28 May 2022 22:39:13 +0300 Message-Id: <83czfxla5a.fsf@gnu.org> From: Eli Zaretskii 4From: Eli Zaretskii In-Reply-To: <83fsktlari.fsf@gnu.org> (message from Eli Zaretskii on Sat, 28 May 2022 22:25:53 +0300) References: <87r14jo02m.fsf@gmx.de> <83k0ab5fqz.fsf@gnu.org> <83fsktlari.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: michael.albinus@gmx.de, 55599@debbugs.gnu.org > Date: Sat, 28 May 2022 22:25:53 +0300 > From: Eli Zaretskii > > > As to your suggested feature request: I'm not requesting termination of the server non-interactively - I'm just > > saying that when the shutdown command comes from the command line, the messages be output to the > > terminal, the way "message" does and not the way yes-or-no-p does. > > The terminal is still taken by the client frame it displays. Sorry, that was incorrect, because I was confused about the situation to which you were alluding. The correct response is: when a daemon Emacs doesn't show any frames, it has no way of communicating with the user, because the standard streams are no longer available, AFAIK. From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Peter Ludemann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 May 2022 19:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Michael Albinus , 55599@debbugs.gnu.org Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.165402571331678 (code B ref 55599); Tue, 31 May 2022 19:36:01 +0000 Received: (at 55599) by debbugs.gnu.org; 31 May 2022 19:35:13 +0000 Received: from localhost ([127.0.0.1]:48949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw7e2-0008Eo-Nc for submit@debbugs.gnu.org; Tue, 31 May 2022 15:35:13 -0400 Received: from mail-pj1-f53.google.com ([209.85.216.53]:33908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw7dx-0008E9-Vi for 55599@debbugs.gnu.org; Tue, 31 May 2022 15:35:09 -0400 Received: by mail-pj1-f53.google.com with SMTP id nn3-20020a17090b38c300b001e0e091cf03so2272274pjb.1 for <55599@debbugs.gnu.org>; Tue, 31 May 2022 12:35:05 -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=m18ZSIpmOdxtPVRSTbQzwBhKfWx81eoQquwcbeScZ58=; b=HPF7ll40fS5xhCOOIzaiDdR6aYPqQFfLj7AQfMEBsG/wxVqv5br7B9S1/SgRDiv3Bt Wd7J0YwNH2zexT1ZXfPgtOtRMuQSHLrxUbN10dTUBMyOKV7RcyN0huz2iR7P9M8gwy3E z5ypVA+5DB0wQRI4QFQCPyJwuIQOx0BchUnZRlS2JDxBQI9QyMMWLXage8EPQU2HejVN 19xMdaosvJmCLQqsRp8SmubUSFO/xJYcliOi7vQQUxkw/adY85NNPZvVyi5YcwhHs0/H FJUJiHqWk/giCql0dkofxu04bj4wOz5ArpGXYZSOxjfJ+XN0oHigAPNJ9rlt6AKR75nO F1AA== 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=m18ZSIpmOdxtPVRSTbQzwBhKfWx81eoQquwcbeScZ58=; b=DP9+arm7/QPjtTGk7r0oMYquIa8XCNzQM4s8CDJfxV/T3MzMLdH5MJaTQkyWb90Jzg 050pewUON91F2675SA8bFLXdcjqBNjOsEHTbMBym+X8Wxm33cYY66UCoaH0N2XJ2bM2B vTvXQuAzJzyloHrIo3rNxKq7DHgWcc+ewjcDOx4PeFtznJvvRBzXYjxBrvC3LozP8Wsw s2VFvU7V6mUgwak3VHttcMg4v/FkPJjm/OignsW9jPe5YS1gHu52QqRavH9vefz9jOib dfhSYA+Lx3Spdz5fBkOhw1dkxtqASnHiJiS2DlfvyVgGRI0pxlavZDapLAqNAbZKW1WD Z+6A== X-Gm-Message-State: AOAM533dOnNNI5vEUIO4L/cahplttsMXjjPzi6opYOlgTZMQTXfuSrSQ rULqPrS1ozRUiH5/SuJ9sDlSODu5eZzTTQwz4Kg= X-Google-Smtp-Source: ABdhPJz12+ygQM5Po7JP1mWGIhpq03vBRgn6+hBqb/fSqHOgWPWbQUzfzZVVZMI5zJVQtYpWh+ENDp3mihghtYOL6AA= X-Received: by 2002:a17:90a:62cb:b0:1dd:2ddd:ba8c with SMTP id k11-20020a17090a62cb00b001dd2dddba8cmr30433170pjs.226.1654025699956; Tue, 31 May 2022 12:34:59 -0700 (PDT) MIME-Version: 1.0 References: <87r14jo02m.fsf@gmx.de> <83k0ab5fqz.fsf@gnu.org> <83fsktlari.fsf@gnu.org> <83czfxla5a.fsf@gnu.org> In-Reply-To: <83czfxla5a.fsf@gnu.org> From: Peter Ludemann Date: Tue, 31 May 2022 12:34:23 -0700 Message-ID: Content-Type: multipart/alternative; boundary="0000000000004b9dc305e053de22" X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000004b9dc305e053de22 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable There's probably a solution to this, but it could be a lot of work for a small benefit. If emacsclient --eval could pass in the stdin/stdout/stderr from the terminal to the daemon, then things would work as I expect. But the work-around is easy: emacsclient -c -e '...' However, I noticed that stderr appears to be available, when there's an error: $ emacsclient --eval '(man fprintf)' *ERROR*: Symbol=E2=80=99s value as variable is void: fprintf and also when it works properly: $ emacsclient --eval "(list-buffers)" # On Sat, 28 May 2022 at 12:39, Eli Zaretskii wrote: > > Cc: michael.albinus@gmx.de, 55599@debbugs.gnu.org > > Date: Sat, 28 May 2022 22:25:53 +0300 > > From: Eli Zaretskii > > > > > As to your suggested feature request: I'm not requesting termination > of the server non-interactively - I'm just > > > saying that when the shutdown command comes from the command line, th= e > messages be output to the > > > terminal, the way "message" does and not the way yes-or-no-p does. > > > > The terminal is still taken by the client frame it displays. > > Sorry, that was incorrect, because I was confused about the situation > to which you were alluding. > > The correct response is: when a daemon Emacs doesn't show any frames, > it has no way of communicating with the user, because the standard > streams are no longer available, AFAIK. > --0000000000004b9dc305e053de22 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
There's probably a solution to this, but it could be a lot = of work for a small benefit.

If emacsclient --eval could pass in the= stdin/stdout/stderr from the terminal to the daemon, then things would wor= k as I expect. But the work-around is easy: emacsclient -c -e '...'=

However, I noticed that stderr appears to be available, when there= 9;s an error:

$ emacsclient --eval '(man fprintf)'
*ERROR*:= Symbol=E2=80=99s value as variable is void: fprintf

and also when= it works properly:

$ emacsclient --eval "(list-buffers)"#<window 194 on *Buffer List*>




On Sat, 28 Ma= y 2022 at 12:39, Eli Zaretskii <eliz@gnu= .org> wrote:
> Cc: mi= chael.albinus@gmx.de, 55599@debbugs.gnu.org
> Date: Sat, 28 May 2022 22:25:53 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> > As to your suggested feature request: I'm not requesting term= ination of the server non-interactively - I'm just
> > saying that when the shutdown command comes from the command line= , the messages be output to the
> > terminal, the way "message" does and not the way yes-or= -no-p does.
>
> The terminal is still taken by the client frame it displays.

Sorry, that was incorrect, because I was confused about the situation
to which you were alluding.

The correct response is: when a daemon Emacs doesn't show any frames, it has no way of communicating with the user, because the standard
streams are no longer available, AFAIK.
--0000000000004b9dc305e053de22-- From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jun 2022 02:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Peter Ludemann Cc: michael.albinus@gmx.de, 55599@debbugs.gnu.org Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.165405064410125 (code B ref 55599); Wed, 01 Jun 2022 02:31:02 +0000 Received: (at 55599) by debbugs.gnu.org; 1 Jun 2022 02:30:44 +0000 Received: from localhost ([127.0.0.1]:49304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwE8B-0002dF-Sx for submit@debbugs.gnu.org; Tue, 31 May 2022 22:30:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:32846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwE87-0002cx-V5 for 55599@debbugs.gnu.org; Tue, 31 May 2022 22:30:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwE82-0005SC-Lg; Tue, 31 May 2022 22:30:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=HrZC7mq2ADPhnKt0dbFQGHC893waqPYuZaBGnToxS1M=; b=g8Y3oJq69L5rvk+CCTvj 0ArJWGY0bFF25Y9FZUcGiX3jdNfxPBcojLtcVmlfoAjB3iBt6vYy3/uRNiSVpDPSk9rLLSGpk7I/E BRu3RLxTGGPMVQwT9eZvZsOBOgESAXZVTAajrb7ZFjPRdg+rlBanxVcdwsxeC9Cy20H6s2ooDa0+r ccAbuxKHzFjAtQFUnTgK3teQp0EOOqfJaa7w8bAra6e2gY/sqCndTjMyHsZEnOPNJPH/abuc8xm/V sgc8llnTySEXhRGiDtN22pmrReD4pTUrHswX/wb6NAiUQOgKwLQGqQXOplZkTGj0a7GYwHJxs2Tyr Vrwc0FbG4vNUCg==; Received: from [87.69.77.57] (port=2642 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwE81-0002JX-Ri; Tue, 31 May 2022 22:30:34 -0400 Date: Wed, 01 Jun 2022 05:30:39 +0300 Message-Id: <83mtexglo0.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Peter Ludemann on Tue, 31 May 2022 12:34:23 -0700) References: <87r14jo02m.fsf@gmx.de> <83k0ab5fqz.fsf@gnu.org> <83fsktlari.fsf@gnu.org> <83czfxla5a.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Peter Ludemann > Date: Tue, 31 May 2022 12:34:23 -0700 > Cc: Michael Albinus , 55599@debbugs.gnu.org > > There's probably a solution to this, but it could be a lot of work for a small benefit. Could you please describe the problem for which you are looking for a solution? During this discussion, you presented several issues that bothered you, so I'm no longer sure which of those we are now talking about. > However, I noticed that stderr appears to be available, when there's an error: > > $ emacsclient --eval '(man fprintf)' > *ERROR*: Symbol’s value as variable is void: fprintf > > and also when it works properly: > > $ emacsclient --eval "(list-buffers)" > # That's emacsclient's stderr, not that of the daemon. And it can only print messages, not receive input. From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Peter Ludemann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jun 2022 17:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Michael Albinus , 55599@debbugs.gnu.org Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.16541060904177 (code B ref 55599); Wed, 01 Jun 2022 17:55:02 +0000 Received: (at 55599) by debbugs.gnu.org; 1 Jun 2022 17:54:50 +0000 Received: from localhost ([127.0.0.1]:51756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwSYU-00015J-CW for submit@debbugs.gnu.org; Wed, 01 Jun 2022 13:54:50 -0400 Received: from mail-pg1-f177.google.com ([209.85.215.177]:34695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwSYP-000152-LQ for 55599@debbugs.gnu.org; Wed, 01 Jun 2022 13:54:49 -0400 Received: by mail-pg1-f177.google.com with SMTP id g184so2584548pgc.1 for <55599@debbugs.gnu.org>; Wed, 01 Jun 2022 10:54:45 -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=EHguFdReDcJNQX/a2OxNhDrWtRlbuWKxD72VXnYoq9c=; b=dJjmCqwWk3ttyPsgIrrEQItA+7UX3xF4h/dtK9C6UngZG6m8fMRom3uW1JeS007CSL okSu1J3xAmFqqlyAdOdLik6EU/XGF34hqhG/QRGkGkLLOak1/uTncs36gCZSixuPhnfY s/NjaEy9cq1RDFmHJuoq94EO4ocv47bryZ9HMvyMnpzkdPNpfXpUAvqKl1cl1kljqSAa hyXcPSTS6eWZbbXG7kT8jhiMdWpiZK99iqi6NwtEOwrVhvPp6UfeXOPRhlLxlrRxYdTW oov+SiFlC+ySNDsMaLUMdxP+MVmR6kgHKB5udSUrLRXHPDpf25/0JlfeLiN1lgfPNKbu Y8EQ== 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=EHguFdReDcJNQX/a2OxNhDrWtRlbuWKxD72VXnYoq9c=; b=LhyzQ8MVZ7tGGDngw6yZAPBoJqWd5OWTowVPdhwqilEqt2wzUNNldqFYx56p09YtYV CB/Wx+OrbccePP+j20CpdiFuaaP9rwSSNWfboRxUjds+PniZhEJCptEdlXQ70XonFhO+ EzONo7Af71iVD7KS4BNVvQC2Fl/xJthPlhCFg2XYedonG9c2m1axDXeTR81zjxIbqQyd S1z6uWPeKDl4C4EKuN1f+U7xy1OXXVX/Fzc15pVrncIJioux+S1zpyXLzz2nuhFoRaix Y8CFRF0JM54D/qNYfL20ZxcNEYt68GvHvfGdiJG3bCCmzJZMRfkEwQ843IqGsU98u0vU 4zxQ== X-Gm-Message-State: AOAM533ej7gOSw9ZfDk9faqoufaW13Y7dOj8PameoUCqRhXKWO7oiwvH pt76DtWfqo1+WBOB6TaVg5N0MVpCcdgL71/Q9Eg= X-Google-Smtp-Source: ABdhPJyZCKcfLwAaDnSm/ArrxcSU7OmXp6wrzeleOF7vqm8ELm0ZAEsCPqFQUxw8Dtry9+KIFjOwhLI4QGcmx6ql2Uo= X-Received: by 2002:a05:6a00:ac3:b0:51b:9803:dc01 with SMTP id c3-20020a056a000ac300b0051b9803dc01mr770482pfl.8.1654106079535; Wed, 01 Jun 2022 10:54:39 -0700 (PDT) MIME-Version: 1.0 References: <87r14jo02m.fsf@gmx.de> <83k0ab5fqz.fsf@gnu.org> <83fsktlari.fsf@gnu.org> <83czfxla5a.fsf@gnu.org> <83mtexglo0.fsf@gnu.org> In-Reply-To: <83mtexglo0.fsf@gnu.org> From: Peter Ludemann Date: Wed, 1 Jun 2022 10:54:02 -0700 Message-ID: Content-Type: multipart/alternative; boundary="0000000000004aa70605e0669541" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000004aa70605e0669541 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable As Eli requested, restating what I'm asking ... 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. However, this is a fairly minor improvement, given that "emacsclient -c -e" works as expected, so probably it's not worth spending time on. (And the documentation/emacswiki could be improved so that other people like me don't bother you.) On Tue, 31 May 2022 at 19:30, Eli Zaretskii wrote: > > From: Peter Ludemann > > Date: Tue, 31 May 2022 12:34:23 -0700 > > Cc: Michael Albinus , 55599@debbugs.gnu.org > > > > There's probably a solution to this, but it could be a lot of work for = a > small benefit. > > Could you please describe the problem for which you are looking for a > solution? During this discussion, you presented several issues that > bothered you, so I'm no longer sure which of those we are now talking > about. > > > However, I noticed that stderr appears to be available, when there's an > error: > > > > $ emacsclient --eval '(man fprintf)' > > *ERROR*: Symbol=E2=80=99s value as variable is void: fprintf > > > > and also when it works properly: > > > > $ emacsclient --eval "(list-buffers)" > > # > > That's emacsclient's stderr, not that of the daemon. And it can only > print messages, not receive input. > --0000000000004aa70605e0669541 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
As Eli requested, restating what I'm asking ...

<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">I star= t the emacs daemon from a terminal by:
=C2=A0 =C2=A0 emacs --daemon

Du= ring startup, there might be some prompts (e.g., I get a pagination=C2=A0pr= ompt from parsing a tar file, when emacs is loading my last session's f= iles), and I can deal with them at the terminal.

When I shutdown the e= macs daemon, I would like to also do this at the terminal:
=C2=A0 =C2=A0 e= macsclient -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:
=C2=A0 =C2=A0 emacsclient -c -e '(save-buffers= -kill-emacs)'
and that lets me=C2=A0see the prompts in the minibuffer.<= /div>
=
However, it seems that "emacsclient -e" has access to the te= rminal's stderr.
Evidence: I get an error message at the terminal (not = in a minibuffer) if I do something with an error, such as
=C2=A0 =C2=A0 e= macsclient -e '(man fprintf)'

If stderr is being passed in to = the evaluation code in daemon mode, then it would be nice to also have stdi= n passed in, which would allow=C2=A0interaction at the terminal.

=
Howev= er, this is a fairly minor improvement, given that "emacsclient -c -e&= quot; works as expected, so probably it's not worth spending time on. (= And the documentation/emacswiki could be improved so that other people like= me don't bother you.)


<= div dir=3D"ltr" class=3D"gmail_attr">On Tue, 31 May 2022 at 19:30, Eli Zare= tskii <eliz@gnu.org> wrote:
> From: Peter Lude= mann <pete= r.ludemann@gmail.com>
> Date: Tue, 31 May 2022 12:34:23 -0700
> Cc: Michael Albinus <michael.albinus@gmx.de>, 55599@debbugs.gnu.org
>
> There's probably a solution to this, but it could be a lot of work= for a small benefit.

Could you please describe the problem for which you are looking for a
solution?=C2=A0 During this discussion, you presented several issues that bothered you, so I'm no longer sure which of those we are now talking about.

> However, I noticed that stderr appears to be available, when there'= ;s an error:
>
> $ emacsclient --eval '(man fprintf)'
> *ERROR*: Symbol=E2=80=99s value as variable is void: fprintf
>
> and also when it works properly:
>
> $ emacsclient --eval "(list-buffers)"
> #<window 194 on *Buffer List*>

That's emacsclient's stderr, not that of the daemon.=C2=A0 And it c= an only
print messages, not receive input.
--0000000000004aa70605e0669541-- From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jun 2022 19:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Peter Ludemann Cc: michael.albinus@gmx.de, 55599@debbugs.gnu.org Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.165411313125281 (code B ref 55599); Wed, 01 Jun 2022 19:53:02 +0000 Received: (at 55599) by debbugs.gnu.org; 1 Jun 2022 19:52:11 +0000 Received: from localhost ([127.0.0.1]:51945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwUO3-0006Zh-4L for submit@debbugs.gnu.org; Wed, 01 Jun 2022 15:52:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwUO1-0006ZS-CF for 55599@debbugs.gnu.org; Wed, 01 Jun 2022 15:52:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42970) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwUNw-0001Sk-2B; Wed, 01 Jun 2022 15:52:04 -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=WNd9QyOnvpiTAFUDgBOp55Wfr21OmnajHj7Io976c5k=; b=OCdOnU7AzYGw lh432+ojUXmXbuNLLmcaG02c1b9l1JySYpm5VCMmJvHIh2w1G9y9gpDySPbM5TmIx7Nls0zEt0Z+U qresSkZ3NFukc93zkvrqexgKQ/eXm5YkpzIoEmbMkqPScpZNxBLHRVtASKLp3Q8P8wGN0hjOVXQzb oyV2f0e9tbe/rW8tS6Al86Vgnur4zGOtpLrs1wGhOMQs+Cc/NYqGvFlFmb46icGOkJ6T6TsfyuM25 0lSWgtJpwedbO/+ZGDBTwnSiku7yOZ8F+x8xp/T1uDPClw5VxpTp5hQcOsvocrIeOCvfrJSrRbzKu GUdC6kHhm26DaTFdCRbZRg==; Received: from [87.69.77.57] (port=3130 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwUNv-0003is-0K; Wed, 01 Jun 2022 15:52:03 -0400 Date: Wed, 01 Jun 2022 22:52:11 +0300 Message-Id: <83mtewf9g4.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Peter Ludemann on Wed, 1 Jun 2022 10:54:02 -0700) References: <87r14jo02m.fsf@gmx.de> <83k0ab5fqz.fsf@gnu.org> <83fsktlari.fsf@gnu.org> <83czfxla5a.fsf@gnu.org> <83mtexglo0.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Peter Ludemann > Date: Wed, 1 Jun 2022 10:54:02 -0700 > Cc: Michael Albinus , 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. From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Peter Ludemann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jun 2022 20:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Michael Albinus , 55599@debbugs.gnu.org Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.165411392726678 (code B ref 55599); Wed, 01 Jun 2022 20:06:02 +0000 Received: (at 55599) by debbugs.gnu.org; 1 Jun 2022 20:05:27 +0000 Received: from localhost ([127.0.0.1]:51956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwUas-0006wD-P2 for submit@debbugs.gnu.org; Wed, 01 Jun 2022 16:05:27 -0400 Received: from mail-pj1-f46.google.com ([209.85.216.46]:54979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwUaq-0006vx-On for 55599@debbugs.gnu.org; Wed, 01 Jun 2022 16:05:25 -0400 Received: by mail-pj1-f46.google.com with SMTP id j7so3002332pjn.4 for <55599@debbugs.gnu.org>; Wed, 01 Jun 2022 13:05:24 -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=i9jf48QCAYVEulhYELXc8qF8V7nKGy66KS8TtvGfHiQ=; b=V+kQF4+0MGRmQsMJ5fAbON4sTf4dM3ywhZEqEePu9iDDudhy7xTKTb2iEiByPkJV3+ cHmE0iZ7R8zCtU8dP/PuoBSS4gtJnZ/X7qeps5cSqFeTUL/Ik0AUxn6tE9ahmP7vzFUe VEaUnZ7c9g7AbrjnK5lcjk4NVrK53FdUuM6yXoxXE3QDSzGu8qx2jNIDPWRPlby/aeuz 3xGpXPJaaxUo6TEXCsd2Vv5JJObeX6kBKDn5XQBFa1w1oAlji45LOYPzYJQJw6AHuq+1 xYrMGxhDUPBCuzt5+y4TG96yUxhh+KbXXh1G4+tfGkgXxl8owNorh8/QWm/uJAyNDF1E 2Vfg== 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=i9jf48QCAYVEulhYELXc8qF8V7nKGy66KS8TtvGfHiQ=; b=qneJBfzBEW8ePNCe/4Eqgm/OsE3VPfr0NlsgPKSXnsjXw11G2FzTOt9/ww9EgfQ8kX nAz/qplChd2SaG9NoFFIGYNHrO5FZC1T6pyvISYguSYwIvPfcdQxDFHIHHfO/tofWHzz U+6W9wZAx3zFp44CsMnfgq/G5uFp0WYXH7s8JaYN85HkjbugW+P+GLJK5hXB85abp2Ut Or9OPMefpDcp/GNukv/Aq3uMQUq74lgkjHC1UstQSOCzR4WAS433z3M68B86DhK2Kc6x BSLUTlxRZzQI0hLnFdko7tMOFXKhcIunHUUnU4MgZFPTxaycrRLuRXCPRFjnHUx9GKWW MDhQ== X-Gm-Message-State: AOAM531qdHjt2zIG13tReSy4KWdP/+UxGmYCZAZ05WvT/OT1Vd/F1CED nvBAi3e0N7Q7tzCw32MTaEyleRj7GCOnaURtnxE= X-Google-Smtp-Source: ABdhPJx7m0eFIcUcxd73pqiMBu5ocuvlu3jPdOlSDkD23Rda0ap7cBe57zXeqage/EtBv332MKy2MBiJyHS+xIovZe0= X-Received: by 2002:a17:90b:1a88:b0:1dc:e4a1:a81e with SMTP id ng8-20020a17090b1a8800b001dce4a1a81emr36283519pjb.96.1654113918756; Wed, 01 Jun 2022 13:05:18 -0700 (PDT) MIME-Version: 1.0 References: <87r14jo02m.fsf@gmx.de> <83k0ab5fqz.fsf@gnu.org> <83fsktlari.fsf@gnu.org> <83czfxla5a.fsf@gnu.org> <83mtexglo0.fsf@gnu.org> <83mtewf9g4.fsf@gnu.org> In-Reply-To: <83mtewf9g4.fsf@gnu.org> From: Peter Ludemann Date: Wed, 1 Jun 2022 13:04:42 -0700 Message-ID: Content-Type: multipart/alternative; boundary="0000000000008bac0a05e0686805" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000008bac0a05e0686805 Content-Type: text/plain; charset="UTF-8" On Wed, 1 Jun 2022 at 12:52, Eli Zaretskii wrote: > > From: Peter Ludemann > > Date: Wed, 1 Jun 2022 10:54:02 -0700 > > Cc: Michael Albinus , 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) --0000000000008bac0a05e0686805 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, 1 Jun 2022 at 12:52, Eli Zar= etskii <eliz@gnu.org> wrote:
<= /div>
> From: Peter Lud= emann <pet= er.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:
>=C2=A0 =C2=A0 =C2=A0emacs --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 the= m at the terminal.
>
> When I shutdown the emacs daemon, I would like to also do this at the = terminal:
>=C2=A0 =C2=A0 =C2=A0emacsclient -e '(save-buffers-kill-emacs)'<= br> > but that doesn't work if there are any prompts (e.g., saving a fil= e or killing a shell process).
> A work-around is to do:
>=C2=A0 =C2=A0 =C2=A0emacsclient -c -e '(save-buffers-kill-emacs)= 9;
> and that lets me see the prompts in the minibuffer.
>
> However, it seems that "emacsclient -e" has access to the te= rminal's stderr.
> Evidence: I get an error message at the terminal (not in a minibuffer)= if I do something with an error, such as
>=C2=A0 =C2=A0 =C2=A0emacsclient -e '(man fprintf)'
>
> If stderr is being passed in to the evaluation code in daemon mode, th= en it would be nice to also have stdin
> passed in, which would allow interaction at the terminal.

stderr is not passed.=C2=A0 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.=C2=A0 For it to be
supported, we need a way to tell the server to wait for the client to
return the user's response.=C2=A0 Such a feature doesn't exist, AFA= IK, 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.=C2=A0
Feel free to close this bug/feature-request as "won= tfix". ;)

And, again, thank-you for your prompt and very helpful = responses (and your patience with someone who knows very little about the i= nternals of emacs)


=C2=A0
--0000000000008bac0a05e0686805-- From unknown Sun Jun 22 03:55:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Sep 2023 01:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Peter Ludemann Cc: Eli Zaretskii , Michael Albinus , 55599@debbugs.gnu.org Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.169456939817053 (code B ref 55599); Wed, 13 Sep 2023 01:44:01 +0000 Received: (at 55599) by debbugs.gnu.org; 13 Sep 2023 01:43:18 +0000 Received: from localhost ([127.0.0.1]:60354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgEuU-0004Qu-0w for submit@debbugs.gnu.org; Tue, 12 Sep 2023 21:43:18 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:54303) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgEuR-0004QX-EU for 55599@debbugs.gnu.org; Tue, 12 Sep 2023 21:43:16 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2bf6b37859eso78453991fa.0 for <55599@debbugs.gnu.org>; Tue, 12 Sep 2023 18:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694569384; x=1695174184; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=u5BAB/zaXb9XGzhibE9GEttD3FuPA0WAk7Mwx2DUyB0=; b=CV4NMUvSAjeWcFNobdvf4f1AFMYCJvKynDpsXLn3BXxuRoB6HWy/yWsC+AaYtk3tbh rXts2DIooaICSSIjNnw/Pf7MN14ukGQ3cy3ps2lcicBPBkFCF4f0lq5UXNjSN2ul1d9Q hIjYv6t/ygtZMeS1sz3HbYQON0KgnVM6+UXpLtYiGwH468Il5DoNFTEPmTT6nkoEro4k 231dvdCxKV6aBuSdwyVIVne4gFIJXwgVBpTLo6uxQXMvL1oe1LeIiVvFVnmPshOjldY9 c6jpaljcjBsA+65dXymDCMoS/u2G3BkLIoaiQVsF0uxm/B4Bs91h5+uLHdfuReqCqsow xZ6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694569384; x=1695174184; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=u5BAB/zaXb9XGzhibE9GEttD3FuPA0WAk7Mwx2DUyB0=; b=bApJ61DwfV/rnsSyp+Me2pXJqIPlw+XGk9eYSPMfMyD0b1NsWWj3Mn7pV0UbpJXpIE OyvLhqaDHo75aFqdaGe1BOKmmK41y1KtWnUG74fSvmQB1xEa/6sjwSq14No4ljFwzC52 Twwl2D2jQKdtMRjXXTb523fcrBu+Fyzron4YBYOq5nJN2vTxo+CXVYUPbD8AGqA8bj/G 2dcxhzpj1EhlB0X8ZO6WoNM3pacnGalBrJy7F7f8utJ0bxVS9/sNLCMByq9jDyqwqAyT 1AuUUjz3eJFmyhVdoSR/6jQTTdjdXsiw3nuSjDzMGY2CDBfGXIjfwVX5tOdC5wFU9vlH 4vEQ== X-Gm-Message-State: AOJu0YzzgFa0H818nF4siTbBuliNg1HNyx4HiY9H98jBv7Gl5V6BSh1o x+/tOLtOTATFgD9usTcJsGLHeMyNQVgwoneNEgA= X-Google-Smtp-Source: AGHT+IE2LrUHxMf9ZMloaWtBXJE17mIyAKFQvOnN/Dh1S6N9tZrjy6gbbXVQHAKWrGqeOf8xvMolr28bWXiRwPPqb4w= X-Received: by 2002:a2e:87c3:0:b0:2ba:18e5:106d with SMTP id v3-20020a2e87c3000000b002ba18e5106dmr1119618ljj.1.1694569384201; Tue, 12 Sep 2023 18:43:04 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 12 Sep 2023 18:43:03 -0700 From: Stefan Kangas In-Reply-To: (Peter Ludemann's message of "Wed, 1 Jun 2022 13:04:42 -0700") References: <87r14jo02m.fsf@gmx.de> <83k0ab5fqz.fsf@gnu.org> <83fsktlari.fsf@gnu.org> <83czfxla5a.fsf@gnu.org> <83mtexglo0.fsf@gnu.org> <83mtewf9g4.fsf@gnu.org> MIME-Version: 1.0 Date: Tue, 12 Sep 2023 18:43:03 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 55599 + wontfix close 55599 thanks Peter Ludemann writes: > Feel free to close this bug/feature-request as "wontfix". ;) Done. Thanks for the bug report.