5

enter image description here

As it can be seen above, I have around fifteen capture templates. I think this list may grow or shrink, but in the case that it grows, is there any way to make it more segmented?

Like dividing it across some categories, just for visual organization. Something like:

Notes

  • books

  • web pages

  • miscellaneous

  • articles

  • uni notes

Media

  • movie

  • game

  • book

Actions

  • goals

  • tasks

  • weekly review

Writing

  • new post

  • thesis

  • journaling

Or even dividing it horizontally instead of vertically. And so forth and so on.

Yes, this degree of organization could be reached through diminishing the number of capture templates and further customizing them to make them more specific, but then I would have to stack them in the same file. And since I use Emacs mostly for writing, my org files tend to get huge very quickly and I like to spread them out to avoid making things a mess.

Is this setup somehow feasible?

1 Answer 1

9

There are a couple of options for this, to me the easiest way is grouping templates using the built-in mechanism.

My way to use capture templates is based in memory muscle rather than digging a long menu, so how the menu is displayed should be concise in case I don't recall what key was for something. I do call capture using F12, then if I want to insert a note I'll use n and, let's say b if it's about a book.

So, to achieve this if you look for org-capture-templates documentation:

keys         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 together
             in the list and preceded by a 2-element entry explaining the
             prefix key, for example

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

meaning that you can use n to group notes as heading and using two chars keys nb, nm, nw, na for books, miscellanea, work and articles - you should also follow the other conditions.

So something like this in your template definition:

("n" "Notes")
("nb" "Notes about books"    <your template definition here>)
("nm" "Misc notes"           <your template definition here>)
("nw" "Work notes"           <your template definition here>)
("na" "Notes about articles" <your template definition here>)

Will give you a n submenu which unfolds in a new menu once pressed. Calling capture templates will look like this:

... <other capture templates>
[b]    Books to read 
[n]... Notes
... <other capture templates>

and pressing n will lead to:

n [b]  Notes about books
n [m]  Misc notes
n [w]  Work notes
n [a]  Notes about articles

Please note, these templates could be organized as nested as you need them:

("n" "Notes")
("nw" "Work-related notes")
("np" "Personal notes")

("nwb" "Work-related notes about books"    <your template definition here>)
("nwa" "Work-related notes about articles" <your template definition here>)
("npb" "Personal notes about books"        <your template definition here>)
("npa" "Personal notes about articles"     <your template definition here>)

You can do it in your init file or using customize interface. Of course, there is more about this in the documentation.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.