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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Christopher Monsanto <chris@HIDDEN>; dated Tue, 1 Apr 2014 11:38:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Apr 2014 11:37:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 01 07:37:31 2014
Received: from localhost ([127.0.0.1]:58874 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WUx0U-0001Rb-LG
	for submit <at> 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 <chris@HIDDEN>) id 1WUx0S-0001RT-Eq
 for submit <at> 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 <chris@HIDDEN>) id 1WUx0M-0001Qo-3G
 for submit <at> 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 <chris@HIDDEN>) id 1WUx0M-0001Qb-0Z
 for submit <at> 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 <chris@HIDDEN>) id 1WUx0G-0006Tv-Tb
 for bug-gnu-emacs@HIDDEN; Tue, 01 Apr 2014 07:37:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <chris@HIDDEN>) id 1WUx0B-0001Ja-DE
 for bug-gnu-emacs@HIDDEN; 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 <chris@HIDDEN>) id 1WUx0B-0001J3-8r
 for bug-gnu-emacs@HIDDEN; Tue, 01 Apr 2014 07:37:11 -0400
Received: by mail-oa0-f50.google.com with SMTP id i7so11224421oag.9
 for <bug-gnu-emacs@HIDDEN>; 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 <chris@HIDDEN>
Date: Tue, 1 Apr 2014 07:36:29 -0400
Message-ID: <CAC5n7TEoiyXWpuxcAWCQ6LNHwPaafU0hcXn9eM=4Qs7Lei4mAw@HIDDEN>
Subject: 24.4.50; sh-mode does not use auto-mode-interpreter-regexp to find
 shell type
To: bug-gnu-emacs@HIDDEN
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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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@HIDDEN  --  http://monsan.to/

--089e0149cdc8a2f19504f5f9968a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>See title; In sh-script.el, line ~1631<br><div><br>&g=
t; =C2=A0=C2=A0 (cond ((save-excursion<br>&gt;=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))<br>&gt; =C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (looking-at &quot;#![ \=
t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)&quot;))<br>

<br></div>This appears to duplicate auto-mode-interpreter-regexp in files.e=
l, line ~2593:<br><br>&gt; (defvar auto-mode-interpreter-regexp<br>&gt;=C2=
=A0 (purecopy &quot;#![ \t]?\\([^ \t\n]*\ <br>/bin/env[ \t]\\)?\\([^ \t\n]+=
\\)&quot;)<br>

<br></div>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.<br><div><div><div><br clear=3D"all"><div>Christopher=
 Monsanto<br>

<a href=3D"mailto:chris@HIDDEN" target=3D"_blank">chris@HIDDEN</a>=C2=
=A0 --=C2=A0 <a href=3D"http://monsan.to/" target=3D"_blank">http://monsan.=
to/</a><br><br></div>
</div></div></div></div>

--089e0149cdc8a2f19504f5f9968a--




Acknowledgement sent to Christopher Monsanto <chris@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#17158; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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