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: Tue, 31 May 2022 12:34:23 -0700 Message-ID: References: <87r14jo02m.fsf@gmx.de> <83k0ab5fqz.fsf@gnu.org> <83fsktlari.fsf@gnu.org> <83czfxla5a.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004b9dc305e053de22" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24097"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Albinus , 55599@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 31 21:37:05 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 1nw7fs-00067e-B8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 May 2022 21:37:04 +0200 Original-Received: from localhost ([::1]:53900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nw7fr-0001gr-Dy for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 May 2022 15:37:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nw7eu-0001ex-57 for bug-gnu-emacs@gnu.org; Tue, 31 May 2022 15:36:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nw7es-00014h-4O for bug-gnu-emacs@gnu.org; Tue, 31 May 2022 15:36:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nw7es-0008Fz-07 for bug-gnu-emacs@gnu.org; Tue, 31 May 2022 15:36: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: 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 Original-Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.165402571331678 (code B ref 55599); Tue, 31 May 2022 19:36:01 +0000 Original-Received: (at 55599) by debbugs.gnu.org; 31 May 2022 19:35:13 +0000 Original-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 Original-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 Original-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) In-Reply-To: <83czfxla5a.fsf@gnu.org> 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:233458 Archived-At: --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--