[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting org-todo-keywords through directory-local variables
From: |
Ihor Radchenko |
Subject: |
Re: Setting org-todo-keywords through directory-local variables |
Date: |
Mon, 31 Oct 2022 03:00:17 +0000 |
Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:
>> Maybe the hook approach can work better. But I'd prefer to discuss all
>> the possible caveats first.
>
> My reasoning for keeping the current initialization code untouched and
> _re_computing stuff in hack-local-variables-hook hinged on…
I would avoid re-computing staff. Some variables define Org parser setup
and re-computing is expensive when we need to reset the parser state. In
particular, it will make parser cache persistence useless.
> This patch might have been my first foray into Org's init code, so it
> felt too risky to go with any approach other than "keep the
> implementation for the established features _exactly_ _as_ _now_; stuff
> all the experimental stuff in hack-local-variables-hook".
I'd say that it is too early to consider local variable hooks.
Especially given that Emacs devs just suggested a better approach and
discouraged using hack-local-variables-hook. See
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57003#108
What we can do wrt this patch is extract the part that marks some
variables as :safe. It will be a useful addition in any case.
For handling local variables, let's wait for the discussion with Emacs
devs to resolve.
--
Ihor Radchenko // yantar92,
Org mode contributor,
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>