GNU bug report logs - #16988
24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key

Previous Next

Package: emacs;

Reported by: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>

Date: Tue, 11 Mar 2014 15:24:01 UTC

Severity: important

Found in version 24.3.50

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
Cc: 16988 <at> debbugs.gnu.org
Subject: bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key
Date: Tue, 25 Mar 2014 22:44:18 -0400
> With latest trunk:
> $ time src/emacs -nw -Q --eval '(kill-emacs)'
> real	0m2.064s
> user	0m0.030s
> sys	0m0.010s
> If however I hit a key, emacs exits immediately.

The patch below works for me, but I'm not sure if the terminal type and
version returned by gnome-terminal is "stable" or not.
Can you confirm it fixes your problem as well?


        Stefan


=== modified file 'lisp/term/xterm.el'
--- lisp/term/xterm.el	2014-03-01 18:12:16 +0000
+++ lisp/term/xterm.el	2014-03-26 02:42:05 +0000
@@ -503,6 +503,9 @@
     ;; Since xterm-280, the terminal type (NUMBER1) is now 41 instead of 0.
     (when (string-match "\\([0-9]+\\);\\([0-9]+\\);0" str)
       (let ((version (string-to-number (match-string 2 str))))
+        ;; Hack attack!  bug#16988: gnome-terminal reports "1;3409;0" but is
+        ;; based on a rather old xterm code.
+        (when (equal str "1;3409;0") (setq version 200))
         ;; If version is 242 or higher, assume the xterm supports
         ;; reporting the background color (TODO: maybe earlier
         ;; versions do too...)





This bug report was last modified 11 years and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.