Ihor Radchenko wrote:

Well. org-context uses group 2.
And who knows about third-party code.

You're right. And this causes a bug. org-context does not return :item-bullet for asterisk bullets.

As best I can tell, the intent of the current design is for org-item-re to quickly determine whether something is a list item, and org-list-full-item-re to match its individual components. Any uses of match groups other than 0 for org-item-re should likely be using org-list-full-item-re instead.

This may be simpler than I thought. It seems checkbox fontification
already uses org-list-full-item-re. We can just add another subexp
highlighter to this. A faster regexp would be nice, but it only makes
sense if it could completely replace the slower one for font locking.

+1

One thing to note is that org-list-full-item-re is static. It always matches using the most expansive values of org-list-allow-alphabetical and org-plain-list-ordered-item-terminator. Do you think this is acceptable for fontifying list bullets?

So, what happens if we have, say, an example block inside a list?
How will it look like during fontification?

In this case, the contents inside the example block will not be
fontified as a list. The #+begin, #+end, and affiliated lines will be.

Whether indentation is a part of the example block or not is controlled
by switches. If it is not, then the indentation is structurally meaningful.
You make a very good point about block indentation. I think there are two concepts here. One is how indentation within block content is exported. The other is how it is fontified in the org buffer. This patch set only deals with latter. And it should fontify the margin between list indentation and indentation of the block content in an identifying way. I will include this in the next patch revision.



Reply via email to