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: Tue, 24 May 2022 14:31:16 +0300 Message-ID: <83k0ab5fqz.fsf@gnu.org> References: <87r14jo02m.fsf@gmx.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34383"; 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 Tue May 24 14:00:38 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 1ntTDK-0008mP-4t for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 May 2022 14:00:38 +0200 Original-Received: from localhost ([::1]:41114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntTDI-0002lt-PO for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 May 2022 08:00:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntSle-00048h-HF for bug-gnu-emacs@gnu.org; Tue, 24 May 2022 07:32:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57240) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntSle-0000d4-7d for bug-gnu-emacs@gnu.org; Tue, 24 May 2022 07:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ntSle-0000Nl-07 for bug-gnu-emacs@gnu.org; Tue, 24 May 2022 07:32: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: 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 Original-Received: via spool by 55599-submit@debbugs.gnu.org id=B55599.1653391899406 (code B ref 55599); Tue, 24 May 2022 11:32:01 +0000 Original-Received: (at 55599) by debbugs.gnu.org; 24 May 2022 11:31:39 +0000 Original-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 Original-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 Original-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==; Original-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 In-Reply-To: (message from Peter Ludemann on Tue, 24 May 2022 02:29:37 -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:232994 Archived-At: > 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.