From unknown Sun Jun 22 11:33:31 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#17158 <17158@debbugs.gnu.org> To: bug#17158 <17158@debbugs.gnu.org> Subject: Status: 24.4.50; sh-mode does not use auto-mode-interpreter-regexp to find shell type Reply-To: bug#17158 <17158@debbugs.gnu.org> Date: Sun, 22 Jun 2025 18:33:31 +0000 retitle 17158 24.4.50; sh-mode does not use auto-mode-interpreter-regexp to= find shell type reassign 17158 emacs submitter 17158 Christopher Monsanto severity 17158 minor tag 17158 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 01 07:37:31 2014 Received: (at submit) by debbugs.gnu.org; 1 Apr 2014 11:37:31 +0000 Received: from localhost ([127.0.0.1]:58874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WUx0U-0001Rb-LG for submit@debbugs.gnu.org; Tue, 01 Apr 2014 07:37:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58770) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WUx0S-0001RT-Eq for submit@debbugs.gnu.org; Tue, 01 Apr 2014 07:37:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUx0M-0001Qo-3G for submit@debbugs.gnu.org; Tue, 01 Apr 2014 07:37:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUx0M-0001Qb-0Z for submit@debbugs.gnu.org; Tue, 01 Apr 2014 07:37:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUx0G-0006Tv-Tb for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 07:37:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUx0B-0001Ja-DE for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 07:37:16 -0400 Received: from mail-oa0-f50.google.com ([209.85.219.50]:50059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUx0B-0001J3-8r for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 07:37:11 -0400 Received: by mail-oa0-f50.google.com with SMTP id i7so11224421oag.9 for ; Tue, 01 Apr 2014 04:37:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=hAFX0ysksUffS5RsoAh3XtqbnCM9fb02agw7WGirSgM=; b=mQIpXC8onA4TMEnKou7rNVGdL1jmlYhwWGrg7YT5zTxx04nn9WJjATwPBsIAbYdmAi AewVmItjjDst+uCz2yc1D1Xno3PvMQbESqy1FI2w19vm4gzEBZ7SvpaWcQN12ry01GMj 9qorHqXjn8m3JTd+oamZZek1cleZbYk0mv+pguNQsBuLyMvEToh+PG8SqrTxwD8QPCZO CGXSHnoRjCT464a/XoqOJgJi0wmQTVShGa1cWvkAhjWkCVQ5qy9ca465kLqdbBFUmBCl NWMynCmn8XzZbyxIFyM+8JW2zRMAu4WPKYTEZbi2wtEU2eM4x/g2fYMwXzmg8kO1Btnp eMtg== X-Gm-Message-State: ALoCoQkTgY7GNOy1GK+HUeXdAkUhDFLmBhAaqt5o7J9Bx6AZ6fVu0zOSZ0i8/8/XBVFRgbq76pSD X-Received: by 10.182.118.169 with SMTP id kn9mr8252372obb.46.1396352229651; Tue, 01 Apr 2014 04:37:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.175.103 with HTTP; Tue, 1 Apr 2014 04:36:29 -0700 (PDT) From: Christopher Monsanto Date: Tue, 1 Apr 2014 07:36:29 -0400 Message-ID: Subject: 24.4.50; sh-mode does not use auto-mode-interpreter-regexp to find shell type To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=089e0149cdc8a2f19504f5f9968a X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] 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 (-----) --089e0149cdc8a2f19504f5f9968a Content-Type: text/plain; charset=UTF-8 See title; In sh-script.el, line ~1631 > (cond ((save-excursion > (goto-char (point-min)) > (looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)")) This appears to duplicate auto-mode-interpreter-regexp in files.el, line ~2593: > (defvar auto-mode-interpreter-regexp > (purecopy "#![ \t]?\\([^ \t\n]*\ /bin/env[ \t]\\)?\\([^ \t\n]+\\)") This duplication makes it difficult to customize auto-mode-interpreter-regexp. A discrepancy will cause the wrong shell type (bash, ksh, csh, ...) to be selected. Christopher Monsanto chris@monsan.to -- http://monsan.to/ --089e0149cdc8a2f19504f5f9968a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
See title; In sh-script.el, line ~1631

