Fixed issue with commit #775b436
Now org-capture templates actually work and are no longer contained in strings but external files.
This commit is contained in:
parent
c93eb33f01
commit
6202168e05
@ -2532,53 +2532,45 @@
|
|||||||
It will then ask which template I wish to use. Said templates are described
|
It will then ask which template I wish to use. Said templates are described
|
||||||
below:
|
below:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defvar org-capture-templates-location "~/org/capture/"
|
|
||||||
"Directory in which org-capture templates are stored.")
|
|
||||||
(setq
|
(setq
|
||||||
org-default-notes-file "~/org/notes.org"
|
org-default-notes-file "~/org/notes.org"
|
||||||
org-capture-templates
|
org-capture-templates
|
||||||
'(("e" "Emails")
|
'(("e" "Emails")
|
||||||
("ew" "Write Email" entry
|
("ew" "Write Email" entry
|
||||||
(file+headline org-default-notes-file "Emails")
|
(file+headline org-default-notes-file "Emails")
|
||||||
(file ,(concat org-capture-templates-location "emails.orgcaptmpl")))
|
(file "~/org/capture/emails.orgcaptmpl"))
|
||||||
("j" "Journal" entry
|
("j" "Journal" entry
|
||||||
(file+datetree "~/org/journal.org")
|
(file+datetree "~/org/journal.org")
|
||||||
(file ,(concat org-capture-templates-location "journal.orgcaptmpl")))
|
(file "~/org/capture/journal.orgcaptmpl"))
|
||||||
("l" "Links")
|
("l" "Links")
|
||||||
("ly" "YouTube" entry
|
("ly" "YouTube" entry
|
||||||
(file+headline org-default-notes-file "YouTube")
|
(file+headline org-default-notes-file "YouTube")
|
||||||
(file ,(concat org-capture-templates-location "youtube.orgcaptmpl")))
|
(file "~/org/capture/youtube.orgcaptmpl"))
|
||||||
;; ("L" "Protocol Link" entry
|
|
||||||
;; (file+headline org-default-notes-file "Link")
|
|
||||||
;; (file ,(concat org-capture-templates-location "protocol-link.orgcaptmpl")))
|
|
||||||
("L" "Protocol Link" entry
|
("L" "Protocol Link" entry
|
||||||
(file+headline org-default-notes-file "Link")
|
(file+headline org-default-notes-file "Link")
|
||||||
"* %^{Title}\n:PROPERTIES:\n:CAPTURED: %U\n:LINK: %:link\n:END:\n%?\n")
|
(file "~/org/capture/protocol-link.orgcaptmpl"))
|
||||||
("n" "Note"
|
("n" "Note"
|
||||||
entry (file+headline org-default-notes-file "Note")
|
entry (file+headline org-default-notes-file "Note")
|
||||||
(file ,(concat org-capture-templates-location "notes.orgcaptmpl")))
|
(file "~/org/capture/notes.orgcaptmpl"))
|
||||||
;; ("p" "Protocol" entry
|
|
||||||
;; (file+headline org-default-notes-file "Link")
|
|
||||||
;; (file ,(concat org-capture-templates-location "protocol.orgcaptmpl")))
|
|
||||||
("p" "Protocol" entry
|
("p" "Protocol" entry
|
||||||
(file+headline org-default-notes-file "Link")
|
(file+headline org-default-notes-file "Link")
|
||||||
"* %^{Title}\n:PROPERTIES:\n:CAPTURED: %U\n:LINK: %:link\n:END:\n#+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n%?\n")
|
(file "~/org/capture/protocol.orgcaptmpl"))
|
||||||
("r" "Resources")
|
("r" "Resources")
|
||||||
("rc" "Conlanging" entry
|
("rc" "Conlanging" entry
|
||||||
(file+headline org-default-notes-file "Conlanging")
|
(file+headline org-default-notes-file "Conlanging")
|
||||||
(file ,(concat org-capture-templates-location "resource.orgcaptmpl")))
|
(file "~/org/capture/resource.orgcaptmpl"))
|
||||||
("re" "Emacs" entry
|
("re" "Emacs" entry
|
||||||
(file+headline org-default-notes-file "Emacs")
|
(file+headline org-default-notes-file "Emacs")
|
||||||
(file ,(concat org-capture-templates-location "resource.orgcaptmpl")))
|
(file "~/org/capture/resource.orgcaptmpl"))
|
||||||
("ri" "Informatique général" entry
|
("ri" "Informatique général" entry
|
||||||
(file+headline org-default-notes-file "Informatique")
|
(file+headline org-default-notes-file "Informatique")
|
||||||
(file ,(concat org-capture-templates-location "resource.orgcaptmpl")))
|
(file "~/org/capture/resource.orgcaptmpl"))
|
||||||
("rl" "Linguistics" entry
|
("rl" "Linguistics" entry
|
||||||
(file+headline org-default-notes-file "Linguistics")
|
(file+headline org-default-notes-file "Linguistics")
|
||||||
(file ,(concat org-capture-templates-location "resource.orgcaptmpl")))
|
(file "~/org/capture/resource.orgcaptmpl"))
|
||||||
("rw" "Worldbuilding" entry
|
("rw" "Worldbuilding" entry
|
||||||
(file+headline org-default-notes-file "Worldbuilding")
|
(file+headline org-default-notes-file "Worldbuilding")
|
||||||
(file ,(concat org-capture-templates-location "resource.orgcaptmpl")))))
|
(file "~/org/capture/resource.orgcaptmpl"))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
You may notice a capture entry for my journal, and this is due to the fact I
|
You may notice a capture entry for my journal, and this is due to the fact I
|
||||||
@ -2678,6 +2670,16 @@
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
For the next
|
For the next
|
||||||
|
#+BEGIN_SRC org :tangle ~/org/capture/protocol-link.orgcaptmpl
|
||||||
|
,* TODO [#C] Link: %^{Title}
|
||||||
|
:PROPERTIES:
|
||||||
|
:CAPTURED: %U
|
||||||
|
:LINK: %:link
|
||||||
|
:TITLE: %(transform-square-brackets-to-round-ones \"%:description\")
|
||||||
|
:END:
|
||||||
|
%?
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun transform-square-brackets-to-round-ones (string-to-transform)
|
(defun transform-square-brackets-to-round-ones (string-to-transform)
|
||||||
"Transforms [ into ( and ] into ), other chars left unchanged."
|
"Transforms [ into ( and ] into ), other chars left unchanged."
|
||||||
@ -2691,16 +2693,6 @@
|
|||||||
string-to-transform)))
|
string-to-transform)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/protocol-link.orgcaptmpl
|
|
||||||
,* TODO [#C] Link: %^{Title}
|
|
||||||
:PROPERTIES:
|
|
||||||
:CAPTURED: %U
|
|
||||||
:LINK: %:link
|
|
||||||
:TITLE: %(transform-square-brackets-to-round-ones \"%:description\")
|
|
||||||
:END:
|
|
||||||
%?
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
**** Resources
|
**** Resources
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: h-001eb681-1725-442d-91ef-b6a46c1784dc
|
:CUSTOM_ID: h-001eb681-1725-442d-91ef-b6a46c1784dc
|
||||||
|
Loading…
Reference in New Issue
Block a user