From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Nicolas Richard <theonewiththeevillook@yahoo.fr>, 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: Wed, 12 Mar 2014 09:59:13 +0100 [thread overview]
Message-ID: <87iorj7lfv.fsf@yahoo.fr> (raw)
In-Reply-To: <8761nkkbf6.fsf@yahoo.fr>
Eli Zaretskii <eliz@gnu.org> writes:
>> $ time src/emacs -nw -Q --eval '(kill-emacs)'
>>
>> real 0m2.064s
>> user 0m0.030s
>> sys 0m0.010s
> My crystal ball says that your TERM variable points to xterm, but your
> terminal either isn't xterm or doesn't support the kind of queries
> that xterm--query on xterm.el uses. That function indeed waits for 2s
> for the terminal to respond.
Since it was not a problem before, I bisected that down to commit:
commit 7e594297002c7bc07083fa8d01552255e831ba2a
Author: W. Trevor King <wking@tremily.us>
Date: Wed Feb 19 23:45:19 2014 -0500
* lisp/term/xterm.el (xterm--version-handler): Adapt to xterm-280's output.
which changed xterm--version-handler (in lisp/term/xterm.el) in the following way:
- (when (string-match "0;\\([0-9]+\\);0" str)
- (let ((version (string-to-number (match-string 1 str))))
+ ;; 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))))
That has the effect of now matching gnome-terminal's string (it begins
with 1 on my platform).
As a side effect of this, calling "emacsclient -t" from within
gnome-terminal currently acts weird : it shows the wrong buffer for up
to two second and --if you press some keys before the 2 seconds-- it
shows a few weird chars (a query to the terminal) (until next time that
part of the screen is redrawn ?).
I now see three approaches :
0. Do nothing, and let users fix their terminal emulator and/or terminfo
entries. (alternatively : provide guidance for doing this.)
1. Like it is done now for rxvt (in function terminal-init-xterm), add
some ad-hoc code for detecting gnome-terminal which pretends to be
xterm (in fact the exact same approach might work : $COLORTERM is
gnome-terminal when using gnome-terminal).
2. Test also (match-string 1 str) in the above code and make sure it is
either 0 or 41. (it is equal to 1 in my gnome-terminal)
Opinions ?
--
Nico.
next prev parent reply other threads:[~2014-03-12 8:59 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 [this message]
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 ` bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key Stefan Monnier
2014-03-26 6:47 ` 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=87iorj7lfv.fsf@yahoo.fr \
--to=theonewiththeevillook@yahoo.fr \
--cc=16988@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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.