GNU bug report logs - #17158
24.4.50; sh-mode does not use auto-mode-interpreter-regexp to find shell type

Previous Next

Package: emacs;

Reported by: Christopher Monsanto <chris <at> monsan.to>

Date: Tue, 1 Apr 2014 11:38:01 UTC

Severity: minor

Tags: fixed

Found in version 24.4.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17158 in the body.
You can then email your comments to 17158 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17158; Package emacs. (Tue, 01 Apr 2014 11:38:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Monsanto <chris <at> monsan.to>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 01 Apr 2014 11:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Monsanto <chris <at> monsan.to>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; sh-mode does not use auto-mode-interpreter-regexp to find
 shell type
Date: Tue, 1 Apr 2014 07:36:29 -0400
[Message part 1 (text/plain, inline)]
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 <at> monsan.to  --  http://monsan.to/
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17158; Package emacs. (Wed, 20 Jan 2021 02:27:02 GMT) Full text and rfc822 format available.

Message #8 received at 17158 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Christopher Monsanto <chris <at> monsan.to>
Cc: 17158 <at> debbugs.gnu.org
Subject: Re: bug#17158: 24.4.50; sh-mode does not use
 auto-mode-interpreter-regexp to find shell type
Date: Wed, 20 Jan 2021 03:26:02 +0100
Christopher Monsanto <chris <at> monsan.to> 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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 20 Jan 2021 02:27:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 17158 <at> debbugs.gnu.org and Christopher Monsanto <chris <at> monsan.to> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 20 Jan 2021 02:27:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 17 Feb 2021 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.