From 189cb48440b3cbea81cfc804d04c1d1b501df6a4 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Fri, 13 Jan 2023 16:57:56 +0100 Subject: [PATCH] Try to fix the warning due to setting `org-babel-load-languages' --- README.org | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/README.org b/README.org index 016bb42..f0b23c3 100644 --- a/README.org +++ b/README.org @@ -2044,29 +2044,26 @@ list detailing and motivating each listing: #+name: lst:set-org-options #+begin_src emacs-lisp (with-eval-after-load 'org - (custom-set-variables - `(org-babel-load-languages - (delq nil '((C . t) - (calc . t) - ,(when (fboundp 'grapviz-dot-mode) '(dot . t)) - (emacs-lisp . t) - (eshell . t) - ,(when (fboundp 'fennel-mode) '(fennel . t)) - (fortran . t) - ,(when (fboundp 'gnuplot-mode) '(gnuplot . t)) - (js . t) - (latex . t) - (lisp . t) - ,(when (fboundp 'lua-mode) '(lua . t)) - ,(when (fboundp 'maxima-mode) '(maxima . t)) - (org . t) - (perl . t) - ;; The next two functions are not bound during bootstrap. - ,(when (and (fboundp 'choose-common-python-interpreter) - (fboundp 'choose-common-python-linter)) - '(python . t)) - (shell . t))))) (setopt + org-babel-load-languages + `((C . t) + (calc . t) + (dot . ,(fboundp 'grapviz-dot-mode)) + (emacs-lisp . t) + (fortran . t) + (gnuplot . ,(fboundp 'gnuplot-mode)) + (js . t) + (latex . t) + (lisp . t) + (lua . ,(fboundp 'lua-mode)) + (maxima . ,(fboundp 'maxima-mode)) + (org . t) + (perl . t) + ;; The Python setup uses the two functions below. + ;; Those functions are not yet bound during bootstrap. + (python . ,(and (fboundp 'choose-common-python-interpreter) + (fboundp 'choose-common-python-linter))) + (shell . t)) org-export-backends '(ascii beamer html icalendar latex odt texinfo) org-file-apps '((auto-mode . emacs) (directory . emacs) @@ -4270,7 +4267,8 @@ install and use [[https://gitlab.com/andreyorst/ob-fennel][ob-fennel]] with the (ensure-package-installation 'fennel-mode 'quelpa)) (unless (package-installed-p 'ob-fennel) (quelpa '(ob-fennel :repo "andreyorst/ob-fennel" :fetcher gitlab))) - (ensure-package-selection 'ob-fennel)) + (when (ensure-package-selection 'ob-fennel) + (org-babel-do-load-languages 'fennel (fboundp 'fennel-mode)))) #+end_src #+caption[Fennel example]: