Subject: bug#77025: 31.0.50; Can't activate bash-ts-mode without a shebang

From: the_wurfkreuz <[email-masked]>
Date: Sat, 15 Mar 2025 12:02:38 +0000

I've tried to build with the latest commit, the end result is the same. I also tried to install the latest stable version of emacs (30.1) using nix. Same thing.

I attached a video snippet.

On Saturday, March 15th, 2025 at 10:37 AM, Eli Zaretskii <[email-masked]> wrote:

> > Date: Sat, 15 Mar 2025 06:41:10 +0000
> > From: the_wurfkreuz via "Bug reports for GNU Emacs,
> > the Swiss army knife of text editors" [email-masked]
> >
> > If i try to activate bash-ts-mode in a file without a shebang, it
> > falls back to using shell-mode with zsh indentation.
> >
> > Steps to reproduce:
> >
> > 1. emacs -Q
> > 2. Clear out the scratch buffer from any text and paste this code into
> > the scratch buffer:
> >
> > add_service() {
> > ln -s "$service_path" /var/service/
> > echo "Service is added:"
> > service_name=$(basename "$service_path")
> > ls -la /var/service/ | grep "$service_name"
> > }
> >
> > 3. If bash treesitter grammar isn't available, i usually install it
> > through the `treesit-install-language-grammar` command with all the
> > default options.
> > 4. M-x bash-ts-mode
> >
> > It returns this message "Indentation setup for shell type zsh", and
> > instead of using bash-ts-mode it uses sh-mode.
>
>
> I cannot reproduce this with today's master branch. Your build seems
> to be from an old (Jan 20) checkout of the master branch, so please
> try to sync from upstream and then see if the problem persists.