Ihor Radchenko <yanta...@gmail.com> 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 element datum.
I have been working on the new fontification library for the last several months and I have noticed several confusing things in the current fontification settings. 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" "example" "export") So, #+begin_src lang and #+begin_export lang are fontified according to LANG. Makes sense. However, what about #+begin_example? org-element-example-block-parser does not appear to expect language specification in the example blocks. Only switches seems to be allowed. Am I missing something and Org actually allows example blocks to specify language? Or was it the case in the distant past versions of Org? 2. org-script-display is an internal auxiliary variable used to display sub/superscripts. Note that it's default value holds 4 possibilities. Two for each type of script. For example, for superscripts we have two options: ((raise 0.3) (height 0.7)) and ((raise 0.5)) The first one looks more compact (does not change the line height) and reduces size of the superscript. The second one makes superscript have the same size with the main text an increases the line height x1.5. org-raise-scripts fontifies sub/superscripts differently inside and outside the tables: From org-raise-scripts: (nth (if table-p 3 1) org-script-display) However, it currently uses x1.5 line height for tables creating empty space between vertical | separators. It looks like a typo for me. It would make more sense to make table lines compact, not vice versa. Am I missing something? 3. org-fontify-meta-lines-and-blocks-1 creates a special face for ("+title:" "+subtitle:" "+author:" "+email:" "+date:") The face name is org-document-info. But what about, say, +description: or +language:? Would it make more sense to fontify all the keywords from org-options-keywords instead? Best, Ihor