arthur miller <[email protected]> writes:

>> No. What I meant is %:some-variable. (I have to say that I prefer my
>> option 1 over this)
>
> Ah, I see. Sorry I missunderstood you there. I am not familiar with doct,
> and I still didn't looked at it. Other stuff took precedence.
>
> Yes that would work. You could have %:some-var, and use %() for
> functions, and leave out %{} for something else, and just mention
> %:some-variable as a convenience to not have to type %(eval
> some-variable). I think it would work nicely from the "cognitive pov",
> for the users to understand and use. But it does complicate the parser.

Not only that. I think I need to clarify my intentions. I am not looking
to accept something that *only* adds an ability to refer to variable in
capture templates. What I would find a useful addition is something more
featureful. That's why I am bringing up doct and suggesting the new
feature (if implemented) to include some of the doct functionality *in
addition to variable expansion*.

>> And do note that I do not propose %{} to be "almost same kind of
>> template as %()". What I am really proposing is making %{} more powerful
>> than $() - not only %{variable-name}, but also
>> %{keyword-defined-in-the-template}, just like what doct does. See
>> https://github.com/progfolio/doct?tab=readme-ov-file#keyword-expansion
>
> Ok. I understand. Unfortunately I didn't had time to look doct up. I am
> sure it is awesome package on its own, I just never used it and am not
> familiar with it. I took a quick look now when you have posted it.
> It seems like it gives one the ability to declare custom escapes, or at
> least it appears so. One can also seem them as local definitions I
> think, similar to lexical variables introduced via let-bindings, since
> (according to the doc), they take the precedence over built-in ones.
>
> I think you could have it with %:keyword as well. I am not sure, just
> quick thought; than the usage would even resemble the declaration.

Agree.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to