emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: <tomas@tuxteam.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Programmatically set TODO labels per file?
Date: Thu, 29 Apr 2021 23:58:10 +0200	[thread overview]
Message-ID: <AM9PR09MB4977F264F1E5E7919242DEC1965F9@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <20210429210951.GA8487@tuxteam.de> (tomas@tuxteam.de's message of "Thu, 29 Apr 2021 23:09:51 +0200")

<tomas@tuxteam.de> writes:

> On Thu, Apr 29, 2021 at 10:49:54PM +0200, Arthur Miller wrote:
>> Hi all,
>> I have a simple question, but I wasn't able to find answer on the web,
>> so finally I'll try my luck here.
>> I know I can setq org-todo-keywords with a list '((sequence "TODO"
>> DONE")), as an example. But what variable is used for per-file keywords?
>> Once that are set with #+TODO: ... line?
>> I guess when org mode parses a file when starting up the mode, it has to
>> parse that line into some var, where do I find it?
> Use a file local variable?
> That said (or rather, asked), I don't know whether there is a specific
> Org way to achieve that.

As I understand the manual, the org specific way is to use per file
variable, but instead of using Emacs _*_ for file variables, org uses #+
and they do their own parsing seems like. I might missunderstand, but
the syntax to use is: 

#+TODO: keyword1 keyword2 ... keywordN

I was looking around in org.el a bit now, and I see there are three vars
associated with per-file todo keywords: org-todo-keywords-1
org-todo-kwd-alist and org-todo-key-alist which seem to be set in
org-set-regexps-and-options function. I'll see if I can refactore
something out from there for my purpose. 

  reply	other threads:[~2021-04-29 21:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29 20:49 Programmatically set TODO labels per file? Arthur Miller
2021-04-29 21:09 ` tomas
2021-04-29 21:58   ` Arthur Miller [this message]
2021-04-29 21:20 ` Russell Adams
2021-04-29 22:01   ` Arthur Miller
2021-04-29 22:37     ` Samuel Wales
2021-04-29 22:48       ` Arthur Miller
2021-04-30  1:08 ` Nick Dokos
2021-04-30 10:13   ` Arthur Miller
2021-04-30 14:35     ` Arthur Miller

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:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM9PR09MB4977F264F1E5E7919242DEC1965F9@AM9PR09MB4977.eurprd09.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tomas@tuxteam.de \


* 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).