On 2026-02-03 09:13, Derek Chen-Becker wrote:
> On Mon, Feb 2, 2026 at 6:13 PM Jacob S. Gordon <[email protected]> 
> wrote:
>>  only the priority styles for the main file seem to be added.
> 
> My understanding (admittedly not complete) is that this is because
> the buffer-local computation of various properties like priority
> range in `org-set-regexps-and-options' doesn't consider included
> files.

I probably understand even less, but from what I’ve read/observed the
‘#+INCLUDE’ keywords are expanded pretty early, and the temporary
buffer includes multiple ‘#+PRIORITIES’.  Since these are in the
‘unique’ list passed to ‘org-collect-keywords’ the first one ‘wins’.

One option is to consider ‘PRIORITIES’ as a non-unique keyword in
‘org-collect-keywords’, and extend ranges in
‘org-set-regexps-and-options’.  I’m not sure if this is the right
place to fix it though, since it would change how ‘#+SETUPFILE’ acts,
and it only really matters for ODT export.

> I suppose an alternative would be to update the headline format
> function to collect any used priorities outside of the top-level
> range and then emit styles afterward to ensure coverage, but that's
> going to be a bigger chunk of work. I'm open to suggestions.

This seems like a decent solution to me, and could even produce a
smaller list of priority styles.

A more radical option is to just style all priorities in the same way,
like the other exporters, which makes it trivial to fix.

BTW, let me know if you need any support here, e.g., tackling portions
of this or completing ‘org-mouse’.  I feel like everything I’ve
suggested so far has led to annoying fixes :P

Thanks,

-- 
Jacob S. Gordon
[email protected]
Please don’t send me HTML emails or MS Office/Apple iWork documents.
https://useplaintext.email/#etiquette
https://www.fsf.org/campaigns/opendocument

Reply via email to