From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Peter Ludemann Newsgroups: gmane.emacs.bugs Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Date: Mon, 23 May 2022 12:56:17 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e9eccc05dfb33d36" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5284"; mail-complaints-to="usenet@ciao.gmane.io" To: 55599@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 23 21:57:17 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntEB3-0001DS-K7 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 May 2022 21:57:17 +0200 Original-Received: from localhost ([::1]:41470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntEB2-0008He-86 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 May 2022 15:57:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntEAo-0008HN-OG for bug-gnu-emacs@gnu.org; Mon, 23 May 2022 15:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntEAo-0005TC-Fe for bug-gnu-emacs@gnu.org; Mon, 23 May 2022 15:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ntEAo-0001cm-En for bug-gnu-emacs@gnu.org; Mon, 23 May 2022 15:57:02 -0400 X-Loop: help-debbugs@gnu.org 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-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16533358216235 (code B ref -1); Mon, 23 May 2022 19:57:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 May 2022 19:57:01 +0000 Original-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 Original-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 Original-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 Original-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 Original-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) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232986 Archived-At: --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--