Add another example to the Org mode introspection section

This commit is contained in:
Gerard Vermeulen 2024-03-10 15:44:16 +01:00
parent 09992137a9
commit 5fc502826b

View File

@ -3027,6 +3027,13 @@ SCHEDULED: <2023-06-30 Fri>
:CUSTOM_ID: sec:org-introspection :CUSTOM_ID: sec:org-introspection
:END: :END:
1. Listing [[lst:valid-org-babel-load-languages-entries]] extracts an association
list of library names and ~org-babel-execute:LANGUAGE~ function names.
2. Listing [[lst:org-babel-active-languages]] produces a list containing language
names that have ~org-babel-execute:LANGUAGE~ functions.
3. Listing [[lst:get-in-buffer-settings]] and [[lst:get-in-buffer-settings-result]] show
how to access [[info:org#In-buffer Settings][In-buffer Settings (info)]].
#+caption[Find valid entries for =org-babel-load-languages=]: #+caption[Find valid entries for =org-babel-load-languages=]:
#+caption: Find valid entries for =org-babel-load-languages=. #+caption: Find valid entries for =org-babel-load-languages=.
#+name: lst:valid-org-babel-load-languages-entries #+name: lst:valid-org-babel-load-languages-entries
@ -3117,6 +3124,23 @@ Return a list of items where the filename is the `car' of each item and the
("perl") ("python") ("ruby") ("shell") ("text") ("toml")) ("perl") ("python") ("ruby") ("shell") ("text") ("toml"))
#+end_src #+end_src
#+caption[Get "in-buffer" settings]:
#+caption: Get "in-buffer" settings.
#+name: lst:get-in-buffer-settings
#+header: :wrap "src emacs-lisp -n :eval never :tangle no"
#+begin_src emacs-lisp -n :exports both :results value pp :tangle no
(org-collect-keywords '("title" "author" "latex_class"))
#+end_src
#+caption[Get "in-buffer" settings result]:
#+caption: Get "in-buffer" settings result.
#+name: lst:get-in-buffer-settings-result
#+RESULTS: lst:get-in-buffer-settings
#+begin_src emacs-lisp -n :eval never :tangle no
(("TITLE" "Emacs setup for use with LaTeX, Lisp, Org, and Python")
("AUTHOR" "Gerard Vermeulen") ("LATEX_CLASS" "article"))
#+end_src
*** [[https://github.com/bdarcus/citar][Citar: citing bibliography]] with [[https://orgmode.org/][Org Mode]] *** [[https://github.com/bdarcus/citar][Citar: citing bibliography]] with [[https://orgmode.org/][Org Mode]]
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: sec:citing-bibliography :CUSTOM_ID: sec:citing-bibliography