[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange behaviour detected today

From: Pedro Andres Aranda Gutierrez
Subject: Re: Strange behaviour detected today
Date: Wed, 13 Dec 2023 12:05:56 +0100

Strange… here is the output of calling in batch mode

Emacs -Q -l org-export.el --batch p5.org --eval '(org-beamer-export-to-pdf)'

Error: error ("Invalid face box" :line-width 1 :color grey40)
  mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode -0x1fee891e37008046>))
  debug-early(error (error "Invalid face box" :line-width 1 :color grey40))
  internal-set-lisp-face-attribute(org-beamer-tag :box (:line-width 1 :color grey40) #<frame F1 0x7fab2c056910>)
  set-face-attribute(org-beamer-tag #<frame F1 0x7fab2c056910> :box (:line-width 1 :color grey40))
  apply(set-face-attribute org-beamer-tag #<frame F1 0x7fab2c056910> (:box (:line-width 1 :color grey40)))
  face-spec-set-2(org-beamer-tag #<frame F1 0x7fab2c056910> (:box (:line-width 1 :color grey40)))
  face-spec-recalc(org-beamer-tag #<frame F1 0x7fab2c056910>)
  face-spec-set(org-beamer-tag ((t (:box (:line-width 1 :color grey40)))) face-defface-spec)
  custom-declare-face(org-beamer-tag ((t (:box (:line-width 1 :color grey40)))) "The special face for beamer tags." :group org-export-beamer)
  eval((org-beamer-export-to-pdf) t)
  command-line-1(("-l" "org-export.el" "p5.org" "--eval" "(org-beamer-export-to-pdf)"))
Invalid face box: :line-width, 1, :color, grey40
make: *** [p5.pdf] Error 255

With my org-export.el being:

;; Auxiliar script for GNUmakefile
;;  Export to PDF from org
;;  Automatically detects presentations using the beamer class
;;  The rest are assumed to be documents
(require 'org)
(require 'ox-latex)
(require 'ob-python)

(eval-after-load "org"

    (let ((citeless t)) ;; set to nil if no bibliography in the pptx

      (org-babel-do-load-languages 'org-babel-load-languages
                                   '((python . t)
                                     (shell . t)))
      (add-to-list 'org-latex-packages-alist
                   '("" "listings"))
      (add-to-list 'org-latex-packages-alist
                   '("" "xcolor"))
      (add-to-list 'org-latex-classes
      ;; Add KOMA script based books
      (add-to-list 'org-latex-classes
                     ("\\chapter{%s}" . "\\chapter*{%s}")
                     ("\\section{%s}" . "\\section*{%s}")
                     ("\\subsection{%s}" . "\\subsection*{%s}")
                     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                     ("\\paragraph{%s}" . "\\paragraph*{%s}")
                     ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
      (add-to-list 'org-latex-classes
                     ("\\chapter{%s}" . "\\chapter*{%s}")
                     ("\\section{%s}" . "\\section*{%s}")
                     ("\\subsection{%s}" . "\\subsection*{%s}")
                     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                     ("\\paragraph{%s}" . "\\paragraph*{%s}")
                     ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

      ;; (add-to-list 'org-export-filter-src-block-functions
      ;;              'my-latex-src-block-filter)

      (if citeless
          (setq org-cite-export-processors nil)
        (setq org-cite-export-processors '((beamer . biblatex)
                                           (latex .  biblatex))
      (setq python-indent-offset 4
            org-confirm-babel-evaluate nil
       org-src-preserve-indentation t
       org-src-fontify-natively t
       org-export-latex-listings t
       org-latex-listings 'listings
            ;; Make sure you have bibtex integrated in the production loop
            '("latexmk -bibtex -pdflatex='pdflatex --shell-escape --interaction=nonstopmode' -pdf -f %f")
            org-babel-python-command "python3"))))

(defun org-export ()
  "Save the current buffer and
export it to latex if the underlying file contents
hints a LaTeX document or a Beamer presentation"
  ;; (print org-cite-export-processors)
  (goto-char (point-min))
  ;; (print (format "org-cite-export-processors is %s" org-cite-export-processors))
  (when (re-search-forward "^#\\+LATEX_CLASS: \\([^ ]+\\)$" (point-max) t 1)
(let ((class (match-string-no-properties 1)))
 (message "Exporting to LaTeX [class: %s]..." class)
 (if (string= class "beamer")

Emacs -Q and no place where I set faces in the setup (at least that I’m aware of).


El 13 dic 2023, a las 12:02, Ihor Radchenko <yantar92@posteo.net> escribió:

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

I've recompiled emacs master today and when I try to export an org
presentation to latex and I get the following error:

Exporting to LaTeX [class: beamer]...
set-face-attribute: Invalid face box: :line-width, 1, :color, grey40

This happens when calling


Org mode does not call `set-face-attribute'. It is something else.
Probably in your config.

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]