emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Samuel Wales <samologist@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Programmatically set TODO labels per file?
Date: Fri, 30 Apr 2021 00:48:15 +0200	[thread overview]
Message-ID: <AM9PR09MB4977360F0F6377CC427DD7DF965F9@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <CAJcAo8sib=y7n_vRVjYEZpx5CZxieYs8Tnud0WXPT6qo0Qes0w@mail.gmail.com> (Samuel Wales's message of "Thu, 29 Apr 2021 15:37:50 -0700")

Samuel Wales <samologist@gmail.com> writes:

> as you discovered, spaces can work for todo kw for at least some
> purposes.  [i have one, because i prefer space to snake_case and
> kebab-case might not search well.]  but you should check to see if it
> is guaranteed to work.  i vaguely recall spc is not allowable.
>
> if it were guaranteed to work, then there would likely be a mechanism
> to include it in the #+ syntax.  :)

Indeed, I am aware that spaces are not so welcome in some places
:). However this works fine:

(setq org-todo-keywords '((sequence "first label" "second label")))

If it is guaranteed or not I have no idea, maybe some other APIs in org
are expecting labels to be single words, but for simple purpose it seems
to work. #+ could actually use just "" as grouping items or {}. For
example: 

#+TODO: "item one" "item two" ... "item n"

or with {}

#+TODO: {item one} {item two} ... {item n}

When I tried, I got citation characters included in my label, which
wasn't really what I wanted either :).



>
>
> On 4/29/21, Arthur Miller <arthur.miller@live.com> wrote:
>> Russell Adams <RLAdams@AdamsInfoServ.Com> 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?
>>>>
>>>> Thanks in advance!
>>>>
>>>> Best regards
>>>> /a
>>>>
>>>
>>> https://orgmode.org/manual/Per_002dfile-keywords.html
>>
>> Thanks Rusell; but I have seen the manual as I wrote. I am aware I can
>> use
>>
>> #+TODO:
>>
>> syntax to set per file keywords. I wanted to do this from lisp, since I
>> can't use labels with multiple words with that syntax since spaces are
>> used as delimiters for keywords, but I can pass strings (with spaces)
>> with lisp.
>>
>>
>>


  reply	other threads:[~2021-04-29 22:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29 20:49 Arthur Miller
2021-04-29 21:09 ` tomas
2021-04-29 21:58   ` Arthur Miller
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 [this message]
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=AM9PR09MB4977360F0F6377CC427DD7DF965F9@AM9PR09MB4977.eurprd09.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=samologist@gmail.com \
    --subject='Re: Programmatically set TODO labels per file?' \
    /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

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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