Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: > > Ihor Radchenko <yanta...@gmail.com> writes: > >> Nicolas Goaziou <m...@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).