Start playing with `org-capture-templates'

This commit is contained in:
Gerard Vermeulen 2024-03-23 15:13:24 +01:00
parent 0f6eb9b353
commit 7b2009165b

View File

@ -2178,35 +2178,37 @@ Links to Org-mode videos are:
*** Setup Org
:PROPERTIES:
:CUSTOM_ID: sec:setup-org
:ID: 0D725DA1-7431-40BD-85FF-EFF4F7E4EC95
:END:
I have split the initial [[https://orgmode.org/][Org-mode]] setup over fourteen listings. Here, follows a
I have split the initial [[https://orgmode.org/][Org-mode]] setup over fifteen listings. Here, follows a
list detailing and motivating each listing:
1. Listing [[lst:set-org-options]] handles basic [[https://orgmode.org/][Org-mode]] options.
2. Listing [[lst:undo-org-ctags]] undoes ~org-ctags~. See [[https://list.orgmode.org/87mt43agk6.fsf@localhost/][org-ctags land grab]] for
2. Listing [[lst:org-capture-templates]] initializes a simple capture template.
3. Listing [[lst:undo-org-ctags]] undoes ~org-ctags~. See [[https://list.orgmode.org/87mt43agk6.fsf@localhost/][org-ctags land grab]] for
more information.
3. Listing [[lst:setup-org-babel]] sets ~ob-core~, ~ob-latex~, and ~ob-lisp~ options.
4. Listing [[lst:setup-org-babel]] sets ~ob-core~, ~ob-latex~, and ~ob-lisp~ options.
See [[info:org#Working with Source Code][working with source code (info)]] for Org Babel information.
4. Listing [[lst:no-org-babel-eval]] prevents evaluation of blocks without an
5. Listing [[lst:no-org-babel-eval]] prevents evaluation of blocks without an
=org-babel-execute:<LANG>= function and adds fake =org-babel-execute:<LANG>=
functions to silence {{{kbd(M-x org-lint)}}} warnings.
5. Listing [[lst:set-org-link-options]] handles [[https://orgmode.org/][Org-mode]] options specific to
6. Listing [[lst:set-org-link-options]] handles [[https://orgmode.org/][Org-mode]] options specific to
[[info:org#Hyperlinks][hyperlinks (info)]].
6. Listing [[lst:looking-at-org-id]] enables recent ~org-id~ features.
7. Listing [[lst:setup-org-mode-map-1]] and [[lst:setup-org-mode-map-2]] extend the
7. Listing [[lst:looking-at-org-id]] enables recent ~org-id~ features.
8. Listing [[lst:setup-org-mode-map-1]] and [[lst:setup-org-mode-map-2]] extend the
=org-mode-map= with useful key-bindings.
8. Listing [[lst:setup-org-src]] facilitates [[info:org#Editing Source Code][editing source code blocks]], and it
9. Listing [[lst:setup-org-src]] facilitates [[info:org#Editing Source Code][editing source code blocks]], and it
provides functions to change the indentation of all =org-src-mode= blocks.
9. Listing [[lst:setup-ob-python]] allows to pretty-print Python session source
block values with [[https://github.com/psf/black#readme][black]] instead of [[https://docs.python.org/3/library/pprint.html][pprint]]. This snippet may break in the
future, because it sets =org-babel-python--def-format-value= which is a
constant declared "private" by two dashes in its name!
10. Listing [[lst:set-org-export-options]] selects the =non-intrusive= expert user
10. Listing [[lst:setup-ob-python]] allows to pretty-print Python session source
block values with [[https://github.com/psf/black#readme][black]] instead of [[https://docs.python.org/3/library/pprint.html][pprint]]. This snippet may break in the
future, because it sets =org-babel-python--def-format-value= which is a
constant declared "private" by two dashes in its name!
11. Listing [[lst:set-org-export-options]] selects the =non-intrusive= expert user
interface for export dispatching.
11. Listing [[lst:setup-org-for-lualatex-export]] and
12. Listing [[lst:setup-org-for-lualatex-export]] and
[[lst:set-ox-latex-options-for-lualatex-export]] configure [[https://orgmode.org/][Org-mode]] to generate
output for the LuaLaTeX compiler.
12. Listing [[lst:setup-org-latex-classes]] defines [[info:org#LaTeXspecificexportsettings][org-latex-classes (info)]] for
13. Listing [[lst:setup-org-latex-classes]] defines [[info:org#LaTeXspecificexportsettings][org-latex-classes (info)]] for
backward compatibility. For an explanation of the code in listing
[[lst:setup-org-latex-classes]], type {{{kbd(C-h v org-latex-classes)}}}.
@ -2253,6 +2255,17 @@ list detailing and motivating each listing:
org-use-property-inheritance t))
#+end_src
#+caption[Setup =org-capture-templates=]:
#+caption: Setup =org-capture-templates=.
#+name: lst:org-capture-templates
#+begin_src emacs-lisp -n :results silent
(with-eval-after-load 'org-capture
(setopt org-capture-templates
'(("f" "Flat capture database" entry (file "flat.org")
"* %^{Prompt}t %?
%a"))))
#+end_src
#+caption[Undo calling =org-ctags-enable= ]:
#+caption: Undo calling =org-ctags-enable=.
#+name: lst:undo-org-ctags