emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [DISCUSSION] Refactoring fontification system
Date: Wed, 08 Jun 2022 16:35:38 +1000	[thread overview]
Message-ID: <87mtenzm8k.fsf@gmail.com> (raw)
In-Reply-To: <CA+G3_PPYmiiwHYKkgiJDZQ=o7DvaG=0G3aQnPHSBKEMZsOyG-g@mail.gmail.com>

Tom Gillespie <tgbugs@gmail.com> writes:

>> As for lang parameter support in example blocks, would you mind creating
>> a separate feature request thread? Extending export blocks export will
>> require changing in parser syntax and thus should be discussed carefully
>> in a separate thread.
> I would strongly caution against allowing an optional #+begin_example lang
> syntax. It will lead to extreme confusion, even when users know to use org-lint.
> The reason for this is that example blocks do not have (and frankly should not
> have) full org-babel support. Babel is already complex enough as is without
> having to explain to a user that yes they can noweb an example block into
> a src block, but that they cannot noweb a source block into an example block.
> One of the most powerful features of src blocks is that they can go from being
> dumb examples all the way up to fully executable programs. Example blocks
> cannot do that, and adding features that overlap with code blocks is inviting
> duplicated effort and will confuse and frustrate users if they have
> the misfortune
> to start with an example block an then have to change mid way through to a
> code block.
> I also think that adding a parameter #+begin_example :lang bash to example
> blocks will also lead to confusion because now there are two different ways
> to specify what lang a block is. To me the answer should be to just use source
> blocks if you need highlighting, example blocks should not highlight at all in
> order to make the distinction clear.

+1. I hold the same view. 

I'm happy if example blocks have a highlighting which distinguishes them
as a 'block of something' i.e. slightly different background, smaller or different
font etc. However, they don't need font-locking style highlighting or
highlighting which is determined by a language setting. If you want that
level of highlighting, just use a src block, possibly disabling eval
when warranted.

  reply	other threads:[~2022-06-08  6:48 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 14:12 [DISCUSSION] Refactoring fontification system Ihor Radchenko
2021-11-19 14:18 ` Bruce D'Arcus
2021-11-19 16:09 ` Tim Cross
2021-11-24 22:03 ` Nicolas Goaziou
2022-06-03  9:45 ` Ihor Radchenko
2022-06-03 20:37   ` Ted Reed via General discussions about Org-mode.
2022-06-04 13:45     ` Ihor Radchenko
2022-06-04 23:28       ` Ted Reed via General discussions about Org-mode.
2022-06-03 21:38   ` Tim Cross
2022-06-07 16:48   ` Max Nikulin
2022-06-08  2:02     ` Ihor Radchenko
2022-06-08  4:23       ` Tom Gillespie
2022-06-08  6:35         ` Tim Cross [this message]
2022-06-09 15:31         ` Max Nikulin
2022-06-10  2:06           ` [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system) Ihor Radchenko
2022-06-15  3:40             ` Max Nikulin
2022-06-16 12:31               ` Ihor Radchenko
2022-06-16 12:33               ` [BUG] Unescaped #+ lines in WORG example blocks (was: [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system)) Ihor Radchenko
2022-06-16 16:33                 ` Tim Cross
2024-04-15 13:44                 ` Ihor Radchenko
2022-06-16 15:08       ` [DISCUSSION] Refactoring fontification system Max Nikulin
2022-06-08  6:52   ` Phil Estival
2023-05-30 11:25   ` [RFC] Refactoring org-element API (was: [DISCUSSION] Refactoring fontification system) Ihor Radchenko
2023-05-30 11:32     ` Ihor Radchenko
2023-05-30 15:00     ` [RFC] Refactoring org-element API Stefan Nobis
2023-05-31  8:57       ` Ihor Radchenko
2023-06-23 12:20         ` Ihor Radchenko
2023-06-30 13:53           ` Ihor Radchenko
2023-07-01 11:44     ` [RFC] Refactoring org-element API (was: [DISCUSSION] Refactoring fontification system) Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtenzm8k.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).