From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Setting org-todo-keywords through directory-local variables
Date: Fri, 22 May 2020 10:42:37 +0200 [thread overview]
Message-ID: <87a720fjia.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87mu62gvjk.fsf@gmail.com> ("Kévin Le Gouguec"'s message of "Wed, 20 May 2020 23:12:47 +0200")
Hello,
Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:
> I'd like to set org-todo-keywords and org-todo-keyword-faces through
> directory-local variables, to get rid of duplicate #+SEQ_TODO lines in
> my Org files[1].
>
> Right now I see two obstacles for this to work:
>
> (1) org-set-regexps-and-options, which sets up a bunch of TODO-related
> machinery, insists on using (default-value 'org-todo-keywords),
>
> (2) this function is called in the major mode function, which IIUC means
> that directory-local values have not been applied yet.
>
> The first obstacle looks like it can be easily removed[2]; the second
> obstacle looks more substantial. It is trivially side-stepped by
> sticking (hack-local-variables) at the top of org-mode; to my untrained
> eye, it looks like TRT would rather be for Org to add
> org-set-regexps-and-options to hack-local-variables-hook.
>
> This sounds like a risky change though: I imagine that a lot of what
> happens in the major mode function depends on what
> org-set-regexps-and-options sets up, and would therefore need to be
> moved to this hook as well. Figuring which parts should be moved seems
> like a non-trivial task that might introduce some regressions…
>
>
> Can anyone confirm that this would (in principle) be the way forward, or
> tell me if I am missing something[3]?
Did you consider using SETUPFILE?
Regards,
--
Nicolas Goaziou
prev parent reply other threads:[~2020-05-22 8:43 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
2022-10-30 14:35 ` Kévin Le Gouguec
2022-10-31 3:00 ` Ihor Radchenko
2020-05-22 8:42 ` Nicolas Goaziou [this message]
Reply instructions:
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a720fjia.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=kevin.legouguec@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.