Skip to content

PhilHudson/org-capture-vars.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

org-capture-vars.el

User-defined capture variables and prompts for Org-mode

For use with Org capture mode’s %(...) Lisp escape syntax.

%(ocv/prmt PROMPT VARIABLE &optional DEFAULT COMPLETIONS)

Example

You might define an Org capture template for capturing JIRA tickets like this:

* JIRA Ticket %(ocv/prmt "JIRA Ticket No." 'jr-no)
  I have to do the following stuff:
** Triage %(progn jr-no)

to be prompted for the JIRA ticket number to enter. Your entered text will be stored in buffer-local variable jr-no. If you enter, say, “4321” at the prompt, your capture output will look like:

* JIRA Ticket 4321
  I have to do the following stuff:
** Triage 4321

The optional third argument lets you specify an initial default input value.

If you have a list of completions you want to offer, you can pass that as the optional fourth argument:

* Next meeting at %(ocv/prmt "Location" 'mtg-loc "the usual place" 'mtg-locs)

Acknowledgements

Very slightly modified from an original idea and implementation code by David Zuber.

About

User-defined capture variables and prompts for Org-mode

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published