Hello, Bastien <b...@gnu.org> writes:
> Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: > >> Bastien Guerry <b...@gnu.org> writes: >> >>> May I ask you why `eval' in the code base is problematic? >> >> Because 1. it is hideous, 2. it doesn't cope well with lexical >> binding. > > Can you provide with an example on how `eval' can lead to trouble > due to lexical binding for the org-capture configuration? > > I'm trying to understand. I never said `eval' could lead to trouble due to lexical binding in Org capture configuration. I said `eval' is a problem in the code base, notwithstanding its location. Moreover, allowing Sexp in a capture template is really abusing homoiconicity of the language. As soon as the S-exp becomes mildly complex, the resulting template is unreadable. OTOH, using a function right from the start clarifies the structure of the template. The occasional `(concat a b)' is not a sufficient reason, IMO, to allow `eval' there. We should encourage saner practices. >> Using `eval' should be made with extreme parcimony and for very >> consensual reasons. > > Yes, but unless we fix a realistic bug, not bothering the user with > backward-incompatible changes should take over IMHO. Let's consider `eval' in the code base a coding design bug, then. A clearer code base (e.g., more comments, less obscure variable names, more expressive syntax) is something we should strive for. Anyway, this is a rather small incompatible change we're talking about here. In particular, it doesn't change document syntax. It's a straightforward modification of some configuration. Not as bad as it sounds, really. Note we already did the same for `org-file-apps' in Org 9.0 (although the reason was different). Regards, -- Nicolas Goaziou