[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Capture template stopped working: nil
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Capture template stopped working: nil |
Date: |
Sat, 01 Jul 2017 11:03:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hello,
Bastien <address@hidden> writes:
> Nicolas Goaziou <address@hidden> writes:
>
>> Bastien Guerry <address@hidden> 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [O] Capture template stopped working: nil,
Nicolas Goaziou <=