[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DISCUSSION] Refactoring fontification system
From: |
Tim Cross |
Subject: |
Re: [DISCUSSION] Refactoring fontification system |
Date: |
Wed, 08 Jun 2022 16:35:38 +1000 |
User-agent: |
mu4e 1.7.26; emacs 28.1.50 |
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.
- Re: [DISCUSSION] Refactoring fontification system, Ihor Radchenko, 2022/06/03
- Re: [DISCUSSION] Refactoring fontification system, Ted Reed, 2022/06/03
- Re: [DISCUSSION] Refactoring fontification system, Tim Cross, 2022/06/03
- Re: [DISCUSSION] Refactoring fontification system, Max Nikulin, 2022/06/07
- Re: [DISCUSSION] Refactoring fontification system, Ihor Radchenko, 2022/06/07
- Re: [DISCUSSION] Refactoring fontification system, Tom Gillespie, 2022/06/08
- Re: [DISCUSSION] Refactoring fontification system,
Tim Cross <=
- Re: [DISCUSSION] Refactoring fontification system, Max Nikulin, 2022/06/09
- [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system), Ihor Radchenko, 2022/06/09
- Re: [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system), Max Nikulin, 2022/06/14
- Re: [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system), Ihor Radchenko, 2022/06/16
- [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
- Re: [BUG] Unescaped #+ lines in WORG example blocks (was: [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system)), Tim Cross, 2022/06/16
- Re: [DISCUSSION] Refactoring fontification system, Max Nikulin, 2022/06/16
Re: [DISCUSSION] Refactoring fontification system, Phil Estival, 2022/06/08