Kaynağa Gözat

[emacs] Add org-protocol capture style

Colin Powell 4 yıl önce
ebeveyn
işleme
b1dcc289e5
2 değiştirilmiş dosya ile 14 ekleme ve 9 silme
  1. 7 4
      emacs/.doom.d/config.el
  2. 7 5
      emacs/.doom.d/config.org

+ 7 - 4
emacs/.doom.d/config.el

@@ -120,7 +120,7 @@
 
 (add-hook 'org-mode-hook #'doom-disable-line-numbers-h)
 
- (after! org
+(after! org
   (setq org-directory (expand-file-name "~/var/org/")
         org-agenda-files (file-expand-wildcards "~/var/org/2020-*")
         org-pretty-entities t
@@ -132,11 +132,14 @@
         org-fontify-quote-and-verse-blocks t
         org-ellipsis "…"
         org-image-actual-width '(600)
+        org-protocol-default-template-key "l"
         org-capture-templates
-            '(("i" "Send to inbox" entry (file "~/var/org/inbox.org")
-               "* TODO %?\n"))
+        '(("i" "Send to inbox" entry (file "~/var/org/inbox.org")
+           "* TODO %?\n")
+          ("l" "Link" entry (file "~/var/org/inbox.org")
+           "* TODO %a\n %?\n %i"))
         org-todo-keywords
-            '((sequence "TODO(t)" "NEXT(n)" "MAYBE(m)" "|" "DONE(d)" "WONTDO(w)"))
+        '((sequence "TODO(t)" "NEXT(n)" "MAYBE(m)" "|" "DONE(d)" "WONTDO(w)"))
         org-modules '(ol-eshell
                       ol-notmuch
                       ob-eval

+ 7 - 5
emacs/.doom.d/config.org

@@ -181,7 +181,7 @@ a serif font when I’m writing a lot of words.
 #+BEGIN_SRC emacs-lisp
 (add-hook 'org-mode-hook #'doom-disable-line-numbers-h)
 
- (after! org
+(after! org
   (setq org-directory (expand-file-name "~/var/org/")
         org-agenda-files (file-expand-wildcards "~/var/org/2020-*")
         org-pretty-entities t
@@ -193,11 +193,14 @@ a serif font when I’m writing a lot of words.
         org-fontify-quote-and-verse-blocks t
         org-ellipsis "…"
         org-image-actual-width '(600)
+        org-protocol-default-template-key "l"
         org-capture-templates
-            '(("i" "Send to inbox" entry (file "~/var/org/inbox.org")
-               "* TODO %?\n"))
+        '(("i" "Send to inbox" entry (file "~/var/org/inbox.org")
+           "* TODO %?\n")
+          ("l" "Link" entry (file "~/var/org/inbox.org")
+           "* TODO %a\n %?\n %i"))
         org-todo-keywords
-            '((sequence "TODO(t)" "NEXT(n)" "MAYBE(m)" "|" "DONE(d)" "WONTDO(w)"))
+        '((sequence "TODO(t)" "NEXT(n)" "MAYBE(m)" "|" "DONE(d)" "WONTDO(w)"))
         org-modules '(ol-eshell
                       ol-notmuch
                       ob-eval
@@ -214,7 +217,6 @@ a serif font when I’m writing a lot of words.
 (setq org-refile-targets '(("~/var/org/inbox.org" :maxlevel . 9)))
 (setq org-outline-path-complete-in-steps nil)         ; Refile in a single go
 (setq org-refile-use-outline-path t)                  ; Show full paths for refiling
-
 #+END_SRC
 ** Key bindings
 I add only two custom mappings to the default org mode maps, a shortcut to my Inbox file and a quick way to save all open org mode files.