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 //

Re: [RFC] Refactoring org-element API

2023-06-30 Thread Ihor Radchenko
Ihor Radchenko writes: >>> One minor nitpick: I would prefer a function like >>> ~org-element-property-1~ to be named e.g. ~org-element-property-lazy~ >>> (or something similar), because the "-1" is just obfuscation to me. >> ... >> I'd prefer to see several more ideas about the alternative

Re: [RFC] Refactoring org-element API

2023-06-23 Thread Ihor Radchenko
Ihor Radchenko writes: >> One minor nitpick: I would prefer a function like >> ~org-element-property-1~ to be named e.g. ~org-element-property-lazy~ >> (or something similar), because the "-1" is just obfuscation to me. > ... > I'd prefer to see several more ideas about the alternative names, if

Re: [RFC] Refactoring org-element API

2023-05-31 Thread Ihor Radchenko
Stefan Nobis writes: > One minor nitpick: I would prefer a function like > ~org-element-property-1~ to be named e.g. ~org-element-property-lazy~ > (or something similar), because the "-1" is just obfuscation to me. foo-...-1 is actually frequently used in Emacs code for semi-internal helper

Re: [RFC] Refactoring org-element API

2023-05-30 Thread Stefan Nobis
Hi Ihor, thank you for all your great work. I did not dive deep into all the details, but the overview you provided sounds sensible. One minor nitpick: I would prefer a function like ~org-element-property-1~ to be named e.g. ~org-element-property-lazy~ (or something similar), because the "-1" is

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 .

[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