From: Ihor Radchenko <firstname.lastname@example.org>
To: Bastien <email@example.com>
Cc: "Kévin Le Gouguec" <firstname.lastname@example.org>, email@example.com
Subject: Re: Setting org-todo-keywords through directory-local variables
Date: Sun, 30 Oct 2022 03:10:09 +0000 [thread overview]
Message-ID: <87leoyatwu.fsf@localhost> (raw)
[sending to Org ML in-reply to the relevant thread]
Kévin Le Gouguec <firstname.lastname@example.org> writes:
28.1.90; Can local variables be loaded before loading major mode?
> … reminded me of a patch I submitted to the Org ML… some time ago 😣
> (sorry for not following up) to set TODO keywords via .dir-locals.el:
Your patch is not listed on https://updates.orgmode.org/
It is also not in my records (I am only following patches closely since
the beginning of this year).
So, it slipped through the cracks.
I am bumping it herein.
At least, the :safe marking is something we can merge right away.
> My rationale with this patch was that AUCTeX and markdown-mode both use
> hack-local-variables-hook successfully to (re)compute stuff from
> dir/file-locals; I figured Org…
> * should bite the bullet, at some point: it'd just be really neat for
> Emacs users used to this feature,
Maybe. That's why this emacs-devel thread.
> * could do so piecemeal, adding support for variables one at a time as
> people chime in the ML to express a need.
> E.g. my patch only added support for org-todo-keywords and
> org-todo-keyword-faces, but it laid the foundation for adding support
> for other variables later.
I'd prefer to solve it once and for all. I tried early loading of
file-local variables in the past, but had to revert the commit because
of major issues. See
Maybe the hook approach can work better. But I'd prefer to discuss all
the possible caveats first.
> Also to try to reduce the risk of breakage, it went for "compute Org
> settings normally; then selectively recompute some if relevant variables
> are found in dir/file-locals". That way "regular" Org users who rely
> rather on SETUPFILEs wouldn't be impacted, only "early adopters" of
> dir/file-locals might shoot themselves in the foot.
I am not sure what is the problem with SETUPFILE.
We can simply load it in the hook. Though the priority of SETUPFILE vs.
local variables should be discussed. Probably, local variables should
take precedence to keep things consistent with the rest of Emacs.
> (Also it had tests 😊)
Tests are always welcome :)
> Anyhoo. Not even sure the patch applies after two years, but the
> general approach might be worth looking into?
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>
next prev parent reply other threads:[~2022-10-30 3:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 21:12 Setting org-todo-keywords through directory-local variables Kévin Le Gouguec
2020-05-21 23:12 ` Kévin Le Gouguec
2020-05-22 15:11 ` Nicolas Goaziou
2020-05-23 12:58 ` Kévin Le Gouguec
2020-06-24 17:54 ` Kévin Le Gouguec
2020-09-05 15:39 ` Bastien
2022-10-30 3:10 ` Ihor Radchenko [this message]
2022-10-30 14:35 ` Kévin Le Gouguec
2022-10-31 3:00 ` Ihor Radchenko
2020-05-22 8:42 ` Nicolas Goaziou
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).