emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: Strange behaviour detected today
Date: Wed, 13 Dec 2023 12:05:56 +0100	[thread overview]
Message-ID: <7BC0DEA1-7B67-46AE-993E-624BEB90C03C@gmail.com> (raw)
In-Reply-To: <87wmtiwejh.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 5768 bytes --]

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-backtrace()
  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)
  (org-beamer-export-to-pdf)
  eval((org-beamer-export-to-pdf) t)
  command-line-1(("-l" "org-export.el" "p5.org" "--eval" "(org-beamer-export-to-pdf)"))
  command-line()
  normal-top-level()
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"

  (progn
    (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
                   '("letter"
                     "\\documentclass{letter}"))
      ;; Add KOMA script based books
      (add-to-list 'org-latex-classes
                   '("scrbook"
                     "\\documentclass{scrbook}"
                     ("\\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
                   '("scrreprt"
                     "\\documentclass{scrreprt}"
                     ("\\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))
            org-cite-biblatex-options
            "backend=biber,style=numeric,sorting=none,isbn=false,doi=false,url=true"))
      (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
            org-latex-pdf-process
            '("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"
  (hack-local-variables)
  ;; (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")
		  (org-beamer-export-to-pdf)
		(org-latex-export-to-pdf)))))


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

/PA

> 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-beamer-export-to-latex)
> 
> 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>


[-- Attachment #2: Type: text/html, Size: 19985 bytes --]

  reply	other threads:[~2023-12-13 11:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13 10:56 Strange behaviour detected today Pedro Andres Aranda Gutierrez
2023-12-13 11:02 ` Ihor Radchenko
2023-12-13 11:05   ` Pedro Andres Aranda Gutierrez [this message]
2023-12-13 11:15     ` Ihor Radchenko
2023-12-13 11:34       ` Fraga, Eric
2023-12-13 13:07         ` Ihor Radchenko
2023-12-13 13:32           ` Pedro Andres Aranda Gutierrez
2023-12-13 13:40           ` Fraga, Eric
2023-12-13 14:57 ` William Denton
2023-12-13 17:49   ` Pedro Andres Aranda Gutierrez
2023-12-14  5:47     ` Pedro Andres Aranda Gutierrez
2024-03-11 12:53       ` Detlev Zundel
  -- strict thread matches above, loose matches on Subject: below --
2024-03-11 17:54 Pedro Andres Aranda Gutierrez
2024-03-11 22:53 ` Detlev Zundel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7BC0DEA1-7B67-46AE-993E-624BEB90C03C@gmail.com \
    --to=paaguti@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).