From 0fb9b4f1e1cefb836b3326164b6a98bf4a1e6c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Mon, 13 May 2024 21:50:37 -0700 Subject: emacs: define org-capture-templates --- .emacs.d/rul-lisp/packages/rul-org.el | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to '.emacs.d/rul-lisp/packages') diff --git a/.emacs.d/rul-lisp/packages/rul-org.el b/.emacs.d/rul-lisp/packages/rul-org.el index 4081335..b4e17dc 100644 --- a/.emacs.d/rul-lisp/packages/rul-org.el +++ b/.emacs.d/rul-lisp/packages/rul-org.el @@ -65,32 +65,34 @@ (setq org-capture-templates (quote ( - ("w" "Todo" entry (file+headline org-refile-path "Tasks") + + ("w" "Todo" entry + (file+headline org-refile-path "Tasks") "* TODO " :empty-lines 1) + ("m" "Capture incoming email" entry (file+headline org-refile-path "Incoming") "* TODO Re: %:description\n\n Source: %u, %a\n" :empty-lines 1) - ))) -(add-hook 'org-capture-mode-hook 'delete-other-windows) -(setq org-protocol-flag nil) + ("e" "Elfeed entry" entry + (file+headline org-refile-path "Read later") + "* %? [[%:link][%:description]]\n %U\n %:description\n") -(defadvice org-capture-finalize (after delete-frame-at-end activate) - "Delete frame at remember finalization" - (progn (if org-protocol-flag (delete-frame)) - (setq org-protocol-flag nil))) + ("L" "Web Link" entry + (file+headline org-refile-path "Read later") + "* %?[[%:link][%:description]]\n %:initial\n") -(defadvice org-capture-kill (after delete-frame-at-end activate) - "Delete frame at remember abort" - (progn (if org-protocol-flag (delete-frame)) - (setq org-protocol-flag nil))) + ("l" "Web Link with Selection" entry + (file+headline org-refile-path "Read later") + "* [[%:link][%:description]]%?\n %:initial\n") -(defadvice org-protocol-capture (before set-org-protocol-flag activate) - (setq org-protocol-flag t)) + ))) + +(add-hook 'org-capture-mode-hook 'delete-other-windows) ;; REFILE ;; -- cgit v1.2.3