Add org-capture template for DW posts

master
trémeur 12 months ago
parent 759c011e98
commit b45ed7449e

@ -43,6 +43,14 @@
(insert "* places\n** visited")) (insert "* places\n** visited"))
(insert "\n** visited")))) (insert "\n** visited"))))
(defun finddw ()
"Find or create heading for DW posts"
(goto-char (point-min))
(if (not (search-forward "* dw" nil t))
(progn
(goto-char (point-max))
(insert "* dw"))))
(defun therating () (defun therating ()
"Rate some media" "Rate some media"
(setq therating nil) (setq therating nil)
@ -80,6 +88,10 @@
(file+function "" findread) (file+function "" findread)
"* %^{Author} /%^{Title}/%(therating)" "* %^{Author} /%^{Title}/%(therating)"
:jump-to-captured t) :jump-to-captured t)
("d" "DW post" entry
(file+function "" finddw)
"* %^{Title}\n%?"
:jump-to-captured t)
("f" "Watched film" entry ("f" "Watched film" entry
(file+function "" findwatched) (file+function "" findwatched)
"* %^{Title} (%^{Year})%(therating)" "* %^{Title} (%^{Year})%(therating)"

Loading…
Cancel
Save