[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Font lock for org-babel shell scripts?
From: |
Matt |
Subject: |
Re: Font lock for org-babel shell scripts? |
Date: |
Tue, 28 Mar 2023 17:07:00 -0400 |
User-agent: |
Zoho Mail |
---- On Tue, 28 Mar 2023 13:24:39 -0400 Derek Chen-Becker wrote ---
> I'm trying to figure out whether there's a bug or just a misconfiguration on
> my end with font lock for org-babel shell source blocks. If I run emacs 28.2
> (with -q) and open the following org file, I can evaluate both source blocks
> but only the "bash" block has syntax highlighting. I've confirmed that
> opening a zsh script (e.g. with a zsh shebang) highlights correctly. If this
> list isn't the right place to ask about this issue, does someone know where
> I could look for help?
This is the right place to ask. And thanks for asking!
I'm able to reproduce it.
I'm not familiar with how Org handles the font lock. However, I notice that
calling C-c ' (`org-edit-special') results in the error: No such language
mode: zsh-mode
I suspect that without a language mode, Org has no way to know how to color the
block.
As a quick work around, you can define zsh-mode as shell-script-mode to get
coloring:
(defalias 'zsh-mode 'shell-script-mode)
- Font lock for org-babel shell scripts?, Derek Chen-Becker, 2023/03/28
- Re: Font lock for org-babel shell scripts?,
Matt <=
- [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?), Matt, 2023/03/28
- Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?), Ihor Radchenko, 2023/03/29
- Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?), Derek Chen-Becker, 2023/03/29
- Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?), Matt, 2023/03/29
- Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?), Ihor Radchenko, 2023/03/30
- Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?), Derek Chen-Becker, 2023/03/30
- Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?), Ihor Radchenko, 2023/03/31
- Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?), Derek Chen-Becker, 2023/03/31
- Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?), Ihor Radchenko, 2023/03/31