emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-mode: example blocks are no longer syntax highlighted in emacs
@ 2024-02-22 15:02 Rudi C
  2024-02-25 10:04 ` Ihor Radchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Rudi C @ 2024-02-22 15:02 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

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, not to mention tools like `pandoc` also produce example blocks from
markdown source blocks.

Current Behavior:
[![enter image description here][1]][1]

Old (Correct) Behavior:
[![enter image description here][2]][2]

I have asked about this on SE:
- [org-mode: example blocks are no longer syntax highlighted in emacs -
Emacs Stack Exchange](
https://emacs.stackexchange.com/questions/80459/org-mode-example-blocks-are-no-longer-syntax-highlighted-in-emacs
)

PS: Please use reply-to-all, I am not subscribed to the list.


  [1]: https://i.stack.imgur.com/U9II9.png
  [2]: https://i.stack.imgur.com/lNNtO.png

[-- Attachment #2: Type: text/html, Size: 1410 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: org-mode: example blocks are no longer syntax highlighted in emacs
@ 2024-02-22 15:47 Bruno Barbier
  2024-02-22 20:08 ` Rudi C
  0 siblings, 1 reply; 8+ messages in thread
From: Bruno Barbier @ 2024-02-22 15:47 UTC (permalink / raw)
  To: Rudi C, emacs-orgmode


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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-28 12:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 15:02 org-mode: example blocks are no longer syntax highlighted in emacs Rudi C
2024-02-25 10:04 ` Ihor Radchenko
2024-02-26  0:39   ` Rudi C
2024-02-26 11:05   ` Max Nikulin
2024-02-28 12:13     ` Ihor Radchenko
  -- strict thread matches above, loose matches on Subject: below --
2024-02-22 15:47 Bruno Barbier
2024-02-22 20:08 ` Rudi C
2024-02-23 10:35   ` Bruno Barbier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).