[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] DOCT: Declarative Org Capture Templates (easier template synta
From: |
Tim Cross |
Subject: |
Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax) |
Date: |
Thu, 24 Mar 2022 08:28:47 +1100 |
User-agent: |
mu4e 1.7.10; emacs 28.0.92 |
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
> Ihor Radchenko <yantar92@gmail.com> writes:
>
>> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>>
>>> I think there should be a direct mapping between Customize interface and
>>> values. Adding this macro as a band-aid to simply configuration is not,
>>> IMO, a solution.
>>
>> I think that current customize interface for org-capture-template is
>> perfectly fine. doct aids users who set org-capture-templates
>> programatically.
>
> I am merely pointing out that the programatically defined value is then
> no longer compatible with Customize interface. It may be important, or
> not.
>
This could be an issue for users who use both customise and
programatically modify their configuration.
<snip>
> The fact that we need a tool like "doct" to write templates in a compact
> form may be a sign that the data type is not good enough. Actually it
> sounds like a failure somehow.
>
> Should templates definition be more compact out of the box? Could the
> data type be made more powerful to permit more complex templates without
> relying on doct? IOW, can a tool such a doct be made transparent to the
> user?
>
Yes, I would agree. Such tools are generally a 'code smell'. Underlying
data structures should be transparent and not require helper functions
to assist the user in creating or updating them.
While I can see how doct can help with some use cases, I'm a little
concerned about the mixing of both setting of the org-capture-templatges
variable and adding/manipulating hooks together in one function. It
feels like two separate concerns being meshed into one function/macro
for convenience and attempting to work around limitations in the
existing system.
As you say, doct might be useful as a transition aid, but perhaps the
correct fix is to make it largely unnecessary (which I would assume
would also provide the additional functionality it offers to users of
customise and not only to those who configure their setup
programatically).
>From a personal perspective, I've never needed the additional
functionality offered by doct and while writing a capture template does
require lots of referencing of documentation, I suspect that even with
doct, I would still need to do that as I simply don't write new capture
templates often enough to remember all the options (even if they are
named rather than positional arguments).
- Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax), Ihor Radchenko, 2022/03/20
- Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax), Nicolas Goaziou, 2022/03/20
- Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax), Ihor Radchenko, 2022/03/21
- Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax), Nicolas Goaziou, 2022/03/23
- Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax),
Tim Cross <=
- Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax), No Wayman, 2022/03/23
- Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax), Ihor Radchenko, 2022/03/26
- Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax), Ihor Radchenko, 2022/03/27
- Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax), Matt Price, 2022/03/29
Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax), Mark Barton, 2022/03/20
Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax), João Pedro de Amorim Paula, 2022/03/23
Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax), physiculus, 2022/03/24