Add the "Debug setting =org-babel-load-languages= options" section

This commit is contained in:
Gerard Vermeulen 2023-02-26 14:55:12 +01:00
parent ed91d44303
commit 9e4b79f0fd

View File

@ -2411,6 +2411,92 @@ else:
| -2 | [NO-PACKAGES] | | -2 | [NO-PACKAGES] |
| -3 | [NO-EXTRA] | | -3 | [NO-EXTRA] |
*** Debug setting =org-babel-load-languages= options
:PROPERTIES:
:CUSTOM_ID: sec:setopt-org-babel-load-languages
: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=.
#+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 :exports both
(defun all-org-babel-execute-fns ()
"Find `ob-LANGUAGE' files in Org defining `org-babel-execute:LANGUAGE'.
Return a list of items where the filename is the `car' of each item and the
`cdr' of each item lists the `org-babel-execute:LANGUAGE' functions."
(let* ((dir (file-name-parent-directory (locate-library "org")))
(names (directory-files dir t (rx "ob-" (+ print) ".el" eos))))
(cl-loop for name in names
for found = (has-org-babel-execute-fn name)
when found collect found)))
(defun has-org-babel-execute-fn (name)
(let* ((buffer (find-file-noselect name))
(base (file-name-base (buffer-file-name buffer)))
(regexp (rx "defun" (+ blank) "org-babel-execute:" (group (+ graphic))))
(matches))
(save-match-data
(save-excursion
(with-current-buffer buffer
(save-restriction
(widen)
(goto-char 1)
(while (re-search-forward regexp nil t 1)
(push (match-string-no-properties 1) matches))))))
(when matches
`(,base ,@matches))))
(all-org-babel-execute-fns)
#+end_src
#+caption[Org Babel libraries with =org-babel-execute:language= functions]:
#+caption: Org Babel libraries with =org-babel-execute:language= functions.
#+RESULTS: lst:valid-org-babel-load-languages-entries
#+begin_src emacs-lisp :results silent :tangle no
(("ob-C" "C" "D" "C++" "cpp")
("ob-R" "R")
("ob-awk" "awk")
("ob-calc" "calc")
("ob-clojure" "clojurescript" "clojure")
("ob-css" "css")
("ob-ditaa" "ditaa")
("ob-dot" "dot")
("ob-emacs-lisp" "emacs-lisp")
("ob-eshell" "eshell")
("ob-forth" "forth")
("ob-fortran" "fortran")
("ob-gnuplot" "gnuplot")
("ob-groovy" "groovy")
("ob-haskell" "haskell")
("ob-java" "java")
("ob-js" "js")
("ob-julia" "julia")
("ob-latex" "latex")
("ob-lilypond" "lilypond")
("ob-lisp" "lisp")
("ob-lua" "lua")
("ob-makefile" "makefile")
("ob-maxima" "maxima")
("ob-ocaml" "ocaml")
("ob-octave" "octave" "matlab")
("ob-org" "org")
("ob-perl" "perl")
("ob-plantuml" "plantuml")
("ob-processing" "processing")
("ob-python" "python")
("ob-ruby" "ruby")
("ob-sass" "sass")
("ob-scheme" "scheme")
("ob-screen" "screen")
("ob-sed" "sed")
("ob-shell" "shell")
("ob-sql" "sql")
("ob-sqlite" "sqlite"))
#+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
@ -4565,6 +4651,10 @@ server, before plunging into the configuration steps:
5. [[https://ddavis.io/posts/python-emacs-3/][Python & Emacs, Take 3]] 5. [[https://ddavis.io/posts/python-emacs-3/][Python & Emacs, Take 3]]
6. [[https://ddavis.io/posts/emacs-python-lsp/][Python with Emacs: py(v)env and lsp-mode]] 6. [[https://ddavis.io/posts/emacs-python-lsp/][Python with Emacs: py(v)env and lsp-mode]]
Videos
1. [[yt:HTLu2DFOdTg][Python's Class Development Kit - Raymond Hettinger]]
2.
*** [[https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/python.el][Python-mode]] *** [[https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/python.el][Python-mode]]
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: sec:python-mode :CUSTOM_ID: sec:python-mode