&g= t; =C2=A0=C2=A0 (cond ((save-excursion
>=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (goto-char (point-min))
> =C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (looking-at "#![ \= t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)"))

This appears to duplicate auto-mode-interpreter-regexp in files.e= l, line ~2593:

> (defvar auto-mode-interpreter-regexp
>=C2= =A0 (purecopy "#![ \t]?\\([^ \t\n]*\
/bin/env[ \t]\\)?\\([^ \t\n]+= \\)")

This duplication makes it difficult to customize auto-mode-interp= reter-regexp. A discrepancy will cause the wrong shell type (bash, ksh, csh= , ...) to be selected.

Christopher= Monsanto
chris@monsan.to=C2= =A0 --=C2=A0 http://monsan.= to/

--089e0149cdc8a2f19504f5f9968a-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 19 21:26:24 2021 Received: (at 17158) by debbugs.gnu.org; 20 Jan 2021 02:26:24 +0000 Received: from localhost ([127.0.0.1]:52251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l23CS-0002aT-Bb for submit@debbugs.gnu.org; Tue, 19 Jan 2021 21:26:24 -0500 Received: from quimby.gnus.org ([95.216.78.240]:38722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l23CQ-0002aD-AL for 17158@debbugs.gnu.org; Tue, 19 Jan 2021 21:26:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Rl6JECn6bScvBTt1uypOgvf7yTD5cHrODoHADizTae0=; b=KuD9nFwlWeoVCPToV7JoEWnf79 0OuQpnv/bU8GZH8WiaTbWN3uF9dQv95nJrsmwl0lP97ukafqZ851SiSkaKdu3IfSkDHOKL2Hg6HwL H04vo3iUAAR2XYURQNKbj0qPq9WGwnuFLDN5ltD4MZhHLxV0tR3MWXM/5AYvQYrLZAFE=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l23C8-0007zs-3q; Wed, 20 Jan 2021 03:26:16 +0100 From: Lars Ingebrigtsen To: Christopher Monsanto Subject: Re: bug#17158: 24.4.50; sh-mode does not use auto-mode-interpreter-regexp to find shell type References: X-Now-Playing: Hannah Jones's _The Remixes (CD3)_: "Bridge Over Troubled Water (Mary's In Deep Water Mix)" Date: Wed, 20 Jan 2021 03:26:02 +0100 In-Reply-To: (Christopher Monsanto's message of "Tue, 1 Apr 2014 07:36:29 -0400") Message-ID: <87wnw85op1.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Christopher Monsanto writes: > See title; In sh-script.el, line ~1631 > >> (cond ((save-excursion >> (goto-char (point-min)) >> (looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)")) > > This appears to duplicate au [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17158 Cc: 17158@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (-) Christopher Monsanto writes: > See title; In sh-script.el, line ~1631 > >> (cond ((save-excursion >> (goto-char (point-min)) >> (looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)")) > > This appears to duplicate auto-mode-interpreter-regexp in files.el, line ~2593: > >> (defvar auto-mode-interpreter-regexp >> (purecopy "#![ \t]?\\([^ \t\n]*\ > /bin/env[ \t]\\)?\\([^ \t\n]+\\)") > > This duplication makes it difficult to customize auto-mode-interpreter-regexp. A > discrepancy will cause the wrong shell type (bash, ksh, csh, ...) to be selected. This is now fixed in Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 19 21:26:29 2021 Received: (at control) by debbugs.gnu.org; 20 Jan 2021 02:26:29 +0000 Received: from localhost ([127.0.0.1]:52254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l23CX-0002am-LE for submit@debbugs.gnu.org; Tue, 19 Jan 2021 21:26:29 -0500 Received: from quimby.gnus.org ([95.216.78.240]:38736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l23CW-0002aL-2O for control@debbugs.gnu.org; Tue, 19 Jan 2021 21:26:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zAQcUR7fKUNqOPXiz3oyy7JVzAe536KBMi8ETqQ6k28=; b=YxmNcza5tchV6OgyAoVEpqhlxm dVkLfzkey8juQBiudRciPx3vWuzSZXWsS2nrmFfE/F4MSapQhZ29j+vFGUP8zuDy+V3+SBnh4peVS 0shfiyuZSzfyA/Pb55A7pL8VCJBp1yVZXNguWWOt4yg5TyTUfuD9xPj75TfoWsmEHQ1s=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l23CO-00082B-Da for control@debbugs.gnu.org; Wed, 20 Jan 2021 03:26:22 +0100 Date: Wed, 20 Jan 2021 03:26:19 +0100 Message-Id: <87v9bs5ook.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #17158 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 17158 fixed close 17158 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (-) tags 17158 fixed close 17158 28.1 quit From unknown Sun Jun 22 11:33:31 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, 17 Feb 2021 12:24:11 +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