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, 01 Jan 2025 14:01:05 +0100

Ihor Radchenko <yantar92@posteo.net> writes:

> Richard Lawrence <rwl@recursewithless.net> writes:
>
>> 1) Is there any way to use my own list of standard-properties?
>
> Currently, there is no such way. But it is one of the obvious problems
> that need to be solved to make the library truly generic.
> I am not 100% sure how though.
>
> The only thing coming to my mind is asking the libraries to use
>
> (let ((org-element--standard-properties <custom value>))
>   (defun library-x (...)
>     ...))

Personally I think this would be a bit much to ask...it would be fairly
annoying to have to wrap all one's functions like this, even if there
was a macro to do it.

> Or maybe the library can somehow flag to org-element-ast during compile
> time about the properties to be optimized.

What about asking library users to say something like

(eval-when-compile (defvar org-element-custom-standard-properties ...))

and then using a with-standard-properties macro within
org-element-ast.el to make use of this value at compile time?

I don't know if that would work if e.g. org-element-ast gets compiled
before the user's code, but an interface like that seems preferable to
me.

Best,
Richard



reply via email to

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