tags 50849 + patch thanks Lars Ingebrigtsen 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)