all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#52214: 29.0.50; [PATCH] Don't output emacsclient message that daemon should have started if using --quiet
@ 2021-12-01  4:40 Jim Porter
  2021-12-01  4:57 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Porter @ 2021-12-01  4:40 UTC (permalink / raw)
  To: 52214

[-- Attachment #1: Type: text/plain, Size: 653 bytes --]

When using `emacsclient -qa' and starting the Emacs daemon 
automatically, it prints the following (among other lines):

   Emacs daemon should have started, trying to connect again

However, `emacsclient --help' says:

   -q, --quiet             Don't display messages on success

Since the above message is printed even when successfully starting the 
daemon, I think it would make sense to suppress this when using 
-q/--quiet. Attached is a patch to do this.

See also the resolved bug#16117 for a similar case, which inspired this 
report. (There's bug#51327 too, which is loosely related and should 
probably be fixed -- somehow -- for Emacs 28.)

[-- Attachment #2: 0001-Don-t-output-emacsclient-message-that-daemon-should-.patch --]
[-- Type: text/plain, Size: 1414 bytes --]

From 3237a3479f15a20e7d3d33da8a202fa8b8f0a6d0 Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Tue, 30 Nov 2021 20:26:14 -0800
Subject: [PATCH] Don't output emacsclient message that daemon should have
 started if --quiet

* lib-src/emacsclient.c (start_daemon_and_retry_set_socket): Don't
output "daemon should have started" message if --quiet.
---
 lib-src/emacsclient.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index c55b29830d..6afea6f306 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -1758,8 +1758,9 @@ start_daemon_and_retry_set_socket (void)
 	}
 
       /* Try connecting, the daemon should have started by now.  */
-      message (true,
-	       "Emacs daemon should have started, trying to connect again\n");
+      if (!quiet)
+        message (true,
+                 "Emacs daemon should have started, trying to connect again\n");
     }
   else if (dpid < 0)
     {
@@ -1850,7 +1851,7 @@ start_daemon_and_retry_set_socket (void)
   /* Try connecting, the daemon should have started by now.  */
   /* It's just a progress message, so don't pop a dialog if this is
      emacsclientw.  */
-  if (!w32_window_app ())
+  if (!quiet && !w32_window_app ())
     message (true,
 	     "Emacs daemon should have started, trying to connect again\n");
 #endif /* WINDOWSNT */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-01  4:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-01  4:40 bug#52214: 29.0.50; [PATCH] Don't output emacsclient message that daemon should have started if using --quiet Jim Porter
2021-12-01  4:57 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.