From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrew Pennebaker Newsgroups: gmane.emacs.bugs Subject: bug#17991: shell-mode: fails to recognize .bashrc files as shell scripts Date: Thu, 10 Jul 2014 14:17:29 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf301afbff0c445404fddbadc0 X-Trace: ger.gmane.org 1405019908 28443 80.91.229.3 (10 Jul 2014 19:18:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jul 2014 19:18:28 +0000 (UTC) Cc: 17991@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 10 21:18:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X5JrF-0000zJ-NP for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Jul 2014 21:18:17 +0200 Original-Received: from localhost ([::1]:39716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5JrF-0006Ke-AV for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Jul 2014 15:18:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5Jr6-0006F8-0h for bug-gnu-emacs@gnu.org; Thu, 10 Jul 2014 15:18:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5Jr0-0007Pr-Hu for bug-gnu-emacs@gnu.org; Thu, 10 Jul 2014 15:18:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5Jr0-0007Pn-EH for bug-gnu-emacs@gnu.org; Thu, 10 Jul 2014 15:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X5Jr0-0006d6-24 for bug-gnu-emacs@gnu.org; Thu, 10 Jul 2014 15:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrew Pennebaker Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Jul 2014 19:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17991 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 17991-submit@debbugs.gnu.org id=B17991.140501986425451 (code B ref 17991); Thu, 10 Jul 2014 19:18:01 +0000 Original-Received: (at 17991) by debbugs.gnu.org; 10 Jul 2014 19:17:44 +0000 Original-Received: from localhost ([127.0.0.1]:52560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5Jqe-0006cJ-F5 for submit@debbugs.gnu.org; Thu, 10 Jul 2014 15:17:44 -0400 Original-Received: from mail-ig0-f169.google.com ([209.85.213.169]:51876) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5JqZ-0006bs-A2 for 17991@debbugs.gnu.org; Thu, 10 Jul 2014 15:17:39 -0400 Original-Received: by mail-ig0-f169.google.com with SMTP id r10so3380257igi.0 for <17991@debbugs.gnu.org>; Thu, 10 Jul 2014 12:17:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=NhjxjoUR2dm0fTq8yJ3Mo7MmyS4wsQagxBUYcZP9cvM=; b=sEbgSpxzWMyW7s9ThAao8ckln4BUWFQ8gRDG/R+11H3A3rwsHoO0YIw+8/CSg9mi3O HbgkRPgsJn52S9/6MO7BIMsYGuaroUnEpcWIGiLcVVTuNeDRmRbYFCCiCwn7N+E01spL HAIG5Hrkmm62txdomR6J4ELdh61diJshobRR4K9+eF3g4o5fPm+6/O33KMg3e5pN60NK VXaoL9Al8rFkqDU6SF0Xnc1utFogmkd4fqnJ7sRLZuuhIGox3h3XYUB/RvA7xyTK/umz WAMItvHu5fuxm/Sq2xhbDoAEjOL/8QvYuD4g8CHmg15PlpmmYPAOhOZhoSoI1cO5y9dJ MLLw== X-Received: by 10.42.202.14 with SMTP id fc14mr57422716icb.8.1405019849767; Thu, 10 Jul 2014 12:17:29 -0700 (PDT) Original-Received: by 10.42.16.16 with HTTP; Thu, 10 Jul 2014 12:17:29 -0700 (PDT) In-Reply-To: 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 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+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91406 Archived-At: --20cf301afbff0c445404fddbadc0 Content-Type: text/plain; charset=UTF-8 Yes, same on my machine. I think this problem is specific to alternative config files (I've got a ".bashrc" for primary computer, ".bashrc-cygwin" for Windows, ".bashrc-android" for Android, and so on. Could the default auto-mode-alist entry be tweaked to include any file with ".bashrc" as a prefix? On Thu, Jul 10, 2014 at 1:23 PM, Glenn Morris wrote: > Andrew Pennebaker wrote: > > > Would be helpful if shell-mode understood that .bashrc*, .profile*, etc. > > are shell scripts. Right now, they are treated as fundamental. > > Works for me. > > emacs-24.3 -Q .profile -> shell-script > emacs-24.3 -Q .bashrc -> shell-script > > C-h v auto-mode-alist > ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) > ("\\(/\\|\\`\\)\\.\\(bash_profile\\|z?login\\|bash_login\\|z?logout\\)\\'" > . sh-mode) > > ("\\(/\\|\\`\\)\\.\\(bash_logout\\|shrc\\|[kz]shrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" > . sh-mode) > -- Cheers, Andrew Pennebaker www.yellosoft.us --20cf301afbff0c445404fddbadc0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes, same on my machine.

I think this problem = is specific to alternative config files (I've got a ".bashrc"= for primary computer, ".bashrc-cygwin" for Windows, ".bashr= c-android" for Android, and so on.

Could the default auto-mode-alist entry be tweaked to include any= file with ".bashrc" as a prefix?


On Thu, Jul 10, 2014 at 1:23 PM, Gl= enn Morris <rgm@gnu.org> wrote:
Andrew Pennebaker wrote:

> Would be helpful if shell-mode understood that .bashrc*, .profile*, et= c.
> are shell scripts. Right now, they are treated as fundamental.

Works for me.

emacs-24.3 -Q .profile =C2=A0 =C2=A0-> shell-script
emacs-24.3 -Q .bashrc =C2=A0 =C2=A0 -> shell-script

C-h v auto-mode-alist
=C2=A0("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'"= ; . sh-mode)
=C2=A0("\\(/\\|\\`\\)\\.\\(bash_profile\\|z?login\\|bash_login\\|z?log= out\\)\\'"
=C2=A0. sh-mode)
=C2=A0("\\(/\\|\\`\\)\\.\\(bash_logout\\|shrc\\|[kz]shrc\\|bashrc\\|t?= cshrc\\|esrc\\)\\'"
=C2=A0. sh-mode)



--
Cheers,
=
Andrew Pennebaker
--20cf301afbff0c445404fddbadc0--