[Spacemacs] Move org capture templates out of main config
Use org capture templates out of my main config so they can be shared between my Spacemacs config and my vanilla config
This commit is contained in:
parent
3bc7860010
commit
90608c53e3
2
org/capture/birthday.orgcaptmpl
Normal file
2
org/capture/birthday.orgcaptmpl
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
* %^{Name}
|
||||||
|
SCHEDULED: %^t
|
16
org/capture/email.orgcaptmpl
Normal file
16
org/capture/email.orgcaptmpl
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
** TODO [#A] Write Email
|
||||||
|
SCHEDULED: %^t
|
||||||
|
:PROPERTIES:
|
||||||
|
:CAPTURED: %U
|
||||||
|
:END:
|
||||||
|
From: Lucien Cartier-Tilet <lucien@phundrak.com>
|
||||||
|
To: %^{Recipient}
|
||||||
|
Subject: %^{Object}
|
||||||
|
--text follows this line--
|
||||||
|
%?
|
||||||
|
--
|
||||||
|
Lucien “Phundrak” Cartier-Tilet
|
||||||
|
https://phundrak.com (Français)
|
||||||
|
https://en.phundrak.com (English)
|
||||||
|
|
||||||
|
Sent from a Free and Open-Source Linux operating system with GNU/Emacs
|
3
org/capture/event.orgcaptmpl
Normal file
3
org/capture/event.orgcaptmpl
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
* %^{Title}
|
||||||
|
%^{Scheduled or deadline?||SCHEDULED||DEADLINE}: %^t
|
||||||
|
%?
|
4
org/capture/health.orgcaptmpl
Normal file
4
org/capture/health.orgcaptmpl
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
* %^{Title}
|
||||||
|
SCHEDULED: %^t
|
||||||
|
|
||||||
|
%?
|
6
org/capture/informatique.orgcaptmpl
Normal file
6
org/capture/informatique.orgcaptmpl
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
* TODO %^{Title}
|
||||||
|
%^{Scheduled or Deadline?||SCHEDULED||DEADLINE}: %^t
|
||||||
|
:PROPERTIES:
|
||||||
|
:CATEGORY: %^{Category}
|
||||||
|
:END:
|
||||||
|
%?
|
2
org/capture/journal.orgcaptmpl
Normal file
2
org/capture/journal.orgcaptmpl
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
* %U %^{Title}
|
||||||
|
%?
|
6
org/capture/link.orgcaptmpl
Normal file
6
org/capture/link.orgcaptmpl
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
* TODO [#C] %^{Title}
|
||||||
|
:PROPERTIES:
|
||||||
|
:CAPTURED: %U
|
||||||
|
:LINK: %^{Link}
|
||||||
|
:END:
|
||||||
|
%?
|
10
org/capture/notes-quote.orgcaptmpl
Normal file
10
org/capture/notes-quote.orgcaptmpl
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
* %^{Title}
|
||||||
|
:PROPERTIES:
|
||||||
|
:CAPTURED: %U
|
||||||
|
:END:
|
||||||
|
Possible inspiration:
|
||||||
|
#+begin_quote
|
||||||
|
%i
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
%?
|
5
org/capture/notes.orgcaptmpl
Normal file
5
org/capture/notes.orgcaptmpl
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
* %^{Title}
|
||||||
|
:PROPERTIES:
|
||||||
|
:CAPTURED: %U
|
||||||
|
:END:
|
||||||
|
%?
|
7
org/capture/protocol-link.orgcaptmpl
Normal file
7
org/capture/protocol-link.orgcaptmpl
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
* TODO [#C] Link: %^{Title}
|
||||||
|
:PROPERTIES:
|
||||||
|
:CAPTURED: %U
|
||||||
|
:LINK: %:link
|
||||||
|
:TITLE: %:description
|
||||||
|
:END:
|
||||||
|
%?
|
11
org/capture/protocol.orgcaptmpl
Normal file
11
org/capture/protocol.orgcaptmpl
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
* TODO [#C] %^{Title}
|
||||||
|
:PROPERTIES:
|
||||||
|
:CAPTURED: %U
|
||||||
|
:LINK: %:link
|
||||||
|
:TITLE: %:description
|
||||||
|
:END:
|
||||||
|
#+begin_quote
|
||||||
|
%i
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
%?
|
6
org/capture/resource.orgcaptmpl
Normal file
6
org/capture/resource.orgcaptmpl
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
* TODO [#C] %^{Title}
|
||||||
|
:PROPERTIES:
|
||||||
|
:CAPTURED: %U
|
||||||
|
:LINK: %^{Link}
|
||||||
|
:END:
|
||||||
|
%?
|
7
org/capture/youtube.orgcaptmpl
Normal file
7
org/capture/youtube.orgcaptmpl
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
* TODO [#C] %^{Title}
|
||||||
|
:PROPERTIES:
|
||||||
|
:CAPTURED: %U
|
||||||
|
:AUTHOR: %^{Author}
|
||||||
|
:LINK: %^{Link}
|
||||||
|
:END:
|
||||||
|
%?
|
@ -1916,10 +1916,10 @@ Cairo. The function definition was taken [[https://github.com/caiohcs/my-emacs#s
|
|||||||
:END:
|
:END:
|
||||||
This function comes directly from Xah Lee’s website and allows the user to sort
|
This function comes directly from Xah Lee’s website and allows the user to sort
|
||||||
files in a dired buffer depending on four factors:
|
files in a dired buffer depending on four factors:
|
||||||
* File name
|
- File name
|
||||||
* File size
|
- File size
|
||||||
* Last modification date
|
- Last modification date
|
||||||
* File extension
|
- File extension
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun xah/dired-sort ()
|
(defun xah/dired-sort ()
|
||||||
"Sort dired dir listing in different ways. Prompt for a choice.
|
"Sort dired dir listing in different ways. Prompt for a choice.
|
||||||
@ -2803,47 +2803,6 @@ one of them.
|
|||||||
<p><img src="./img/org-mode.svg" alt="Screenshot of an org-mode buffer" style="max-height: 900px" /></p>
|
<p><img src="./img/org-mode.svg" alt="Screenshot of an org-mode buffer" style="max-height: 900px" /></p>
|
||||||
#+end_export
|
#+end_export
|
||||||
|
|
||||||
And here you can find the source code of this buffer you just saw a screenshot
|
|
||||||
of:
|
|
||||||
#+BEGIN_SRC org :exports code
|
|
||||||
,#+TITLE: My Document
|
|
||||||
,#+AUTHOR: Lucien Cartier-Tilet
|
|
||||||
,#+EMAIL: lucien@phundrak.com
|
|
||||||
,#+DATE: 2020-12-21
|
|
||||||
,#+TAGS: tag1|tag2|tag3
|
|
||||||
,* Header 1
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: custom-id-for-html-export
|
|
||||||
:END:
|
|
||||||
# A regular comment
|
|
||||||
This is an example org file, with [[https://config.phundrak.com/emacs][a link]], a {{{macro(with arguments)}}}, an <<anchor>>, /text in italic/, __undelined__, *bold*, +striken through+, some ~code~ and =verbatim=, some^{superscript} and_{subscript}, a code block and a bullet list:
|
|
||||||
,* Element 1
|
|
||||||
,* Element 2
|
|
||||||
,#+header :export code
|
|
||||||
,#+BEGIN_SRC emacs-lisp
|
|
||||||
(message "Hello World!")
|
|
||||||
,#+END_SRC
|
|
||||||
| / | <r> | <c> | < |
|
|
||||||
| This | is | a | table |
|
|
||||||
|------+---------+----------+-------|
|
|
||||||
| With | various | elements | |
|
|
||||||
,** TODO Global task [1/2]
|
|
||||||
,*** TODO [#A] Task 1
|
|
||||||
,*** TODO Checkboxes [1/3]
|
|
||||||
- [ ] Checkbox 1
|
|
||||||
- [X] Checkbox 2
|
|
||||||
- [ ] Checkbox 3
|
|
||||||
,*** DONE Task 2
|
|
||||||
CLOSED: [2020-12-21 mon. 14:30]
|
|
||||||
,** Header 2
|
|
||||||
,*** Header 3
|
|
||||||
,**** Header 4
|
|
||||||
,***** Header 5
|
|
||||||
,****** Header 6
|
|
||||||
,******* Header 7
|
|
||||||
,******** Header 8
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
In order to make org-mode even sexier, let’s enable ~variable-pitch-mode~ for
|
In order to make org-mode even sexier, let’s enable ~variable-pitch-mode~ for
|
||||||
org-mode so we can get some proportional font. I’ll also remove ~auto-fill-mode~
|
org-mode so we can get some proportional font. I’ll also remove ~auto-fill-mode~
|
||||||
which seems to stick to Orgmode like hell and I don’t know why.
|
which seems to stick to Orgmode like hell and I don’t know why.
|
||||||
@ -3203,32 +3162,7 @@ is exported to another format the header disappears but its content stays.
|
|||||||
(ox-extras-activate '(ignore-headlines))
|
(ox-extras-activate '(ignore-headlines))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
This gives us access to the ~:ignore:~ tag which allows the behavior above
|
This gives us access to the ~:ignore:~ tag which allows the behavior above
|
||||||
mentioned. To give you an idea, the org buffer
|
mentioned.
|
||||||
#+BEGIN_SRC org
|
|
||||||
,* Headline 1
|
|
||||||
Blah
|
|
||||||
|
|
||||||
,** Headline 2
|
|
||||||
Blah
|
|
||||||
|
|
||||||
,*** Hidden headline 3-1 :ignore:
|
|
||||||
Blabla
|
|
||||||
|
|
||||||
,*** Hidden headline 3-2 :ignore:
|
|
||||||
Blahblah
|
|
||||||
#+END_SRC
|
|
||||||
Will be exported as if it were the buffer
|
|
||||||
#+BEGIN_SRC org
|
|
||||||
,* Headline 1
|
|
||||||
Blah
|
|
||||||
|
|
||||||
,** Headline 2
|
|
||||||
Blah
|
|
||||||
|
|
||||||
Blabla
|
|
||||||
|
|
||||||
Blahblah
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
**** Capture
|
**** Capture
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
@ -3404,219 +3338,9 @@ but in external files which can be modified freely as actual Org buffers instead
|
|||||||
of trying to get a proper one with loads of ~\n~ characters and such. All these
|
of trying to get a proper one with loads of ~\n~ characters and such. All these
|
||||||
templates are declared below.
|
templates are declared below.
|
||||||
|
|
||||||
In the next sub-sections will be described my org capture templates. These are
|
My org capture templates are not tangled into my Emacs configuration
|
||||||
not tangled into my Emacs configuration files, but into separate ~.orgcaptmpl~
|
files, but into separate ~.orgcaptmpl~ files stored into =~/org/capture/=.
|
||||||
files stored into =~/org/capture/=.
|
You can find these in my repository [[https://labs.phundrak.com/phundrak/dotfiles/src/branch/master/org/capture][here]] or [[https://github.com/Phundrak/dotfiles/tree/master/org/capture][here]].
|
||||||
|
|
||||||
***** Emails
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Emails-d87336fe
|
|
||||||
:END:
|
|
||||||
This is my template for a new Email:
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/email.orgcaptmpl
|
|
||||||
,** TODO [#A] Write Email
|
|
||||||
SCHEDULED: %^t
|
|
||||||
:PROPERTIES:
|
|
||||||
:CAPTURED: %U
|
|
||||||
:END:
|
|
||||||
From: Lucien Cartier-Tilet <lucien@phundrak.com>
|
|
||||||
To: %^{Recipient}
|
|
||||||
Subject: %^{Object}
|
|
||||||
--text follows this line--
|
|
||||||
%?
|
|
||||||
--
|
|
||||||
Lucien “Phundrak” Cartier-Tilet
|
|
||||||
https://phundrak.com (Français)
|
|
||||||
https://en.phundrak.com (English)
|
|
||||||
|
|
||||||
Sent from a Free and Open-Source Linux operating system with GNU/Emacs
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
I use it in case my computer is not yet connected to the internet and I need to
|
|
||||||
already write the email so I can send it later. All I will need to to afterwards
|
|
||||||
will be to copy and paste my capture in a new message buffer and send it once I
|
|
||||||
am back online. This is exported to =~/org/capture/email.orgcaptmpl=.
|
|
||||||
|
|
||||||
***** Journal
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Journal-9916f9bf
|
|
||||||
: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=.
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/journal.orgcaptmpl
|
|
||||||
,* %U %^{Title}
|
|
||||||
%?
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
***** Notes
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Notes-4b4c10aa
|
|
||||||
: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=.
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/notes.orgcaptmpl
|
|
||||||
,* %^{Title}
|
|
||||||
:PROPERTIES:
|
|
||||||
:CAPTURED: %U
|
|
||||||
:END:
|
|
||||||
%?
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/notes-quote.orgcaptmpl
|
|
||||||
,* %^{Title}
|
|
||||||
:PROPERTIES:
|
|
||||||
:CAPTURED: %U
|
|
||||||
:END:
|
|
||||||
Possible inspiration:
|
|
||||||
,#+begin_quote
|
|
||||||
%i
|
|
||||||
,#+end_quote
|
|
||||||
|
|
||||||
%?
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
***** Protocol
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Protocol-ec45ec49
|
|
||||||
: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 I’ve
|
|
||||||
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 :tangle ~/org/capture/protocol.orgcaptmpl
|
|
||||||
,* TODO [#C] %^{Title}
|
|
||||||
:PROPERTIES:
|
|
||||||
:CAPTURED: %U
|
|
||||||
:LINK: %:link
|
|
||||||
:TITLE: %:description
|
|
||||||
:END:
|
|
||||||
,#+begin_quote
|
|
||||||
%i
|
|
||||||
,#+end_quote
|
|
||||||
|
|
||||||
%?
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
This next capture template is used only when a link is sent to Emacs and no
|
|
||||||
content was highlighted.
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/protocol-link.orgcaptmpl
|
|
||||||
,* TODO [#C] Link: %^{Title}
|
|
||||||
:PROPERTIES:
|
|
||||||
:CAPTURED: %U
|
|
||||||
:LINK: %:link
|
|
||||||
:TITLE: %:description
|
|
||||||
:END:
|
|
||||||
%?
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
***** Resources
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Resources-b23bfbd0
|
|
||||||
: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.
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/resource.orgcaptmpl
|
|
||||||
,* TODO [#C] %^{Title}
|
|
||||||
:PROPERTIES:
|
|
||||||
:CAPTURED: %U
|
|
||||||
:LINK: %^{Link}
|
|
||||||
:END:
|
|
||||||
%?
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
***** Tasks
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-3fcf382a
|
|
||||||
:END:
|
|
||||||
****** Computers and stuff
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-Computers_and_stuff-a4eef8e3
|
|
||||||
: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.
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/informatique.orgcaptmpl
|
|
||||||
,* TODO %^{Title}
|
|
||||||
%^{Scheduled or Deadline?||SCHEDULED||DEADLINE}: %^t
|
|
||||||
:PROPERTIES:
|
|
||||||
:CATEGORY: %^{Category}
|
|
||||||
:END:
|
|
||||||
%?
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
****** Health
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-Health-74f8f338
|
|
||||||
:END:
|
|
||||||
This capture is rarely used (I’m lucky to have a good health), but it can be
|
|
||||||
useful.
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/health.orgcaptmpl
|
|
||||||
,* %^{Title}
|
|
||||||
SCHEDULED: %^t
|
|
||||||
|
|
||||||
%?
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
****** Birthdays
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-Birthdays-ec3b27be
|
|
||||||
:END:
|
|
||||||
This capture is used to store new birthdays I have to remember. They are set to
|
|
||||||
be repeated yearly.
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/birthday.orgcaptmpl
|
|
||||||
,* %^{Name}
|
|
||||||
SCHEDULED: %^t
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
****** Events
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Tasks-Events-7f0f8dee
|
|
||||||
:END:
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/event.orgcaptmpl
|
|
||||||
,* %^{Title}
|
|
||||||
%^{Scheduled or deadline?||SCHEDULED||DEADLINE}: %^t
|
|
||||||
%?
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
***** Links
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Links-586a6b2a
|
|
||||||
:END:
|
|
||||||
****** General
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Links-General-1f0732db
|
|
||||||
:END:
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/link.orgcaptmpl
|
|
||||||
,* TODO [#C] %^{Title}
|
|
||||||
:PROPERTIES:
|
|
||||||
:CAPTURED: %U
|
|
||||||
:LINK: %^{Link}
|
|
||||||
:END:
|
|
||||||
%?
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
****** YouTube
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-Links-YouTube-b89fe20e
|
|
||||||
:END:
|
|
||||||
#+BEGIN_SRC org :tangle ~/org/capture/youtube.orgcaptmpl
|
|
||||||
,* TODO [#C] %^{Title}
|
|
||||||
:PROPERTIES:
|
|
||||||
:CAPTURED: %U
|
|
||||||
:AUTHOR: %^{Author}
|
|
||||||
:LINK: %^{Link}
|
|
||||||
:END:
|
|
||||||
%?
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
**** Custom org-mode functions
|
**** Custom org-mode functions
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
|
Loading…
Reference in New Issue
Block a user