emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically set TODO labels per file?


From: Arthur Miller
Subject: Re: Programmatically set TODO labels per file?
Date: Thu, 29 Apr 2021 23:58:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt)

<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 via email to

[Prev in Thread] Current Thread [Next in Thread]