[Emacs] Update and fix org capture

This commit is contained in:
Lucien Cartier-Tilet 2020-12-30 00:11:22 +01:00
parent 6519fa6793
commit ac9c34dcf1
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -2411,6 +2411,7 @@ Will be exported as if it were the buffer
**** Capture **** Capture
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-f58979cf :CUSTOM_ID: User_Configuration-Org-mode-Org_capture-f58979cf
:header-args:org: :mkdirp yes
:END: :END:
Org-capture is an amazing feature of Org-mode which allows me to quickly save links, resources, reminders, and notes in neatly organized org files. Here they are described: Org-capture is an amazing feature of Org-mode which allows me to quickly save links, resources, reminders, and notes in neatly organized org files. Here they are described:
#+NAME: org-capture-target-files #+NAME: org-capture-target-files
@ -2433,7 +2434,7 @@ With Spacemacs, an Org capture can be invoked with the shortcut ~SPC a o c~. It
| ew | Write Email | Emails | file+headline | org-default-notes-file | emails.orgcaptmpl | | ew | Write Email | Emails | file+headline | org-default-notes-file | emails.orgcaptmpl |
| j | Journal | | file+datetree | org-journal-file | journal.orgcaptmpl | | j | Journal | | file+datetree | org-journal-file | journal.orgcaptmpl |
| l | Link | | | | | | l | Link | | | | |
| ll | General | | file+headline | org-default-notes-file | | | ll | General | | file+headline | org-default-notes-file | link.orgcaptmpl |
| ly | YouTube | | file+headline | org-default-notes-file | youtube.orgcaptmpl | | ly | YouTube | | file+headline | org-default-notes-file | youtube.orgcaptmpl |
| L | Protocol Link | Link | file+headline | org-default-notes-file | protocol-link.orgcaptmpl | | L | Protocol Link | Link | file+headline | org-default-notes-file | protocol-link.orgcaptmpl |
| n | Notes | | | | | | n | Notes | | | | |
@ -2450,6 +2451,7 @@ With Spacemacs, an Org capture can be invoked with the shortcut ~SPC a o c~. It
| re | Emacs | | file+headline | org-default-notes-file | resource.orgcaptmpl | | re | Emacs | | file+headline | org-default-notes-file | resource.orgcaptmpl |
| ri | Informatique | | file+headline | org-default-notes-file | resource.orgcaptmpl | | ri | Informatique | | file+headline | org-default-notes-file | resource.orgcaptmpl |
| rl | Linguistics | | file+headline | org-default-notes-file | resource.orgcaptmpl | | rl | Linguistics | | file+headline | org-default-notes-file | resource.orgcaptmpl |
| rL | Linux | | file+headline | org-default-notes-file | resource.orgcaptmpl |
| rw | Worldbuilding | Resource | file+headline | org-wordbuilding-file | resource.orgcaptmpl | | rw | Worldbuilding | Resource | file+headline | org-wordbuilding-file | resource.orgcaptmpl |
| t | Tasks | | | | | | t | Tasks | | | | |
| tb | Birthday | | file+headline | org-private-agenda-file | birthday.orgcaptmpl | | tb | Birthday | | file+headline | org-private-agenda-file | birthday.orgcaptmpl |
@ -2479,7 +2481,7 @@ The following code snipped is not tangled into my configuration file, but instea
table "\n ")) table "\n "))
#+END_SRC #+END_SRC
#+RESULTS[1fec26dc1d0158ebcaf9b282eb997901321593fa]: org-capture-shortcut-gen #+RESULTS[d5195b883b39aa51a31e7e572d2eaf8b09c434cd]: org-capture-shortcut-gen
#+begin_example #+begin_example
'(("e" "Email") '(("e" "Email")
("ew" "Write Email" entry ("ew" "Write Email" entry
@ -2491,7 +2493,7 @@ The following code snipped is not tangled into my configuration file, but instea
("l" "Link") ("l" "Link")
("ll" "General" entry ("ll" "General" entry
(file+headline org-default-notes-file "General") (file+headline org-default-notes-file "General")
(file "~/org/capture/")) (file "~/org/capture/link.orgcaptmpl"))
("ly" "YouTube" entry ("ly" "YouTube" entry
(file+headline org-default-notes-file "YouTube") (file+headline org-default-notes-file "YouTube")
(file "~/org/capture/youtube.orgcaptmpl")) (file "~/org/capture/youtube.orgcaptmpl"))
@ -2534,6 +2536,9 @@ The following code snipped is not tangled into my configuration file, but instea
("rl" "Linguistics" entry ("rl" "Linguistics" entry
(file+headline org-default-notes-file "Linguistics") (file+headline org-default-notes-file "Linguistics")
(file "~/org/capture/resource.orgcaptmpl")) (file "~/org/capture/resource.orgcaptmpl"))
("rL" "Linux" entry
(file+headline org-default-notes-file "Linux")
(file "~/org/capture/resource.orgcaptmpl"))
("rw" "Worldbuilding" entry ("rw" "Worldbuilding" entry
(file+headline org-wordbuilding-file "Resource") (file+headline org-wordbuilding-file "Resource")
(file "~/org/capture/resource.orgcaptmpl")) (file "~/org/capture/resource.orgcaptmpl"))
@ -2569,7 +2574,7 @@ In the next sub-sections will be described my org capture templates. These are n
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Emails-d87336fe :CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Emails-d87336fe
:END: :END:
This is my template for a new Email: This is my template for a new Email:
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/email.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/email.orgcaptmpl
,** TODO [#A] Write Email ,** TODO [#A] Write Email
SCHEDULED: %^t SCHEDULED: %^t
:PROPERTIES: :PROPERTIES:
@ -2595,7 +2600,7 @@ I use it in case my computer is not yet connected to the internet and I need to
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Journal-9916f9bf :CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Journal-9916f9bf
:END: :END:
This template is quite simple: it creates a new entry with the current timestamp as its title, a brief title of my choosing, and then I can write whatever I wish to write. This is exported to =~/org/capture/journal.orgcaptmpl=. This template is quite simple: it creates a new entry with the current timestamp as its title, a brief title of my choosing, and then I can write whatever I wish to write. This is exported to =~/org/capture/journal.orgcaptmpl=.
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/journal.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/journal.orgcaptmpl
,* %U %^{Title} ,* %U %^{Title}
%? %?
#+END_SRC #+END_SRC
@ -2605,7 +2610,7 @@ This template is quite simple: it creates a new entry with the current timestamp
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Notes-4b4c10aa :CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Notes-4b4c10aa
:END: :END:
This template is used for taking note about various subjects that can go from conlanging to development. I wrote it so I can know from where this capture was made and when, and it even supports text that was highlighted in Emacs that will be inserted in a quote block. This is exported to =~/org/capture/notes.orgcaptmpl=. This template is used for taking note about various subjects that can go from conlanging to development. I wrote it so I can know from where this capture was made and when, and it even supports text that was highlighted in Emacs that will be inserted in a quote block. This is exported to =~/org/capture/notes.orgcaptmpl=.
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/notes.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/notes.orgcaptmpl
,* %^{Title} ,* %^{Title}
:PROPERTIES: :PROPERTIES:
:CAPTURED: %U :CAPTURED: %U
@ -2613,7 +2618,7 @@ This template is used for taking note about various subjects that can go from co
%? %?
#+END_SRC #+END_SRC
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/notes-quote.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/notes-quote.orgcaptmpl
,* %^{Title} ,* %^{Title}
:PROPERTIES: :PROPERTIES:
:CAPTURED: %U :CAPTURED: %U
@ -2631,7 +2636,7 @@ This template is used for taking note about various subjects that can go from co
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Protocol-ec45ec49 :CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Protocol-ec45ec49
:END: :END:
This capture is used when received through org-protocol, with the Org-protocol Extension for Firefox. It allows me to save in a quote block what Ive highlighted, as well as the link of the webpage on which my saved content was highlighted. This file is exported to =~/org/capture/protocol.orgcaptmpl=. This capture is used when received through org-protocol, with the Org-protocol Extension for Firefox. It allows me to save in a quote block what Ive highlighted, as well as the link of the webpage on which my saved content was highlighted. This file is exported to =~/org/capture/protocol.orgcaptmpl=.
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/protocol.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/protocol.orgcaptmpl
,* TODO [#C] %^{Title} ,* TODO [#C] %^{Title}
:PROPERTIES: :PROPERTIES:
:CAPTURED: %U :CAPTURED: %U
@ -2646,7 +2651,7 @@ This capture is used when received through org-protocol, with the Org-protocol E
#+END_SRC #+END_SRC
This next capture template is used only when a link is sent to Emacs and no content was highlighted. This next capture template is used only when a link is sent to Emacs and no content was highlighted.
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/protocol-link.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/protocol-link.orgcaptmpl
,* TODO [#C] Link: %^{Title} ,* TODO [#C] Link: %^{Title}
:PROPERTIES: :PROPERTIES:
:CAPTURED: %U :CAPTURED: %U
@ -2661,7 +2666,7 @@ This next capture template is used only when a link is sent to Emacs and no cont
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Resources-b23bfbd0 :CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Resources-b23bfbd0
:END: :END:
This is the default template for resources, which generally are located on the Internet. By default, I give them the lowest priority, because although this is something for me to remember later, it is not by default important. You can see in the properties I record when the capture happened, and what the link is. The title of the capture is a summary of what this is, while the body of the capture is a more detailed explanation of what I capture, why, and how it could be useful to me. This is the default template for resources, which generally are located on the Internet. By default, I give them the lowest priority, because although this is something for me to remember later, it is not by default important. You can see in the properties I record when the capture happened, and what the link is. The title of the capture is a summary of what this is, while the body of the capture is a more detailed explanation of what I capture, why, and how it could be useful to me.
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/resource.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/resource.orgcaptmpl
,* TODO [#C] %^{Title} ,* TODO [#C] %^{Title}
:PROPERTIES: :PROPERTIES:
:CAPTURED: %U :CAPTURED: %U
@ -2679,7 +2684,7 @@ This is the default template for resources, which generally are located on the I
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-Computers_and_stuff-a4eef8e3 :CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-Computers_and_stuff-a4eef8e3
:END: :END:
One type of task I often capture is related to my servers or thing about computers in general. With this, I can capture a task for which I will either set a schedule or a deadline. One type of task I often capture is related to my servers or thing about computers in general. With this, I can capture a task for which I will either set a schedule or a deadline.
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/informatique.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/informatique.orgcaptmpl
,* TODO %^{Title} ,* TODO %^{Title}
%^{Scheduled or Deadline?||SCHEDULED||DEADLINE}: %^t %^{Scheduled or Deadline?||SCHEDULED||DEADLINE}: %^t
:PROPERTIES: :PROPERTIES:
@ -2693,7 +2698,7 @@ One type of task I often capture is related to my servers or thing about compute
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-Health-74f8f338 :CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-Health-74f8f338
:END: :END:
This capture is rarely used (Im lucky to have a good health), but it can be useful. This capture is rarely used (Im lucky to have a good health), but it can be useful.
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/health.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/health.orgcaptmpl
,* %^{Title} ,* %^{Title}
SCHEDULED: %^t SCHEDULED: %^t
@ -2705,7 +2710,7 @@ This capture is rarely used (Im lucky to have a good health), but it can be u
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-Birthdays-ec3b27be :CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-Birthdays-ec3b27be
:END: :END:
This capture is used to store new birthdays I have to remember. They are set to be repeated yearly. This capture is used to store new birthdays I have to remember. They are set to be repeated yearly.
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/birthday.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/birthday.orgcaptmpl
,* %^{Name} ,* %^{Name}
SCHEDULED: %^t SCHEDULED: %^t
#+END_SRC #+END_SRC
@ -2714,7 +2719,7 @@ This capture is used to store new birthdays I have to remember. They are set to
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-Events-7f0f8dee :CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-Events-7f0f8dee
:END: :END:
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/event.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/event.orgcaptmpl
,* %^{Title} ,* %^{Title}
%^{Scheduled or deadline?||SCHEDULED||DEADLINE}: %^t %^{Scheduled or deadline?||SCHEDULED||DEADLINE}: %^t
%? %?
@ -2728,7 +2733,7 @@ This capture is used to store new birthdays I have to remember. They are set to
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Links-General-1f0732db :CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Links-General-1f0732db
:END: :END:
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/link.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/link.orgcaptmpl
,* TODO [#C] %^{Title} ,* TODO [#C] %^{Title}
:PROPERTIES: :PROPERTIES:
:CAPTURED: %U :CAPTURED: %U
@ -2741,7 +2746,7 @@ This capture is used to store new birthdays I have to remember. They are set to
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Links-YouTube-b89fe20e :CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Links-YouTube-b89fe20e
:END: :END:
#+BEGIN_SRC org :mkdirp yes :tangle ~/org/capture/youtube.orgcaptmpl #+BEGIN_SRC org :tangle ~/org/capture/youtube.orgcaptmpl
,* TODO [#C] %^{Title} ,* TODO [#C] %^{Title}
:PROPERTIES: :PROPERTIES:
:CAPTURED: %U :CAPTURED: %U