emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Upstreaming org-element-ast (was: Improving Emacs' iCalendar support


From: Richard Lawrence
Subject: Re: Upstreaming org-element-ast (was: Improving Emacs' iCalendar support)
Date: Wed, 15 Jan 2025 08:06:03 +0100

Ihor Radchenko <yantar92@posteo.net> writes:
> Richard Lawrence <rwl@recursewithless.net> writes:
>
>> I looked briefly at the definition of org-element--property-idx and at
>> its disassembly, which makes it look like one can actually do something
>> like what I was suggesting by modifying the property list
>> org-element--standard-properties-idxs, like:
>>
>> (let ((org-element--standard-properties-idxs
>>        (plist-put org-element--standard-properties-idxs
>>                   :value 5))) ;; use the :post-blank slot for :value instead
>>    ...)
>
> It might work, but you will need to wrap your code into the let above.
> I think that it is what I suggested at the very beginning:

Yes indeed. I still think this is a bit much to ask. What wasn't clear
to me then was whether the value is only used at compile time. If
modifying one of these variables at run time is sufficient, then I think
there must be some other solution.

What do you think about making one of these variables
(org-element--standard-properties or org-element--standard-properties-idxs)
buffer-local? 

That would allow calling code to set them just once per buffer, shouldn't
interfere with Org, and wouldn't require a lot of wrapping with (let ...).
It also seems to make a lot of sense for a library capable of
representing parse trees parsed from different languages. Are there any
disadvantages?

Best,
Richard



reply via email to

[Prev in Thread] Current Thread [Next in Thread]