From b45ed7449ebfb8968986f205bc62d20c64cb2ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Sat, 30 Dec 2023 23:12:21 +0000 Subject: [PATCH] Add org-capture template for DW posts --- custom/capture.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/custom/capture.el b/custom/capture.el index 8f7999c..0aaf01a 100644 --- a/custom/capture.el +++ b/custom/capture.el @@ -43,6 +43,14 @@ (insert "* places\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 () "Rate some media" (setq therating nil) @@ -80,6 +88,10 @@ (file+function "" findread) "* %^{Author} /%^{Title}/%(therating)" :jump-to-captured t) + ("d" "DW post" entry + (file+function "" finddw) + "* %^{Title}\n%?" + :jump-to-captured t) ("f" "Watched film" entry (file+function "" findwatched) "* %^{Title} (%^{Year})%(therating)"