emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-mode: example blocks are no longer syntax highlighted in emacs


From: Bruno Barbier
Subject: Re: org-mode: example blocks are no longer syntax highlighted in emacs
Date: Thu, 22 Feb 2024 16:47:15 +0100

Hi Rudi,

Rudi C <rudiwillalwaysloveyou@gmail.com> writes:

> After upgrading to emacs 29.2 and org 9.7, my example blocks are no longer
> syntax highlighted in emacs. They used to be syntax highlighted when I
> specified the block's language. Any ideas?
>
> I use Doom, so it might have been a third-party feature.
>
> I know org-mode officially suggests that example blocks should not have
> syntax highlighting, but I want it anyway. IMO `:eval never` is just not as
> good,

Why is `:eval never` not as good ?  You don't have to write it on each
code block; you may set it globally, per file, per headline, etc.

See https://orgmode.org/manual/Using-Header-Arguments.html.


> not to mention tools like `pandoc` also produce example blocks from
> markdown source blocks.

My version of pandoc generates org source blocks from markdown code
blocks (pandoc 3.1.11.1).

I'm not sure you'll get a better answer than this SE answer:

  
https://emacs.stackexchange.com/questions/76466/how-do-i-get-syntax-highlighting-in-example-blocks-when-exporting-org-mode-to-ht

I.e. "begin_example" is just not designed for source blocks.  It
may have worked by chance before.

Hoping this helps,

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]