From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Cc: 16988@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 [thread overview]
Message-ID: <jwv8urx3cl1.fsf-monnier+bug#16988@gnu.org> (raw)
In-Reply-To: <8761nkkbf6.fsf@yahoo.fr> (Nicolas Richard's message of "Tue, 11 Mar 2014 16:22:21 +0100")
> 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...)
next prev parent reply other threads:[~2014-03-26 2:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 15:22 bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key Nicolas Richard
2014-03-11 17:18 ` Eli Zaretskii
2014-03-11 19:08 ` Nicolas Richard
2014-03-12 8:59 ` Nicolas Richard
2014-03-12 14:32 ` bug#16988: xterm--version-handler, accepting any terminal type rather than 0 Stefan Monnier
2014-03-12 16:13 ` W. Trevor King
2014-03-26 2:44 ` Stefan Monnier [this message]
2014-03-26 6:47 ` bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key Nicolas Richard
2014-03-26 10:29 ` Nicolas Richard
2014-03-26 12:46 ` Stefan Monnier
2014-03-26 13:38 ` Nicolas Richard
2014-04-22 20:36 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='jwv8urx3cl1.fsf-monnier+bug#16988@gnu.org' \
--to=monnier@iro.umontreal.ca \
--cc=16988@debbugs.gnu.org \
--cc=theonewiththeevillook@yahoo.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.