bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50849: 28.0.50; Proposal for Emacs daemon to signal when being busy


From: Stefan Kangas
Subject: bug#50849: 28.0.50; Proposal for Emacs daemon to signal when being busy
Date: Mon, 5 Sep 2022 09:56:58 -0400

tags 50849 + patch
thanks

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I don't think a --timeout parameter will be useful here, though --
> nobody is going to type "emacsclient --timeout 10 -nw".
>
> So I think an informational message (like previously mentioned) is the
> best we can do here.

How about the attached patch?  It adds an informational message after 30
seconds by default.  With a "--timeout N" flag, we instead display a
message and exit (after N seconds).

Note that:

1. I didn't yet add documentation.
2. I've only tested the patch on GNU/Linux (*not* on MS-Windows).
3. To simulate a timeout for testing, you could try this:

diff --git a/lisp/server.el b/lisp/server.el
index 3caa335c4e..5dc220d0b3 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1113,8 +1113,8 @@ server-process-filter
       (progn
        (server-add-client proc)
        ;; Send our pid
-       (server-send-string proc (concat "-emacs-pid "
-                                        (number-to-string (emacs-pid)) "\n"))
+        ;; (server-send-string proc (concat "-emacs-pid "
+        ;;                              (number-to-string (emacs-pid)) "\n"))
        (if (not (string-match "\n" string))
             ;; Save for later any partial line that remains.
             (when (> (length string) 0)

Attachment: 0001-Add-new-timeout-flag-to-emacsclient.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]