From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#55599: save-buffers-kill-emacs doesn't give a visible prompt when called from command line Date: Wed, 01 Jun 2022 22:52:11 +0300 Message-ID: <83mtewf9g4.fsf@gnu.org> References: <87r14jo02m.fsf@gmx.de> <83k0ab5fqz.fsf@gnu.org> <83fsktlari.fsf@gnu.org> <83czfxla5a.fsf@gnu.org> <83mtexglo0.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21316"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael.albinus@gmx.de, 55599@debbugs.gnu.org To: Peter Ludemann Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 01 21:53:10 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 1nwUOz-0005Mc-Q8 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jun 2022 21:53:09 +0200 Original-Received: from localhost ([::1]:36050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwUOy-0007O6-GR for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jun 2022 15:53:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwUOs-0007N1-IZ for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58050) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwUOs-0001Zn-9k for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwUOs-0006az-9A for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:53:02 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.165411313125281 (code B ref 55599); Wed, 01 Jun 2022 19:53:02 +0000 Original-Received: (at 55599) by debbugs.gnu.org; 1 Jun 2022 19:52:11 +0000 Original-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 Original-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 Original-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==; Original-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 In-Reply-To: (message from Peter Ludemann on Wed, 1 Jun 2022 10:54:02 -0700) 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:233510 Archived-At: > 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.