GNU bug report logs - #9110
how to map sh-mode to mean bash-mode

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Sun, 17 Jul 2011 20:43:01 UTC

Severity: wishlist

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: jidanni <at> jidanni.org
Subject: bug#9110: closed (Re: bug#9110: how to map sh-mode to mean bash-mode)
Date: Sun, 17 Jul 2011 23:03:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#9110: how to map sh-mode to mean bash-mode

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 9110 <at> debbugs.gnu.org.

-- 
9110: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9110
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 9110-done <at> debbugs.gnu.org
Subject: Re: bug#9110: how to map sh-mode to mean bash-mode
Date: Sun, 17 Jul 2011 19:02:26 -0400
jidanni <at> jidanni.org wrote:

> As you know, the bash shell likes to call itself sh sometimes.
> But it is really still bash.

No, it isn't.

> Hence I would like to make my emacs assume anything it thinks is sh is
> really bash, and thus show me "bash" in the mode line, not "sh", no
> matter how smart it thinks it is.

(add-hook 'sh-mode-hook
          '(lambda () (and buffer-file-name
                           (string-match "\\.sh\\'" buffer-file-name)
                           (sh-set-shell "bash"))))

[Message part 3 (message/rfc822, inline)]
From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Cc: help-gnu-emacs <at> gnu.org, andreas.roehler <at> easy-emacs.de, pedzsan <at> gmail.com
Subject: Re: how to map sh-mode to mean bash-mode
Date: Mon, 18 Jul 2011 04:42:37 +0800
Dear bug-gnu-emacs,
There is no way to map sh-mode to bash-mode.
As you know, the bash shell likes to call itself sh sometimes.
But it is really still bash.
Hence I would like to make my emacs assume anything it thinks is sh is
really bash, and thus show me "bash" in the mode line, not "sh", no
matter how smart it thinks it is. See also
http://lists.gnu.org/archive/html/help-gnu-emacs/2011-07/msg00143.html
However the real solution should be a one liner of lisp in ones .emacs.



This bug report was last modified 13 years and 306 days ago.

Previous Next


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