emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to get a list of all TODO keywords from defined variable `org-todo-keywords`?
@ 2018-01-04  1:22 numbchild
  2018-01-04  2:23 ` Adam Porter
  0 siblings, 1 reply; 2+ messages in thread
From: numbchild @ 2018-01-04  1:22 UTC (permalink / raw)
  To: Org-mode

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

 I'm trying to select TODO keyword when doing org-capture.

Like this:

    (setq org-capture-templates
    '(("c" "[C]apture"
    entry (file "")
    ;; HACK: select todo keyword interactively from `org-todo-keywords'.
    ;; 1. command `org-todo'
    "* %(completing-read \"Todo keyword: \" (mapcar #'list
org-todo-keywords-1) nil t) %^{Capture}\n\n%i\n%a\n\n%?"
    :prepend t
    :empty-lines 1
    )
    ...
    ))


But it is not working as I expected. I borrow this snippet code from
command `org-todo`.

hope someone can provide a good solution for my purpose.


[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

[-- Attachment #2: Type: text/html, Size: 1760 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to get a list of all TODO keywords from defined variable `org-todo-keywords`?
  2018-01-04  1:22 How to get a list of all TODO keywords from defined variable `org-todo-keywords`? numbchild
@ 2018-01-04  2:23 ` Adam Porter
  0 siblings, 0 replies; 2+ messages in thread
From: Adam Porter @ 2018-01-04  2:23 UTC (permalink / raw)
  To: emacs-orgmode

This might do:

(completing-read "Todo keyword: " org-todo-keywords-for-agenda nil t)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-04  2:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-04  1:22 How to get a list of all TODO keywords from defined variable `org-todo-keywords`? numbchild
2018-01-04  2:23 ` Adam Porter

Code repositories for project(s) associated with this public 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).