Add tag for work-related books in org-capture

master
trémeur 4 months ago
parent 7d6d6e70c0
commit 720faae589

@ -128,6 +128,14 @@
(setq ratingreturn " and rated ★★★★★")) (setq ratingreturn " and rated ★★★★★"))
ratingreturn) ratingreturn)
(defun theworkbook ()
"Mark a book as work-related"
(setq workbookreturn "")
(setq queryworkbook (y-or-n-p "Work-related?"))
(if queryworkbook
(setq workbookreturn " :work:"))
workbookreturn)
(defun thevisitdate () (defun thevisitdate ()
"Add dates for a visit" "Add dates for a visit"
(setq visitreturn "") (setq visitreturn "")
@ -181,11 +189,11 @@
(setq org-capture-templates (setq org-capture-templates
'(("a" "Acquired book" entry '(("a" "Acquired book" entry
(file+function "" findacquired) (file+function "" findacquired)
"* %^{Author} /%^{Title}/ (%^{Acquisition method})" "* %^{Author} /%^{Title}/ (%^{Acquisition method})%(theworkbook)"
:jump-to-captured t) :jump-to-captured t)
("b" "Finished book" entry ("b" "Finished book" entry
(file+function "" findread) (file+function "" findread)
"* %^{Author} /%^{Title}/%(therating)" "* %^{Author} /%^{Title}/%(therating)%(theworkbook)"
:jump-to-captured t) :jump-to-captured t)
("d" "DW post" entry ("d" "DW post" entry
(file+function "" finddw) (file+function "" finddw)
@ -217,7 +225,7 @@
:jump-to-captured t) :jump-to-captured t)
("r" "Reading progress" entry ("r" "Reading progress" entry
(file+function "" findreading) (file+function "" findreading)
"* %^{Author} /%^{Title}/\n%(bookcalc)%?" "* %^{Author} /%^{Title}/%(theworkbook)\n%(bookcalc)%?"
:jump-to-captured t) :jump-to-captured t)
("1" "Completed game" entry ("1" "Completed game" entry
(file+function "" findhundred) (file+function "" findhundred)

Loading…
Cancel
Save