-
-
Save spacebat/097f3e7469edf2eaa6a9 to your computer and use it in GitHub Desktop.
(setq org-capture-templates | |
(("a" "Appointment" entry | |
(file+headline | |
(concat org-directory "/taskdiary.org") | |
"Calendar") | |
"* APPT %^{Description} %^g\n%?\nAdded: %U") | |
("n" "Notes" entry | |
(file+datetree | |
(concat org-directory "/taskdiary.org")) | |
"* %^{Description} %^g %?\nAdded: %U") | |
("t" "Task Diary" entry | |
(file+datetree | |
(concat org-directory "/taskdiary.org")) | |
"* TODO %^{Description} %^g\n%?\nAdded: %U") | |
("d" "Long Tail TODO Task" entry | |
(file+headline "" "Tasks") | |
"* TODO %?\n %u\n %a") | |
("j" "Journal" entry | |
(file+datetree | |
(concat org-directory "/workjournal.org")) | |
"** %^{Heading}") | |
("l" "Log Time" entry | |
(file+datetree | |
(concat org-directory "/timelog.org")) | |
"** %U - %^{Activity} :TIME:"))) |
jasonblewis
commented
May 7, 2014
(setq org-capture-templates
(("l" "Lunch" entry
(file+datetree
"~/Dropbox/org/test.org" )
"* lunch%?\n%U\n:PROPERTIES:\n:Meal: lunch\n:END:\n%^{Description}")
(("d" "Dinner" entry (file+datetree "~/Dropbox/org/test.org" )
"* Dinner%?\n%U\n:PROPERTIES:\n:Meal: Dinner\n:END:\n%^{Description}")) ))
(setq org-capture-templates
'(
("l" "Lunch" entry (file+datetree "~/Dropbox/org/test.org" )
"* lunch%?\n%U\n:PROPERTIES:\n:Meal: lunch\n:END:\n%^{Description}")
("d" "Dinner" entry (file+datetree "~/Dropbox/org/test.org" )
"* Dinner%?\n%U\n:PROPERTIES:\n:Meal: Dinner\n:END:\n%^{Description}")
))
(let ((default-template "* %s%%?\n%%U\n:PROPERTIES:\n:Meal: lunch\n:END:\n%%^{Description}"))
(setq org-capture-templates
`(
("l" "Lunch" entry (file+datetree "~/Dropbox/org/test.org" )
,(format default-template "Lunch"))
("d" "Dinner" entry (file+datetree "~/Dropbox/org/test.org" )
,(format default-template "Dinner"))
)))
(let ((default-template "* %s%%?\n%%U\n:PROPERTIES:\n:Meal: lunch\n:END:\n%%^{Description}")
(filename "~/Dropbox/org/test.org")
(meal-template (lambda (name)
(list (downcase (substring name 0 1)) name `(file+datetree ,filename)
(format default-template name)))))
(setq org-capture-templates (mapcar meal-template '("Breakfast" "Lunch" "Dinner"))))
(let ((default-template "* %s%%?\n%%U\n:PROPERTIES:\n:Meal: %s\n:END:\n%%^{Description}")
(filename "~/Dropbox/org/test.org")
(meal-template (lambda (name)
(list (downcase (substring name 0 1)) name 'entry `(file+datetree ,filename)
(format default-template name (downcase name))))))
(setq org-capture-templates (mapcar meal-template '("Breakfast" "Lunch" "Dinner"))))
(let ((default-template "* %s%%?\n%%U\n:PROPERTIES:\n:Meal: %s\n:END:\n%%^{Description}")
(filename "~/Dropbox/org/test.org")
(meal-template (lambda (arg)
(let (name initial)
(if (listp arg)
(setq name (car arg)
initial (cadr arg))
(setq name arg))
(when (not initial)
(setq initial (downcase (substring name 0 1))))
(list initial name 'entry `(file+datetree ,filename)
(format default-template name (downcase name)))))))
(setq org-capture-templates (mapcar meal-template '("Breakfast" ("Lunch" "L") "Dinner"))))
(let ((default-template "* %s%%?\n:PROPERTIES:\n:Meal: %s\n:END:\n%%^{Description}")
(filename "~/Dropbox/org/test.org")
(meal-template (lambda (arg)
(let (name initial)
(if (listp arg)
(setq name (car arg)
initial (cadr arg))
(setq name arg))
(when (not initial)
(setq initial (downcase (substring name 0 1))))
(list initial name 'entry `(file+datetree ,filename)
(format default-template name (downcase name)))))))
(add-to-list org-capture-templates (mapcar meal-template '("Breakfast" ("Lunch" "l") "Dinner" ("Snack" "s")))))
;; for capturing books to read
(setq org-capture-templates
(quote (("B" "Book" entry (file+headline "~/Dropbox/org/todo.org" "books to read")
"* TODO %\\1 - %\\2%?\n%U\n:PROPERTIES:\n:NAME: %^{NAME}\n:TITLE: %^{TITLE}\n:END:\n"))))
;; for capturing food diary
;; C-c c to capture
(let ((default-template "* %s%%?\n:PROPERTIES:\n:Meal: %s\n:END:\n%%^{Description}")
(filename "~/Dropbox/org/test.org")
(meal-template (lambda (arg)
(let (name initial)
(if (listp arg)
(setq name (car arg)
initial (cadr arg))
(setq name arg))
(when (not initial)
(setq initial (downcase (substring name 0 1))))
(list initial name 'entry `(file+datetree ,filename)
(format default-template name (downcase name)))))))
(add-to-list org-capture-templates (mapcar meal-template '("Breakfast" ("Lunch" "l") "Dinner" ("Snack" "s")))))
(let ((default-template "* %s%%?\n:PROPERTIES:\n:Meal: %s\n:END:\n%%^{Description}")
(filename "~/Dropbox/org/test.org")
(meal-template (lambda (arg)
(let (name initial)
(if (listp arg)
(setq name (car arg)
initial (cadr arg))
(setq name arg))
(when (not initial)
(setq initial (downcase (substring name 0 1))))
(list initial name 'entry `(file+datetree ,filename)
(format default-template name (downcase name)))))))
(add-to-list org-capture-templates (mapcar meal-template '("Breakfast" ("Lunch" "l") "Dinner" ("Snack" "s")))))
(setq org-capture-templates
'(
("p" "protocol" entry (file+headline ,(concat org-directory "notes.org") "inbox")
"* %^{title}\nsource: %u, %c\n #+begin_quote\n%i\n#+end_quote\n\n\n%?")
("x" "org-protocol" entry (file "~/org/web.org")
"** TODO Review %c\n%U\n%i\n" :immediate-finish)
("n" "mnemonic w/ notes")
("na" "notes - applescript" entry (file+datetree "~/org/appleScripNotes.org")
"* %?\nentered on %u\n %i\n %a" :empty-lines 1)
("nb" "notes - book" plain (file "/Users/AbuDavid/school/bibliography/unfiledBooks.bib")
"\n %^{bibtex}" :empty-lines 1)
("nh" "notes - html" entry (file+datetree "~/org/htmlNotes.org")
"* %?\nentered on %u\n %i\n %a" :empty-lines 1)
("l" "protocol link" entry (file+headline ,(concat org-directory "notes.org") "inbox")
"* %? [[%:link][%:description]] \ncaptured on: %u")
("l" "ledger entries")
("lm" "mbna" plain
(file "~/personal/.ledger")
"%(org-read-date) %^{payee}
liabilities:samplecreditcard
expenses:%^{account} %^{amount}
")
("ld" "deposit" plain
(file "~/personal/.ledger")
"%(org-read-date) * %^{payee}
Assets:Bank:Deposits
Income:Scholarship %^{amount}
")
("lh" "use Bank Hapoalim debit card" plain
(file "~/personal/.ledger")
"%(org-read-date) * %^{payee}
Assets:Bank:Hapoalim
Expenses:%^{account} %^{amount}
")
("lw" "atm withdrawal" plain
(file "~/personal/.ledger")
"%(org-read-date) * %^{payee}
Assets:Bank:Hapoalim
Assets:Cash %^{amount}
")
("lc" "cash" plain
(file "~/personal/.ledger")
"%(org-read-date) * %^{payee}
Assets:Cash
Expenses:%^{account} %^{amount}
")) )
great examples, thank you
There's a missing quote in:
(setq org-capture-templates
(("a" "Appointment" entry ...
Should be:
(setq org-capture-templates
'(("a" "Appointment" entry ...
Thank you so much for these examples