Re: [BUG] Unescaped #+ lines in WORG example blocks (was: [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system))

2024-04-15 Thread Ihor Radchenko
Ihor Radchenko writes: >>> -#+BEGIN_EXAMPLE org >>> +#+BEGIN_EXAMPLE >>> #+STARTUP: showall indent >>> #+STARTUP: hidestars >>> #+BEGIN_EXPORT html >> >> It is not the scope of this patch but looks like missed commas to escape >> leading "#". > > You are right. We need someone to look through

Re: [RFC] Refactoring org-element API (was: [DISCUSSION] Refactoring fontification system)

2023-07-01 Thread Ihor Radchenko
Ihor Radchenko writes: > In order not to turn org-element into another org-agenda, I am proposing > to factor out Org syntax tree API into a separate file > org-element-ast.el and add a number of breaking changes how the syntax > tree is structured. Applied, onto main. -- Ihor Radchenko // yan

Re: [RFC] Refactoring org-element API (was: [DISCUSSION] Refactoring fontification system)

2023-05-30 Thread Ihor Radchenko
Hi, Heads up to org-ml developers as the discussed change is very likely to break org-ml (https://github.com/ndwarshuis/org-ml). See https://list.orgmode.org/874jnudps5.fsf@localhost/T/#u -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . S

[RFC] Refactoring org-element API (was: [DISCUSSION] Refactoring fontification system)

2023-05-30 Thread Ihor Radchenko
Ihor Radchenko writes: > Ihor Radchenko writes: > >> Instead of fontifying elements individually via regexps, we can leverage >> org-element-map, org-element-parse-buffer, org-element-cache, and >> jit-lock-mode. Each type of Org element/object can be assigned with a >> fontification function ac

Re: [BUG] Unescaped #+ lines in WORG example blocks (was: [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system))

2022-06-16 Thread Tim Cross
Ihor Radchenko writes: > Max Nikulin writes: > >>> --- a/org-tutorials/org-jekyll.org >>> +++ b/org-tutorials/org-jekyll.org >>> @@ -172,7 +172,7 @@ * Creating an org File to be Published with Jekyll >>> >>> Below is a short extract from one of my org files showing my setup: >>> >>> -#+BE

Re: [DISCUSSION] Refactoring fontification system

2022-06-16 Thread Max Nikulin
On 08/06/2022 09:02, Ihor Radchenko wrote: Max Nikulin writes: Can you (and other interested users) try the following value of org-script-display and let me know if it looks acceptable: (defconst org-script-display '(;; The values are tweaked to not change ;; t

Re: [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system)

2022-06-16 Thread Ihor Radchenko
Max Nikulin writes: >> -#+begin_example org >> +#+begin_example >> ,* Parent capturing statistics [2/20] >>:PROPERTIES: >>:COOKIE_DATA: todo recursive > > It is consistent with other examples in the manual. Only one snippet is > wrapped into "#+begin_src org" and it is a recent addition

[BUG] Unescaped #+ lines in WORG example blocks (was: [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system))

2022-06-16 Thread Ihor Radchenko
Max Nikulin writes: >> --- a/org-tutorials/org-jekyll.org >> +++ b/org-tutorials/org-jekyll.org >> @@ -172,7 +172,7 @@ * Creating an org File to be Published with Jekyll >> >> Below is a short extract from one of my org files showing my setup: >> >> -#+BEGIN_EXAMPLE org >> +#+BEGIN_EXAMPLE >

Re: [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system)

2022-06-14 Thread Max Nikulin
On 10/06/2022 09:06, Ihor Radchenko wrote: Max Nikulin writes: Side note: I can not say that #+begin_example with language is widely used, but one case may be found in org-manual.org and a dozen in worg. Which should probably be fixed. LANG parameter is ignored on export anyway. See the attac

[PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system)

2022-06-09 Thread Ihor Radchenko
Max Nikulin writes: > Side note: I can not say that #+begin_example with language is widely > used, but one case may be found in org-manual.org and a dozen in worg. Which should probably be fixed. LANG parameter is ignored on export anyway. See the attached patches for WORG and emacs-manual. B

Re: [DISCUSSION] Refactoring fontification system

2022-06-09 Thread Max Nikulin
On 08/06/2022 11:23, Tom Gillespie wrote: 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 strong

Re:Re: [DISCUSSION] Refactoring fontification system

2022-06-08 Thread Pedro Andres Aranda Gutierrez
Max Niulin writes: >> On 03/06/2022 16:45, Ihor Radchenko wrote: >> >> From my point of view exporters may reuse code block formatters for >> examples. It would allow to pass options to e.g. LaTeX verbatim environment: >> Pedro Andres Aranda Gutierrez. Re: A question/bug report(?) Wed, 30 Mar >> 2

Re: [DISCUSSION] Refactoring fontification system

2022-06-07 Thread Phil Estival
[2022-06-03 Wed 11:45] Ihor Radchenko : > > I'd like to hear if anyone has any idea on how to interpret the > following: > > 1. org-protecting-blocks is an internal auxiliary variable used to >    determine which blocks should be fontified using different major >    mode. >    It's value is ("src"

Re: [DISCUSSION] Refactoring fontification system

2022-06-07 Thread Tim Cross
Tom Gillespie 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 c

Re: [DISCUSSION] Refactoring fontification system

2022-06-07 Thread Tom Gillespie
> 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 option

Re: [DISCUSSION] Refactoring fontification system

2022-06-07 Thread Ihor Radchenko
Max Nikulin writes: > On 03/06/2022 16:45, Ihor Radchenko wrote: >> >> 1. org-protecting-blocks is an internal auxiliary variable used to >> determine which blocks should be fontified using different major >> mode. >> It's value is ("src" "example" "export") >> So, #+begin_src la

Re: [DISCUSSION] Refactoring fontification system

2022-06-07 Thread Max Nikulin
On 03/06/2022 16:45, Ihor Radchenko wrote: 1. org-protecting-blocks is an internal auxiliary variable used to determine which blocks should be fontified using different major mode. It's value is ("src" "example" "export") So, #+begin_src lang and #+begin_export lang are fontified

Re: [DISCUSSION] Refactoring fontification system

2022-06-04 Thread General discussions about Org-mode.
Ihor Radchenko writes: > Have you tried > #+begin_src http :pretty :wrap "src json :eval no" > ? It does work the same, thanks! -- Ted Reed

Re: [DISCUSSION] Refactoring fontification system

2022-06-04 Thread Ihor Radchenko
Ted Reed writes: > #+begin_src http :pretty :wrap example json > ... > In this case, ob-http seems to default to generating example blocks. I > realized I could add a bit there to get it to fontify as JSON. Have you tried #+begin_src http :pretty :wrap "src json :eval no" ? It should give the s

Re: [DISCUSSION] Refactoring fontification system

2022-06-03 Thread Tim Cross
Ihor Radchenko writes: > Ihor Radchenko writes: > >> Instead of fontifying elements individually via regexps, we can leverage >> org-element-map, org-element-parse-buffer, org-element-cache, and >> jit-lock-mode. Each type of Org element/object can be assigned with a >> fontification function

Re: [DISCUSSION] Refactoring fontification system

2022-06-03 Thread General discussions about Org-mode.
Ihor Radchenko writes: > 1. org-protecting-blocks is an internal auxiliary variable used to >determine which blocks should be fontified using different major >mode. >It's value is ("src" "example" "export") >So, #+begin_src lang and #+begin_export lang are fontified according >

Re: [DISCUSSION] Refactoring fontification system

2022-06-03 Thread Ihor Radchenko
Ihor Radchenko writes: > Instead of fontifying elements individually via regexps, we can leverage > org-element-map, org-element-parse-buffer, org-element-cache, and > jit-lock-mode. Each type of Org element/object can be assigned with a > fontification function accepting a single argument - the

Re: [DISCUSSION] Refactoring fontification system

2021-11-24 Thread Nicolas Goaziou
Hello, Ihor Radchenko writes: > Recently, there have been multiple issues related to incorrect > fontification: > - https://list.orgmode.org/orgmode/23707.20428.546749.44...@frac.u-strasbg.fr/ > - https://list.orgmode.org/orgmode/87fsujp7mc@web.de/ > - https://list.orgmode.org/orgmode/87czvq

Re: [DISCUSSION] Refactoring fontification system

2021-11-19 Thread Tim Cross
Ihor Radchenko writes: > Dear all, > > Recently, there have been multiple issues related to incorrect > fontification: > - https://list.orgmode.org/orgmode/23707.20428.546749.44...@frac.u-strasbg.fr/ > - https://list.orgmode.org/orgmode/87fsujp7mc@web.de/ > - https://list.orgmode.org/orgmod

Re: [DISCUSSION] Refactoring fontification system

2021-11-19 Thread Bruce D'Arcus
On Fri, Nov 19, 2021 at 9:11 AM Ihor Radchenko wrote: > WDYT? I don't understand all the technical details, but it sounds like a GREAT idea to me in general! Bruce

[DISCUSSION] Refactoring fontification system

2021-11-19 Thread Ihor Radchenko
Dear all, Recently, there have been multiple issues related to incorrect fontification: - https://list.orgmode.org/orgmode/23707.20428.546749.44...@frac.u-strasbg.fr/ - https://list.orgmode.org/orgmode/87fsujp7mc@web.de/ - https://list.orgmode.org/orgmode/87czvqxdn9@gmail.com/ - https://l