From unknown Sat Jun 14 14:26:40 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#16988 <16988@debbugs.gnu.org> To: bug#16988 <16988@debbugs.gnu.org> Subject: Status: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key Reply-To: bug#16988 <16988@debbugs.gnu.org> Date: Sat, 14 Jun 2025 21:26:40 +0000 retitle 16988 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds u= nless I hit a key reassign 16988 emacs submitter 16988 Nicolas Richard severity 16988 important thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 11 11:23:04 2014 Received: (at submit) by debbugs.gnu.org; 11 Mar 2014 15:23:04 +0000 Received: from localhost ([127.0.0.1]:33477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNOWG-0003Ij-DK for submit@debbugs.gnu.org; Tue, 11 Mar 2014 11:23:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39073) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNOWE-0003ID-De for submit@debbugs.gnu.org; Tue, 11 Mar 2014 11:23:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNOW4-0007yd-Mx for submit@debbugs.gnu.org; Tue, 11 Mar 2014 11:23:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNOW4-0007yY-Kr for submit@debbugs.gnu.org; Tue, 11 Mar 2014 11:22:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNOVx-0000yn-5X for bug-gnu-emacs@gnu.org; Tue, 11 Mar 2014 11:22:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNOVn-0007u3-16 for bug-gnu-emacs@gnu.org; Tue, 11 Mar 2014 11:22:45 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:27729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNOVm-0007td-JB for bug-gnu-emacs@gnu.org; Tue, 11 Mar 2014 11:22:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiQLANwpH1OkD4Xx/2dsb2JhbABarGqCSwGXTHSDPSQ0AYhEARSgZI9smT0Bh0SHXocbhCIEmEWGNYt4gy48 Received: from mathsrv4.ulb.ac.be (HELO geodiff-mac3) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 11 Mar 2014 16:22:18 +0100 From: Nicolas Richard To: bug-gnu-emacs@gnu.org Subject: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key Date: Tue, 11 Mar 2014 16:22:21 +0100 Message-ID: <8761nkkbf6.fsf@yahoo.fr> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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. with 24.3 (git commit 3a1ce0685) : $ time src/emacs -nw -Q --eval '(kill-emacs)' real 0m0.063s user 0m0.030s sys 0m0.012s The '--eval' part is just there to make emacs exit asap. Note that replacing -Q with --batch works fine. -- Nico. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 11 13:18:50 2014 Received: (at 16988) by debbugs.gnu.org; 11 Mar 2014 17:18:51 +0000 Received: from localhost ([127.0.0.1]:33536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNQKI-0000SG-J0 for submit@debbugs.gnu.org; Tue, 11 Mar 2014 13:18:50 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:40470) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNQKG-0000S7-6h for 16988@debbugs.gnu.org; Tue, 11 Mar 2014 13:18:49 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N2A003007Y9UK00@a-mtaout20.012.net.il> for 16988@debbugs.gnu.org; Tue, 11 Mar 2014 19:18:46 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N2A003DG839TC20@a-mtaout20.012.net.il>; Tue, 11 Mar 2014 19:18:46 +0200 (IST) Date: Tue, 11 Mar 2014 19:18:35 +0200 From: Eli Zaretskii Subject: Re: bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key In-reply-to: <8761nkkbf6.fsf@yahoo.fr> X-012-Sender: halo1@inter.net.il To: Nicolas Richard Message-id: <83iorkodqs.fsf@gnu.org> References: <8761nkkbf6.fsf@yahoo.fr> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 16988 Cc: 16988@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Nicolas Richard > Date: 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 I cannot reproduce this. I get the same 0.330s time with both current trunk and Emacs 24.3. That's on this system: eliz@fencepost:~/bzr/emacs/trunk$ uname -a Linux fencepost.gnu.org 2.6.32-48-server #1trisquel3 SMP Mon Jun 17 20:00:36 UTC 2013 x86_64 GNU/Linux 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 11 15:08:32 2014 Received: (at 16988) by debbugs.gnu.org; 11 Mar 2014 19:08:32 +0000 Received: from localhost ([127.0.0.1]:33576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNS2R-0003k0-D7 for submit@debbugs.gnu.org; Tue, 11 Mar 2014 15:08:31 -0400 Received: from mailrelay004.isp.belgacom.be ([195.238.6.170]:14060) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNS2K-0003jm-Sf for 16988@debbugs.gnu.org; Tue, 11 Mar 2014 15:08:29 -0400 X-Belgacom-Dynamic: yes Received: from 89.128-178-91.adsl-dyn.isp.belgacom.be (HELO LDLC-portable) ([91.178.128.89]) by relay.skynet.be with ESMTP; 11 Mar 2014 20:08:21 +0100 From: Nicolas Richard To: Eli Zaretskii Subject: Re: bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key References: <8761nkkbf6.fsf@yahoo.fr> <83iorkodqs.fsf@gnu.org> Date: Tue, 11 Mar 2014 20:08:21 +0100 In-Reply-To: <83iorkodqs.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 11 Mar 2014 19:18:35 +0200") Message-ID: <87k3c08sey.fsf@yahoo.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16988 Cc: Nicolas Richard , 16988@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Eli Zaretskii writes: > I cannot reproduce this. I get the same 0.330s time with both current > trunk and Emacs 24.3. That's on this system: > > eliz@fencepost:~/bzr/emacs/trunk$ uname -a > Linux fencepost.gnu.org 2.6.32-48-server #1trisquel3 SMP Mon Jun 17 20:00:36 UTC 2013 x86_64 GNU/Linux > > 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. Your crystal ball works well : I use gnome-terminal and that sets TERM to xterm. I'll have to figure out the best way to fix that. using TERM=gnome fixes the problem, but I don't know if that's TRT, and I don't know either where I should set that. I've read that: > if [ "$COLORTERM" = "gnome-terminal" ] > then > export TERM=gnome > fi to my .bashrc will fix it but it's not pretty. Thanks. -- Nico. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 12 06:36:48 2014 Received: (at 16988) by debbugs.gnu.org; 12 Mar 2014 10:36:49 +0000 Received: from localhost ([127.0.0.1]:33913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNgWm-0007Aq-DW for submit@debbugs.gnu.org; Wed, 12 Mar 2014 06:36:48 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:29472) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNgWj-0007Ad-Tn for 16988@debbugs.gnu.org; Wed, 12 Mar 2014 06:36:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvgHAF44IFOkD4Xn/2dsb2JhbABarHaYc4ExdIIlAQEBAwF5BQsIAxQNJQ8BBEMGE4dkAQwIsUaZGAGHBxeHXoZ+hD8EmEWGNYt4gW+BPzw Received: from pno-math-231.ulb.ac.be (HELO LDLC-portable) ([164.15.133.231]) by smtp.ulb.ac.be with ESMTP; 12 Mar 2014 11:36:37 +0100 From: Nicolas Richard To: Eli Zaretskii Subject: Re: 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 References: <8761nkkbf6.fsf@yahoo.fr> <83iorkodqs.fsf@gnu.org> Message-ID: <87iorj7lfv.fsf@yahoo.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 16988 Cc: Nicolas Richard , 16988@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Eli Zaretskii 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 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 12 10:32:25 2014 Received: (at 16988) by debbugs.gnu.org; 12 Mar 2014 14:32:25 +0000 Received: from localhost ([127.0.0.1]:34720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNkCm-0000TK-FG for submit@debbugs.gnu.org; Wed, 12 Mar 2014 10:32:24 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:53437) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNkCk-0000T3-B6 for 16988@debbugs.gnu.org; Wed, 12 Mar 2014 10:32:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEVyMFKiAmGA0kE4gLBsEtkQoDlymKIIMxgV6DEw X-IPAS-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEVyMFKiAmGA0kE4gLBsEtkQoDlymKIIMxgV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="51459594" Received: from 76-10-154-114.dsl.teksavvy.com (HELO pastel.home) ([76.10.154.114]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Mar 2014 10:32:21 -0400 Received: by pastel.home (Postfix, from userid 20848) id 5E8F36057F; Wed, 12 Mar 2014 10:32:21 -0400 (EDT) From: Stefan Monnier To: W. Trevor King Subject: xterm--version-handler, accepting any terminal type rather than 0 Message-ID: Date: Wed, 12 Mar 2014 10:32:21 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 16988 Cc: 16988@debbugs.gnu.org, Nicolas Richard X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) --=-=-= Content-Type: text/plain Hi Trevor, Looks like my fear about "other terminal types" was not unfounded after all: gnome-terminal uses a terminal type of 1 and that leads to problems (see http://debbugs.gnu.org/16988 for the discussion). I'm leaning towards the conservative option of replacing your "[0-9]+" with "0\\|41", WDYT? Stefan --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 8bit Return-Path: X-Original-To: monnier@iro.umontreal.ca Delivered-To: monnier@iro.umontreal.ca Received: from perlin.iro.umontreal.ca (perlin.iro.umontreal.ca [132.204.24.51]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 0C47284CB1 for ; Wed, 12 Mar 2014 06:37:42 -0400 (EDT) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by perlin.iro.umontreal.ca (Postfix) with ESMTP id 12003830001 for ; Wed, 12 Mar 2014 06:37:26 -0400 (EDT) Received: from localhost ([::1]:59786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNgXN-00088I-Kk for monnier@iro.umontreal.ca; Wed, 12 Mar 2014 06:37:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNgX6-0007xb-N1 for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 06:37:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNgX1-0006GL-JU for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 06:37:08 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:60964) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNgX1-0006GF-H9 for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 06:37:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WNgX0-0007C6-UN for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 06:37:03 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key In-Reply-To: <8761nkkbf6.fsf@yahoo.fr> Resent-From: Nicolas Richard Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Mar 2014 10:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16988 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Received: via spool by 16988-submit@debbugs.gnu.org id=B16988.139462060927585 (code B ref 16988); Wed, 12 Mar 2014 10:37:02 +0000 Received: (at 16988) by debbugs.gnu.org; 12 Mar 2014 10:36:49 +0000 Received: from localhost ([127.0.0.1]:33913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNgWm-0007Aq-DW for submit@debbugs.gnu.org; Wed, 12 Mar 2014 06:36:48 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:29472) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNgWj-0007Ad-Tn for 16988@debbugs.gnu.org; Wed, 12 Mar 2014 06:36:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvgHAF44IFOkD4Xn/2dsb2JhbABarHaYc4ExdIIlAQEBAwF5BQsIAxQNJQ8BBEMGE4dkAQwIsUaZGAGHBxeHXoZ+hD8EmEWGNYt4gW+BPzw Received: from pno-math-231.ulb.ac.be (HELO LDLC-portable) ([164.15.133.231]) by smtp.ulb.ac.be with ESMTP; 12 Mar 2014 11:36:37 +0100 From: Nicolas Richard Date: Wed, 12 Mar 2014 09:59:13 +0100 References: <8761nkkbf6.fsf@yahoo.fr> <83iorkodqs.fsf@gnu.org> Message-ID: <87iorj7lfv.fsf@yahoo.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 Cc: Nicolas Richard , 16988@debbugs.gnu.org X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org Sender: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.6, requis 5, autolearn=not spam, BAYES_00 -2.60, MC_TSTLAST 0.00, SPF_HELO_PASS -0.00) X-DIRO-MailScanner-From: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org X-Spam-Status: No Eli Zaretskii 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 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. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 12 12:13:30 2014 Received: (at 16988) by debbugs.gnu.org; 12 Mar 2014 16:13:30 +0000 Received: from localhost ([127.0.0.1]:34830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNlmb-0003aN-UU for submit@debbugs.gnu.org; Wed, 12 Mar 2014 12:13:30 -0400 Received: from qmta12.westchester.pa.mail.comcast.net ([76.96.59.227]:47601) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNlmZ-0003aB-7j for 16988@debbugs.gnu.org; Wed, 12 Mar 2014 12:13:28 -0400 Received: from omta14.westchester.pa.mail.comcast.net ([76.96.62.60]) by qmta12.westchester.pa.mail.comcast.net with comcast id cdVr1n0031HzFnQ5CgDSGU; Wed, 12 Mar 2014 16:13:26 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta14.westchester.pa.mail.comcast.net with comcast id cgDR1n00U152l3L3agDSlu; Wed, 12 Mar 2014 16:13:26 +0000 Received: by odin.tremily.us (Postfix, from userid 1000) id C328010839D8; Wed, 12 Mar 2014 09:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1394640804; bh=R8jEk4FesJxk3sZd0qvPc/i4lqdP2xDV/SGJqBjVhNw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=UupMcT6XuMRglgJUFwd30T9D4wnw6AVstXn4BiOYGb3xvDqUaePZiGbsMP3jG+3u9 5WNbLARlLjZDwTB7MVthrdbP7w9/WeXZhGxjssVaLLh34N5urGXv7v6fALhVWzXxd1 KN1VaXYrwqMag/LUVxzxkNgEYoTvAOLSFZDtkPvw= Date: Wed, 12 Mar 2014 09:13:24 -0700 From: "W. Trevor King" To: Stefan Monnier Subject: Re: xterm--version-handler, accepting any terminal type rather than 0 Message-ID: <20140312161324.GW29333@odin.tremily.us> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9+ohdFDUqiMJzwPo" Content-Disposition: inline In-Reply-To: OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8; url=http://tremily.us/pubkey.txt User-Agent: Mutt/1.5.22 (2013-10-16) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1394640806; bh=dk9TbzDllBNJHgRDJTiEdJHYcJigodogiDcmek+wVLM=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=nUH3xCmumm8QV8zSYZwzbsd6r5ROt5x6jYvkDsRNaem02jiKCVNZxOIRX1bcaNQF1 59o44WA1rjlPSZPWCMbfjps+jB55c0SL9Qn4vI+GED08SyAbZk2FA1HrXbOzdx1lvm eXT1CMCHSLOLTjkaDEDV1Ic6dJW/OZmGaZ7nRfvokj5Ykfh13bvELpwJ29zOic/d+p MmN8S/3W9OF69LprU5/HNDw6uJtMZNvnN+UGR1EWTJFJDUqDt+28EypVmsZh0+N61P Z61co2xDHK3KFz4rzbS4T3CQBw4Z2teg2h5AJ31lgAr+Cp9eGNad7r0vghRP/QraDW o+0mlEXBZN5mg== X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 16988 Cc: 16988@debbugs.gnu.org, Nicolas Richard X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --9+ohdFDUqiMJzwPo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 12, 2014 at 10:32:21AM -0400, Stefan Monnier wrote: > Looks like my fear about "other terminal types" was not unfounded > after all: gnome-terminal uses a terminal type of 1 and that leads > to problems (see http://debbugs.gnu.org/16988 for the discussion). >=20 > I'm leaning towards the conservative option of replacing your "[0-9]+" > with "0\\|41", WDYT? That's going to cause problems for folks who run their XTerm in VT220 mode (xterm -ti vt220), where you'll get secondary device attributes like '1;297;0c' (VT220, XTerm v297, ROM cartridge registration number 0). It looks like the GNOME Terminal and it's underlying VTE widget could use some love on the XTerm-emulation front [1,2]. On Wed, Mar 12, 2014 at 09:59:13AM +0100, Nicolas Richard wrote: > 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) That sounds right to me, and those choices are listed in my order of preference ;). VTE's handling of this particular sequence (vte_sequence_handler_send_secondary_device_attributes) hasn't changed much since it was added in 2003 [3,4], and I haven't looked up the sequence behind xterm--query, so I'm not sure how difficult it would be to add support for it to VTE. I also don't know enough about it to know how to reliably distinguish it from true XTerms (although if you can COLORTERM, that sounds good). Approach #3 fixes things for VTE users, but breaks detection for 'xterm -ti vt220' users. I don't know any such users personally though ;). Cheers, Trevor [1]: http://invisible-island.net/xterm/xterm.faq.html#bug_gnometerm [2]: http://invisible-island.net/xterm/xterm.faq.html#vte_widget [3]: https://git.gnome.org/browse/vte/commit/?id=3D3c6d81bf06becda3f9ab005c= 7310b2343588115e [4]: https://git.gnome.org/browse/vte/commit/?id=3Dddad9e00e4d0442d76139048= 0aafd9c85713121f -- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy --9+ohdFDUqiMJzwPo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTIIeiAAoJEKKfehoaNkbtimoP/0HNzDAM3mCs6Q6pqsiA58Ca H6i5Y2AgyWGdf06cH1wtE0tARkCAfAuqpIkwhoobSIlxvDcE56Y02Fajn4t57Fls aEGewl1P8zqq6ZatSQBLeF9jcncx2dvvdcAWv/RFnZvvvXtNxXYSRGbP27T2DUdS tqg8fPZ/bmrD48smT/cbfLABwY3E8XiUh0gj7TZZumHOB+eQsEw1EcJMyfx+ayRw Cs+oy/mbKE5D6gybi882cIHEQanGOJed3/NWrtv3A31A3m1lg/l04Vl7UM/VBYuQ wOuLf34YRFKOxwU+sWqdWONzgLIRAVOTfpBH1VReYOI+KOtnBrWRyOy/Ae1qAe3V YgxqwLqiCoHedf7bC/hB8B2KAnYehfLDIpesrumMjD/YFL02iOo4fybJcJYbTdUq w+7EZJxDCM5hoXrdE1vlz1oZlRBHVeb7/zrZm42IRt+GL3W5/q1nnCJojAxkZ7QJ /kmb6BbUJw6Hslfr9R3IO97jxUP2HS093kdRNBFWMjEfgVdZ0bP4M2B2ra55bmBd 7r7MUGCwLHqLGxlmIoXpYNLeoabbWRm+JxrZ0WfNtxxUt6WaCAI6Duq8MHbWEWH/ GBzqI5m1cqnTlc36NIWdlQxyxzbQiquO1SJ3UMX9vMewlDaWM1it54JSUCw+aoJi cm9TLCjBJQZQ1RFa/jOz =UIqc -----END PGP SIGNATURE----- --9+ohdFDUqiMJzwPo-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 25 22:44:34 2014 Received: (at 16988) by debbugs.gnu.org; 26 Mar 2014 02:44:34 +0000 Received: from localhost ([127.0.0.1]:49873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WSdpN-0008WJ-1Z for submit@debbugs.gnu.org; Tue, 25 Mar 2014 22:44:33 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:57694) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WSdpF-0008W2-EE for 16988@debbugs.gnu.org; Tue, 25 Mar 2014 22:44:26 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s2Q2iION002738; Tue, 25 Mar 2014 22:44:18 -0400 Received: by pastel.home (Postfix, from userid 20848) id 5B3636013D; Tue, 25 Mar 2014 22:44:18 -0400 (EDT) From: Stefan Monnier To: Nicolas Richard Subject: Re: bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key Message-ID: References: <8761nkkbf6.fsf@yahoo.fr> Date: Tue, 25 Mar 2014 22:44:18 -0400 In-Reply-To: <8761nkkbf6.fsf@yahoo.fr> (Nicolas Richard's message of "Tue, 11 Mar 2014 16:22:21 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4892=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4892> : inlines <646> : streams <1144693> : uri <1710050> X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 16988 Cc: 16988@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 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...) From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 26 02:47:27 2014 Received: (at 16988) by debbugs.gnu.org; 26 Mar 2014 06:47:28 +0000 Received: from localhost ([127.0.0.1]:50028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WShcU-00013i-Hq for submit@debbugs.gnu.org; Wed, 26 Mar 2014 02:47:27 -0400 Received: from mailrelay001.isp.belgacom.be ([195.238.6.51]:36133) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WShcO-00013K-46 for 16988@debbugs.gnu.org; Wed, 26 Mar 2014 02:47:21 -0400 X-Belgacom-Dynamic: yes Received: from 6.152-177-91.adsl-dyn.isp.belgacom.be (HELO LDLC-portable) ([91.177.152.6]) by relay.skynet.be with ESMTP; 26 Mar 2014 07:47:18 +0100 From: Nicolas Richard To: Stefan Monnier Subject: Re: bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key References: <8761nkkbf6.fsf@yahoo.fr> Date: Wed, 26 Mar 2014 07:47:18 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 25 Mar 2014 22:44:18 -0400") Message-ID: <87r45pe9s9.fsf@yahoo.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16988 Cc: Nicolas Richard , 16988@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Stefan Monnier writes: >> 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? Apparently, "3409" is not stable : For what I've tested : Gnome terminal 3.6.1 reports 1;3406;0 Gnome terminal 2.32.1 reports 1;2802;0 -- Nicolas. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 26 06:29:17 2014 Received: (at 16988) by debbugs.gnu.org; 26 Mar 2014 10:29:17 +0000 Received: from localhost ([127.0.0.1]:50077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WSl5A-00074I-MS for submit@debbugs.gnu.org; Wed, 26 Mar 2014 06:29:17 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:64453) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WSl57-000748-VP for 16988@debbugs.gnu.org; Wed, 26 Mar 2014 06:29:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EAEKrMlOkD4Xn/2dsb2JhbABZxw6BNHSCJgEBBHkQCAMhJQ8BBEkTh2QBFK1umWMBh3QXh2SHDQeEOASYTYY2i32BcIE/PA Received: from pno-math-231.ulb.ac.be (HELO LDLC-portable) ([164.15.133.231]) by smtp.ulb.ac.be with ESMTP; 26 Mar 2014 11:29:13 +0100 From: Nicolas Richard To: Stefan Monnier Subject: Re: bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key In-Reply-To: (Stefan Monnier's message of "Tue, 25 Mar 2014 22:44:18 -0400") References: <8761nkkbf6.fsf@yahoo.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Date: Wed, 26 Mar 2014 11:29:11 +0100 Message-ID: <87y4zxcky0.fsf@yahoo.fr> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 16988 Cc: 16988@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Stefan Monnier writes: >> 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? Here's a patch based on COLORTERM which works for me. diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index eac4014..bd5675b 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -503,6 +503,12 @@ The relevant features are: ;; 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)))) + ;; gnome-terminal pretends to be xterm but lacks some of its + ;; more recent features. See bug#16988. + (let ((colorterm (getenv "COLORTERM" (selected-frame)))) + (when (and colorterm + (string-match "\\`gnome-terminal" colorterm)) + (setq version 200))) ;; If version is 242 or higher, assume the xterm supports ;; reporting the background color (TODO: maybe earlier ;; versions do too...) -- Nico. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 26 08:46:40 2014 Received: (at 16988) by debbugs.gnu.org; 26 Mar 2014 12:46:40 +0000 Received: from localhost ([127.0.0.1]:50163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WSnE7-0003aw-LZ for submit@debbugs.gnu.org; Wed, 26 Mar 2014 08:46:39 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:44373) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WSnE5-0003an-CV for 16988@debbugs.gnu.org; Wed, 26 Mar 2014 08:46:38 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s2QCkZ5R007311; Wed, 26 Mar 2014 08:46:36 -0400 Received: by pastel.home (Postfix, from userid 20848) id 95B5D60120; Wed, 26 Mar 2014 08:46:35 -0400 (EDT) From: Stefan Monnier To: Nicolas Richard Subject: Re: bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key Message-ID: References: <8761nkkbf6.fsf@yahoo.fr> <87y4zxcky0.fsf@yahoo.fr> Date: Wed, 26 Mar 2014 08:46:35 -0400 In-Reply-To: <87y4zxcky0.fsf@yahoo.fr> (Nicolas Richard's message of "Wed, 26 Mar 2014 11:29:11 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4893=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4893> : inlines <647> : streams <1144957> : uri <1710467> X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 16988 Cc: 16988@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > + ;; gnome-terminal pretends to be xterm but lacks some of its > + ;; more recent features. See bug#16988. > + (let ((colorterm (getenv "COLORTERM" (selected-frame)))) > + (when (and colorterm > + (string-match "\\`gnome-terminal" colorterm)) > + (setq version 200))) As a matter of fact, all my xterms have "COLORTERM = gnome-terminal", so the above ends up running even though I'm in a plain uptodate xterm rather than in a gnome-terminal. This is probably not the usual situation (it's a result of some silly way I log in), but it does point to the fact that xterm itself does not reset COLORTERM, so it's not a reliable indicator. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 26 09:38:19 2014 Received: (at 16988) by debbugs.gnu.org; 26 Mar 2014 13:38:19 +0000 Received: from localhost ([127.0.0.1]:50180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WSo25-0004wl-8w for submit@debbugs.gnu.org; Wed, 26 Mar 2014 09:38:19 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:40854) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WSo1v-0004wQ-F8 for 16988@debbugs.gnu.org; Wed, 26 Mar 2014 09:38:08 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EANjWMlOkD4Xx/2dsb2JhbABZxw2BN3SCJgEBBHkQCAMhJQ8BBEkTh2QBFK4tmV8Bh3QXh2SHDQeEOASYTYY2i32BcIE/PA Received: from mathsrv4.ulb.ac.be (HELO geodiff-mac3) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 26 Mar 2014 14:38:05 +0100 From: Nicolas Richard To: Stefan Monnier Subject: Re: bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key References: <8761nkkbf6.fsf@yahoo.fr> <87y4zxcky0.fsf@yahoo.fr> Date: Wed, 26 Mar 2014 14:38:22 +0100 In-Reply-To: (Stefan Monnier's message of "Wed, 26 Mar 2014 08:46:35 -0400") Message-ID: <87siq584hd.fsf@yahoo.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 16988 Cc: Nicolas Richard , 16988@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Stefan Monnier writes: >> + ;; gnome-terminal pretends to be xterm but lacks some of its >> + ;; more recent features. See bug#16988. >> + (let ((colorterm (getenv "COLORTERM" (selected-frame)))) >> + (when (and colorterm >> + (string-match "\\`gnome-terminal" colorterm)) >> + (setq version 200))) > > As a matter of fact, all my xterms have "COLORTERM = gnome-terminal", so > the above ends up running even though I'm in a plain uptodate xterm > rather than in a gnome-terminal. > > This is probably not the usual situation (it's a result of some silly > way I log in), but it does point to the fact that xterm itself does not > reset COLORTERM, so it's not a reliable indicator. If we have reasons to believe xterm will never reach e.g. version 1500, perhaps we can test for that. -- Nico. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 22 16:36:20 2014 Received: (at 16988-done) by debbugs.gnu.org; 22 Apr 2014 20:36:20 +0000 Received: from localhost ([127.0.0.1]:55428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WchQR-0007m0-SA for submit@debbugs.gnu.org; Tue, 22 Apr 2014 16:36:20 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:55616) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WchQP-0007lr-Hw for 16988-done@debbugs.gnu.org; Tue, 22 Apr 2014 16:36:18 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s3MKaFTq022681; Tue, 22 Apr 2014 16:36:16 -0400 Received: by pastel.home (Postfix, from userid 20848) id 92A77600D1; Tue, 22 Apr 2014 16:36:15 -0400 (EDT) From: Stefan Monnier To: Nicolas Richard Subject: Re: bug#16988: 24.3.50; emacs -nw -Q --eval '(kill-emacs)' takes 2 seconds unless I hit a key Message-ID: References: <8761nkkbf6.fsf@yahoo.fr> <87y4zxcky0.fsf@yahoo.fr> <87siq584hd.fsf@yahoo.fr> Date: Tue, 22 Apr 2014 16:36:15 -0400 In-Reply-To: <87siq584hd.fsf@yahoo.fr> (Nicolas Richard's message of "Wed, 26 Mar 2014 14:38:22 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV4920=0 X-NAI-Spam-Version: 2.3.0.9378 : core <4920> : inlines <757> : streams <1164813> : uri <1737783> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 16988-done Cc: 16988-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.0 (--) > If we have reasons to believe xterm will never reach e.g. version 1500, > perhaps we can test for that. I installed a patch along those lines, using 2000 as the "threshold". Stefan From unknown Sat Jun 14 14:26:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 21 May 2014 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator