From unknown Sun Aug 10 12:54:34 2025 X-Loop: don@donarmstrong.com Subject: bug#97: regression in Emacs 22 recognizing Tcl mode Reply-To: "William B. Parsons" , 97@debbugs.gnu.org Resent-From: "William B. Parsons" Original-Sender: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 29 Mar 2008 23:00:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 97 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.120683121922385 (code B ref -1); Sat, 29 Mar 2008 23:00:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 29 Mar 2008 22:53:39 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m2TMrWwA022379 for ; Sat, 29 Mar 2008 15:53:33 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhUGAKNl7kfO+LLN/2dsb2JhbACBWpBpljQ X-IronPort-AV: E=Sophos;i="4.25,576,1199682000"; d="scan'208";a="17138473" Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 29 Mar 2008 18:53:26 -0400 Received: from pastel.home ([206.248.178.205]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id JZE34326 for ; Sat, 29 Mar 2008 18:53:26 -0400 Received: by pastel.home (Postfix, from userid 20848) id 095017FDF; Sat, 29 Mar 2008 18:53:26 -0400 (EDT) Resent-Message-ID: Resent-To: submit@debbugs.gnu.org Resent-From: Stefan Monnier Resent-Date: Sat, 29 Mar 2008 18:53:26 -0400 X-Original-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 DB36F2CFAA9 for ; Sat, 29 Mar 2008 18:08:24 -0400 (EDT) Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by perlin.iro.umontreal.ca (Postfix) with ESMTP id 5BF0C148218 for ; Sat, 29 Mar 2008 18:08:20 -0400 (EDT) Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfjDn-0006E5-Ks for monnier@iro.umontreal.ca; Sat, 29 Mar 2008 18:08:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JfcJY-0008CL-Ej for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 10:45:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JfcJX-0008Bu-PG for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 10:45:48 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfcJX-0008Bo-Kw for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 10:45:47 -0400 Received: from smtp.cshore.com ([206.123.82.219]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JfcJX-0007wT-BX for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 10:45:47 -0400 Received: from isis.thalatta.eme (adsl25-202.cshore.com [65.113.125.202]) by smtp.cshore.com (Postfix) with ESMTP id E835A804C90 for ; Sat, 29 Mar 2008 10:46:08 -0400 (EDT) From: "William B. Parsons" To: bug-gnu-emacs@gnu.org Message-Id: <20080329144608.E835A804C90@smtp.cshore.com> Date: Sat, 29 Mar 2008 10:46:08 -0400 (EDT) X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) X-Mailman-Approved-At: Sat, 29 Mar 2008 18:05:55 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org Errors-To: 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=-1.94, requis 5, BAYES_00 -2.60, RECEIVED_FROM_NOUNK 0.66, SPF_HELO_PASS -0.00) X-DIRO-MailScanner-From: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.3.1 (i386--freebsd, X toolkit, Xaw3d scroll bars) of 2006-03-16 on gohan31.freebsd.org configured using `configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --prefix=/usr/local i386--freebsd' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: The following valid Tcl script is recognized automatically as Tcl mode under Emacs 21 but as shell mode under Emacs 22: ------ isis% cat test.tcl #!/bin/sh #\ exec tclsh "$0" ${1+"$@"} puts test ------ i.e., the shebang overrides the .tcl extension in determining programming mode. From unknown Sun Aug 10 12:54:34 2025 X-Loop: don@donarmstrong.com Subject: bug#97: regression in Emacs 22 recognizing Tcl mode Reply-To: Chong Yidong , 97@debbugs.gnu.org Resent-From: Chong Yidong Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 05 Apr 2008 22:15:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 97 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 97-submit@emacsbugs.donarmstrong.com id=B97.1207433251858 (code B ref 97); Sat, 05 Apr 2008 22:15:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-0.1 required=4.0 tests=AWL autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 97) by emacsbugs.donarmstrong.com; 5 Apr 2008 22:07:31 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m35M7Ss8000852 for <97@emacsbugs.donarmstrong.com>; Sat, 5 Apr 2008 15:07:29 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 100954E255; Sat, 5 Apr 2008 18:03:47 -0400 (EDT) From: Chong Yidong To: "William B. Parsons" , 97@debbugs.gnu.org Date: Sat, 05 Apr 2008 18:03:46 -0400 Message-ID: <878wzs9cxp.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii The following valid Tcl script is recognized automatically as Tcl mode under Emacs 21 but as shell mode under Emacs 22: #!/bin/sh exec tclsh "$0" ${1+"$@"} puts test i.e., the shebang overrides the .tcl extension in determining programming mode. If the shebang specified /bin/tcl, it would be recognized as a Tcl file. In ambiguous situations like this, it's better to use a `-*-' line or local variables list (see the node "Choosing Modes" in the Emacs manual). From unknown Sun Aug 10 12:54:34 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: "William B. Parsons" Subject: bug#97 closed by Chong Yidong (Re: regression in Emacs 22 recognizing Tcl mode) Message-ID: References: <87prt1du21.fsf@stupidchicken.com> <20080329144608.E835A804C90@smtp.cshore.com> X-Emacs-PR-Message: they-closed 97 X-Emacs-PR-Package: emacs Reply-To: 97@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1207618207-16503-1" This is a multi-part message in MIME format... ------------=_1207618207-16503-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #97: regression in Emacs 22 recognizing Tcl mode It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 97: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D97 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1207618207-16503-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From cyd@stupidchicken.com Mon Apr 7 18:21:02 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-0.1 required=4.0 tests=AWL autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 97-close) by emacsbugs.donarmstrong.com; 8 Apr 2008 01:21:02 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m381KwlO014317 for <97-close@emacsbugs.donarmstrong.com>; Mon, 7 Apr 2008 18:21:00 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id C86504E2ED; Mon, 7 Apr 2008 21:17:10 -0400 (EDT) From: Chong Yidong To: 97-close@debbugs.gnu.org Subject: Re: regression in Emacs 22 recognizing Tcl mode Date: Mon, 07 Apr 2008 21:17:10 -0400 Message-ID: <87prt1du21.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii ------------=_1207618207-16503-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From monnier@iro.umontreal.ca Sat Mar 29 15:53:39 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 29 Mar 2008 22:53:39 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m2TMrWwA022379 for ; Sat, 29 Mar 2008 15:53:33 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhUGAKNl7kfO+LLN/2dsb2JhbACBWpBpljQ X-IronPort-AV: E=Sophos;i="4.25,576,1199682000"; d="scan'208";a="17138473" Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 29 Mar 2008 18:53:26 -0400 Received: from pastel.home ([206.248.178.205]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id JZE34326 for ; Sat, 29 Mar 2008 18:53:26 -0400 Received: by pastel.home (Postfix, from userid 20848) id 095017FDF; Sat, 29 Mar 2008 18:53:26 -0400 (EDT) Resent-Message-ID: Resent-To: submit@debbugs.gnu.org Resent-From: Stefan Monnier Resent-Date: Sat, 29 Mar 2008 18:53:26 -0400 X-Original-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 DB36F2CFAA9 for ; Sat, 29 Mar 2008 18:08:24 -0400 (EDT) Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by perlin.iro.umontreal.ca (Postfix) with ESMTP id 5BF0C148218 for ; Sat, 29 Mar 2008 18:08:20 -0400 (EDT) Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfjDn-0006E5-Ks for monnier@iro.umontreal.ca; Sat, 29 Mar 2008 18:08:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JfcJY-0008CL-Ej for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 10:45:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JfcJX-0008Bu-PG for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 10:45:48 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfcJX-0008Bo-Kw for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 10:45:47 -0400 Received: from smtp.cshore.com ([206.123.82.219]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JfcJX-0007wT-BX for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 10:45:47 -0400 Received: from isis.thalatta.eme (adsl25-202.cshore.com [65.113.125.202]) by smtp.cshore.com (Postfix) with ESMTP id E835A804C90 for ; Sat, 29 Mar 2008 10:46:08 -0400 (EDT) From: "William B. Parsons" To: bug-gnu-emacs@gnu.org Message-Id: <20080329144608.E835A804C90@smtp.cshore.com> Date: Sat, 29 Mar 2008 10:46:08 -0400 (EDT) X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) X-Mailman-Approved-At: Sat, 29 Mar 2008 18:05:55 -0400 Subject: regression in Emacs 22 recognizing Tcl mode X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org Errors-To: 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=-1.94, requis 5, BAYES_00 -2.60, RECEIVED_FROM_NOUNK 0.66, SPF_HELO_PASS -0.00) X-DIRO-MailScanner-From: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.3.1 (i386--freebsd, X toolkit, Xaw3d scroll bars) of 2006-03-16 on gohan31.freebsd.org configured using `configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --prefix=/usr/local i386--freebsd' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: The following valid Tcl script is recognized automatically as Tcl mode under Emacs 21 but as shell mode under Emacs 22: ------ isis% cat test.tcl #!/bin/sh #\ exec tclsh "$0" ${1+"$@"} puts test ------ i.e., the shebang overrides the .tcl extension in determining programming mode. ------------=_1207618207-16503-1-- From rgm@gnu.org Wed Jun 3 17:28:46 2009 Received: (at control) by emacsbugs.donarmstrong.com; 4 Jun 2009 00:28:47 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-8.3 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n540SgA6010180; Wed, 3 Jun 2009 17:28:43 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MC0ox-0006Ny-IR; Wed, 03 Jun 2009 20:28:39 -0400 From: Glenn Morris To: Will Parsons Cc: 3354@debbugs.gnu.org Subject: Re: bug#3354: tcl-mode regression in Emacs 22 References: <20090523.135622.258140755.wbparsons@cshore.com> X-Spook: ARPA Baranyi KGB S Box Rubin pipeline e-cash eternity X-Ran: X\821HquZHLxHRp/ZZ~4oFU=ZW.O68KQ2wxBgK&MMfV28spiQ4n4?sG&GP#j,}%~K"iptN X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 03 Jun 2009 20:28:39 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii unarchive 97 forcemerge 97 3354 stop Will Parsons wrote: > The following valid Tcl script is recognized automatically as Tcl mode > under Emacs 21 but as shell mode under Emacs 22: > > ------ > isis% cat test.tcl > #!/bin/sh > #\ > exec tclsh "$0" ${1+"$@"} > puts test [...] > Using a shebang of "#!/bin/tclsh" is not portable, since tclsh may be > installed elsewhere (typically /usr/local/bin). #!/usr/bin/env tclsh (and give it whatever extension you like.) But this has problems for argument passing. > I am aware that "-*-" can be used to force recognition of Tcl mode, > but this should not be necessary if the script has a ".tcl" > extension, and in fact it is not necessary in versions of Emacs > prior to version 22, so the current behaviour is a regression. It's a change. > If for some reason a decision was made to have the shebang override > the extension to determine the mode, then there should be an easy > way of getting back the previous behaviour, *without* having to add > instructions to Emacs to the script files themselves. (setq interpreter-mode-alist (delete (assoc "sh" interpreter-mode-alist) interpreter-mode-alist)) (but #!/bin/sh scripts without filename extensions, which are numerous, will no longer be opened in sh-mode). I don't know what the reason is for giving interpreter-mode-alist the highest priority (above magic-mode-alist as well). The only reference I can find is: http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-10/msg00215.html which just says "I feel this [the old behaviour] to be wrong", with no examples.