GNU bug report logs -
#77025
31.0.50; Can't activate bash-ts-mode without a shebang
Previous Next
Reported by: the_wurfkreuz <the_wurfkreuz <at> proton.me>
Date: Sat, 15 Mar 2025 06:42:02 UTC
Severity: normal
Found in version 31.0.50
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> On Mar 15, 2025, at 5:40 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> Date: Sat, 15 Mar 2025 12:02:38 +0000
>> From: the_wurfkreuz <the_wurfkreuz <at> proton.me>
>> Cc: 77025 <at> debbugs.gnu.org
>>
>> 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.
>
> There's no need for video clips, I believe you. I just cannot
> reproduce this.
>
> Could this be due to some outdated or newer grammar library?
>
> Or maybe this is specific to GNU/Linux for some reason?
>
> Can someone please try reproducing this and debugging it? Yuan?
I guess that’s because your default shell is bash. On my machine, my default shell is fish, so it falls back to sh-mode too. When bash-ts-mode is enabled, it does an extra check to see if the file is actually bash, if it can’t be sure, it falls back to sh-mode. See sh--redirect-bash-ts-mode.
If you enable bash-ts-mode in a file that ends with “.sh”, it should stay in bash-ts-mode.
Yuan
This bug report was last modified 54 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.