Make an "Org introspection" section that disables tangling

This commit is contained in:
Gerard Vermeulen 2023-04-26 12:09:45 +02:00
parent c6031c37bf
commit c374ac9156
1 changed files with 53 additions and 4 deletions

View File

@ -2413,14 +2413,14 @@ else:
| -2 | [NO-PACKAGES] |
| -3 | [NO-EXTRA] |
*** Debug setting =org-babel-load-languages= options
*** Org introspection
:PROPERTIES:
:CUSTOM_ID: sec:setopt-org-babel-load-languages
:CUSTOM_ID: sec:org-introspection
:header-args:emacs-lisp: :exports code :tangle no
:END:
#+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
#+header: :wrap "src emacs-lisp :results silent :tangle no"
#+begin_src emacs-lisp :exports both :results value pp
@ -2499,6 +2499,55 @@ Return a list of items where the filename is the `car' of each item and the
("ob-sqlite" "sqlite"))
#+end_src
#+caption[Find active Org Babel languages]:
#+caption: Find active Org Babel languages.
#+name: lst:org-babel-active-languages
#+header: :wrap "src emacs-lisp :results silent :tangle no"
#+begin_src emacs-lisp :exports both :results value pp
(defun org-babel-active-languages ()
(let ((result '("conf" "latex-extra-header" "latex-header" "text" "toml")))
(mapatoms
(lambda (x)
(when (and
(string-prefix-p "org-babel-execute:" (symbol-name x))
(not (eq 'org-babel-shell-initialize (get x 'definition-name))))
(when (symbol-file x)
(push (string-remove-prefix "org-babel-execute:" (symbol-name x))
result)))))
result))
(mapcar #'list (org-babel-active-languages))
#+end_src
#+caption[Active Org Babel languages]:
#+caption: Active Org Babel languages.
#+RESULTS: lst:org-babel-active-languages
#+begin_src emacs-lisp :results silent :tangle no
(("calc")
("perl")
("lisp")
("eshell")
("maxima")
("fortran")
("D")
("C")
("C++")
("latex-header")
("org")
("cpp")
("js")
("shell")
("elisp")
("latex-extra-header")
("latex")
("emacs-lisp")
("conf")
("latex-extra-header")
("latex-header")
("text")
("toml"))
#+end_src
*** [[https://github.com/bdarcus/citar][Citar: citing bibliography]] with [[https://orgmode.org/][Org Mode]]
:PROPERTIES:
:CUSTOM_ID: sec:citing-bibliography