emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-capture-templates with multi charachter keys
@ 2015-10-02 20:06 tenspd137 .
  2015-10-02 20:30 ` Kyle Meyer
  0 siblings, 1 reply; 4+ messages in thread
From: tenspd137 . @ 2015-10-02 20:06 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

I can't seem to find an answer for this, maybe someone could tell me
what I am doing wrong.  Based on what I read in the manual and
examples I have seen, the following is valid for creating
org-capture-templates:

(setq org-capture-templates
      '(("t" "Todo" entry (file+headline (concat org-directory
"/default.org") "Tasks")
         "* TODO %?\n %i\n %a")
        ("j" "Journal" entry (file+datetree (concat org-directory
"/journal.org"))
         "* %?\nEntered on %U\n  %i\n  %a")
        ;;product stuff - I would like to move these to files and have
        ;;them loaded - maybe in the future
        ("bf" "Bluefin Todo" entry (file+headline (concat
org-directory "/bluefin.org") "Tasks")
         "* TODO %?\n %i\n %a")))

the last one I am using "bf" as a key.  When I go to use org capture,
the following is shown in the menu

Select a capture template
===================

[t] Todo
[j] Journal
[bf] Bluefin Todo
----------------------------------------
[C] Customize org-capture-templates
[q]  Abort

but when I hit b (as in bf), the mini-buffer just says invalid key `b'

How do I use multiple keys?

Thanks!

-C

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

* Re: org-capture-templates with multi charachter keys
  2015-10-02 20:06 org-capture-templates with multi charachter keys tenspd137 .
@ 2015-10-02 20:30 ` Kyle Meyer
  0 siblings, 0 replies; 4+ messages in thread
From: Kyle Meyer @ 2015-10-02 20:30 UTC (permalink / raw)
  To: tenspd137 .; +Cc: emacs-orgmode

Hello,

"tenspd137 ." <dcday137@gmail.com> writes:

> (setq org-capture-templates
>       '(("t" "Todo" entry (file+headline (concat org-directory
> "/default.org") "Tasks")
>          "* TODO %?\n %i\n %a")
>         ("j" "Journal" entry (file+datetree (concat org-directory
> "/journal.org"))
>          "* %?\nEntered on %U\n  %i\n  %a")
>         ;;product stuff - I would like to move these to files and have
>         ;;them loaded - maybe in the future
>         ("bf" "Bluefin Todo" entry (file+headline (concat
> org-directory "/bluefin.org") "Tasks")
>          "* TODO %?\n %i\n %a")))
>
> the last one I am using "bf" as a key.  When I go to use org capture,
> the following is shown in the menu
>
> Select a capture template
> ===================
>
> [t] Todo
> [j] Journal
> [bf] Bluefin Todo
> ----------------------------------------
> [C] Customize org-capture-templates
> [q]  Abort
>
> but when I hit b (as in bf), the mini-buffer just says invalid key `b'
>
> How do I use multiple keys?

I think you're missing this bit from org-capture-templates's docstring:

    When using several keys, keys using the same prefix key must be
    together in the list and preceded by a 2-element entry explaining
    the prefix key, for example

            ("b" "Templates for marking stuff to buy")


--
Kyle

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

* org-capture-templates with multi charachter keys
@ 2017-01-18 13:28 Roland Everaert
  2017-01-18 14:02 ` Marco Wahl
  0 siblings, 1 reply; 4+ messages in thread
From: Roland Everaert @ 2017-01-18 13:28 UTC (permalink / raw)
  To: emacs-orgmode

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

Hello,

Is there somewhere in the org documentation or on the internet a complete
example of using multi-character keys in org-capture.

This excerpt from the documentation is not clear to me :/

"The keys that will select the template, as a string, characters only, for
example "a" for a template to be selected with a single key, or "bt" for
selection with two keys. When using several keys, keys using the same
prefix key must be sequential in the list and preceded by a 2-element entry
explaining the prefix key, for example

                   ("b" "Templates for marking stuff to buy")

"

Moreover, can a prefix be composed of multiple characters or only one?

Thanks for your help.

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

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

* Re: org-capture-templates with multi charachter keys
  2017-01-18 13:28 Roland Everaert
@ 2017-01-18 14:02 ` Marco Wahl
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Wahl @ 2017-01-18 14:02 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Roland Everaert <reveatwork@gmail.com> writes:

> Is there somewhere in the org documentation or on the internet a complete
> example of using multi-character keys in org-capture.
>
> This excerpt from the documentation is not clear to me :/
>
> "The keys that will select the template, as a string, characters only, for
> example "a" for a template to be selected with a single key, or "bt" for
> selection with two keys. When using several keys, keys using the same
> prefix key must be sequential in the list and preceded by a 2-element entry
> explaining the prefix key, for example
>
>                    ("b" "Templates for marking stuff to buy")
>
> Moreover, can a prefix be composed of multiple characters or only one?

The following example might help you understand.  It's cut and paste
from a customize buffer for org-capture-templates.

With this customization one can use the keys x t p to get to the "tree poem"
capture.  (Tree and poem is completely artificial.)  And in the same way x t n
brings up the capture for "tree new".


#v+
For help using this buffer, see Easy Customization in the Emacs manual.

Operate on all settings in this buffer:
 Revert...   Apply   Apply and Save 

Hide Org Capture Templates:
INS DEL Choice: Value Menu Multikey description:
            Keys       : x
            Description: my multikeys starting with x
INS DEL Choice: Value Menu Multikey description:
            Keys       : xt
            Description: my submultikeys starting with xt (trees)
INS DEL Choice: Value Menu Template entry:
            Keys           : xtp
            Description    : tree poem
            Capture Type   : Value Menu Org entry
            Target location: Value Menu File:
            Filename       : Value Menu Literal: ~/org/refile.org
            Template       : Value Menu String: 
            Plist:
            [ ] Key: :prepend t
            [ ] Key: :immediate-finish t
            [ ] Key: :jump-to-captured t
            [ ] Key: :empty-lines 1
            [ ] Key: :empty-lines-before 1
            [ ] Key: :empty-lines-after 1
            [ ] Key: :clock-in t
            [ ] Key: :clock-keep t
            [ ] Key: :clock-resume t
            [ ] Key: :unnarrowed t
            [ ] Key: :table-line-pos t
            [ ] Key: :kill-buffer t
                        INS
INS DEL Choice: Value Menu Template entry:
            Keys           : xtn
            Description    : new tree
            Capture Type   : Value Menu Org entry
            Target location: Value Menu File:
            Filename       : Value Menu Literal: ~/org/refile.org
            ...
#v-


HTH,  Marco

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

end of thread, other threads:[~2017-01-18 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02 20:06 org-capture-templates with multi charachter keys tenspd137 .
2015-10-02 20:30 ` Kyle Meyer
  -- strict thread matches above, loose matches on Subject: below --
2017-01-18 13:28 Roland Everaert
2017-01-18 14:02 ` Marco Wahl

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