unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* C-x C-c does nothing on frames created with "nowait" flag
@ 2009-01-11  9:15 Bo Lin
  2009-01-11 10:27 ` Ulrich Mueller
  0 siblings, 1 reply; 10+ messages in thread
From: Bo Lin @ 2009-01-11  9:15 UTC (permalink / raw)
  To: emacs-devel

Hi emacs-devel,

When connecting to a Emacs daemon using "emacsclient -n -c", pressing
C-x C-c in the newly created frame does nothing. It does not exit Emacs,
close the frame, or even give any visible feed-back, just nothing.
That's quite surprising, and at first I thought Emacs has hanged.

I think it should at least give a message, like so:

--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1349,18 +1349,22 @@ With ARG non-nil, silently save all file-visiting buffers, then kill.
 
 If emacsclient was started with a list of filenames to edit, then
 only these files will be asked to be saved."
-  ;; save-buffers-kill-terminal occasionally calls us with proc set
-  ;; to `nowait' (comes from the value of the `client' frame parameter).
-  (when (processp proc)
-    (let ((buffers (process-get proc 'buffers)))
-      ;; If client is bufferless, emulate a normal Emacs session
-      ;; exit and offer to save all buffers.  Otherwise, offer to
-      ;; save only the buffers belonging to the client.
-      (save-some-buffers arg
-                         (if buffers
-                             (lambda () (memq (current-buffer) buffers))
-                           t))
-      (server-delete-client proc))))
+  (cond ((eq proc 'nowait)
+         ;; save-buffers-kill-terminal occasionally calls us with proc set
+         ;; to `nowait' (comes from the value of the `client' frame parameter).
+         (message "%s"
+                  (substitute-command-keys
+                   "No clients waiting. Type \\[save-buffers-kill-emacs] to kill Emacs or type \\[delete-frame] to delete this frame.")))
+        ((processp proc)
+          (let ((buffers (process-get proc 'buffers)))
+            ;; If client is bufferless, emulate a normal Emacs session
+            ;; exit and offer to save all buffers.  Otherwise, offer to
+            ;; save only the buffers belonging to the client.
+            (save-some-buffers arg
+                               (if buffers
+                                   (lambda () (memq (current-buffer) buffers))
+                                 t))
+            (server-delete-client proc)))))
 
 (define-key ctl-x-map "#" 'server-edit)
 





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

end of thread, other threads:[~2009-01-11 20:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-11  9:15 C-x C-c does nothing on frames created with "nowait" flag Bo Lin
2009-01-11 10:27 ` Ulrich Mueller
2009-01-11 11:32   ` Bo Lin
2009-01-11 13:25   ` Chong Yidong
2009-01-11 13:40     ` Ulrich Mueller
2009-01-11 13:58       ` Bo Lin
2009-01-11 14:54   ` Stefan Monnier
2009-01-11 15:57     ` Chong Yidong
2009-01-11 17:38       ` Ulrich Mueller
2009-01-11 20:56         ` Chong Yidong

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).