Add a function to help eliminating Biber exit code 2

This commit is contained in:
Gerard Vermeulen 2022-05-10 08:20:48 +02:00
parent e0ddb3458f
commit 87a8628891

View File

@ -615,6 +615,7 @@ defined in this Org file.
(set-default-face-height :no-manual t)
"LaTeX"
(TeX-brace-count-line-override :no-manual t)
(biber-delete-cache :no-manual t)
(toggle-TeX-brace-count-line-override :no-manual t)
(update-lualatex-opentype-font-name-database :no-manual t)
"Org"
@ -1825,6 +1826,21 @@ valid directories and files. In an [[https://orgmode.org/][Org-mode]] buffer th
3. [[https://github.com/yuchenlin/rebiber][Rebiber: A tool for normalizing bibtex with official info]]
4. [[https://github.com/josephwright/biblatex-phys][A biblatex implementation of the AIP and APS bibliography style]]
#+caption[Delete =Biber= cache to get rid of =Biber= exit code 2]:
#+caption: Delete =Biber= cache to get rid of =Biber= exit code 2.
#+name: lst:delete-biber-cache
#+begin_src emacs-lisp
(with-eval-after-load 'emacs
;; https://tex.stackexchange.com/a/579356 answers
;; "How to solve Biber exiting with error code 2 but no error messages?"
(defun biber-delete-cache ()
"Delete the `Biber' cache to get rid of `Biber' exit code 2."
(cl-destructuring-bind (exit-code output)
(shell-command-with-exit-code "rm" "-rf" "$(biber --cache)")
(if (= 0 exit-code) (message "%s") (string-trim output)
(error "%s" (string-trim output))))))
#+end_src
*** [[info:org#Adding Hyperlink Types][Making Org hyperlink types (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:making-org-hyperlink-types