all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Strange behaviour detected today
@ 2023-12-13 10:56 Pedro Andres Aranda Gutierrez
  2023-12-13 11:02 ` Ihor Radchenko
  2023-12-13 14:57 ` William Denton
  0 siblings, 2 replies; 13+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2023-12-13 10:56 UTC (permalink / raw)
  To: Org Mode List

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

Hi

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)

both from emacs in interactive and in batch mode.

Best, /PA

-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange behaviour detected today
  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
  2023-12-13 14:57 ` William Denton
  1 sibling, 1 reply; 13+ messages in thread
From: Ihor Radchenko @ 2023-12-13 11:02 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List

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>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange behaviour detected today
  2023-12-13 11:02 ` Ihor Radchenko
@ 2023-12-13 11:05   ` Pedro Andres Aranda Gutierrez
  2023-12-13 11:15     ` Ihor Radchenko
  0 siblings, 1 reply; 13+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2023-12-13 11:05 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Org Mode List

[-- 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 --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange behaviour detected today
  2023-12-13 11:05   ` Pedro Andres Aranda Gutierrez
@ 2023-12-13 11:15     ` Ihor Radchenko
  2023-12-13 11:34       ` Fraga, Eric
  0 siblings, 1 reply; 13+ messages in thread
From: Ihor Radchenko @ 2023-12-13 11:15 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List

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

> 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)
> ....
>   custom-declare-face(org-beamer-tag ((t (:box (:line-width 1 :color grey40)))) "The special face for beamer tags." :group org-export-beamer)

I see.
This corresponds to

(defface org-beamer-tag '((t (:box (:line-width 1 :color "grey40"))))
  "The special face for beamer tags."
  :group 'org-export-beamer)

in the code.

This :box spec is correct, according to the manual.
So, something is broken on Emacs master :shrug:.

-- 
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>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange behaviour detected today
  2023-12-13 11:15     ` Ihor Radchenko
@ 2023-12-13 11:34       ` Fraga, Eric
  2023-12-13 13:07         ` Ihor Radchenko
  0 siblings, 1 reply; 13+ messages in thread
From: Fraga, Eric @ 2023-12-13 11:34 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Pedro Andres Aranda Gutierrez, Org Mode List

On Wednesday, 13 Dec 2023 at 11:15, Ihor Radchenko wrote:
> (defface org-beamer-tag '((t (:box (:line-width 1 :color "grey40"))))
>   "The special face for beamer tags."
>   :group 'org-export-beamer)
>
> in the code.
>
> This :box spec is correct, according to the manual.
> So, something is broken on Emacs master :shrug:.

Just a potential suggestion for the OP: maybe change the line-width
attribute to e.g. "(1 . 1)" instead of 1 as all of the faces I have
customised (using customize-face) that have :box attributes use a
similar construct for the line width argument.  Just to see if maybe the
documentation does not reflect reality in the code?

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange behaviour detected today
  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
  0 siblings, 2 replies; 13+ messages in thread
From: Ihor Radchenko @ 2023-12-13 13:07 UTC (permalink / raw)
  To: Fraga, Eric; +Cc: Pedro Andres Aranda Gutierrez, Org Mode List

"Fraga, Eric" <e.fraga@ucl.ac.uk> writes:

> Just a potential suggestion for the OP: maybe change the line-width
> attribute to e.g. "(1 . 1)" instead of 1 as all of the faces I have
> customised (using customize-face) that have :box attributes use a
> similar construct for the line width argument.  Just to see if maybe the
> documentation does not reflect reality in the code?

The documentation explicitly states that :line-width 1 is the same as
:line-width (1 . 1). I see no reason to change anything on Org side.

-- 
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>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange behaviour detected today
  2023-12-13 13:07         ` Ihor Radchenko
@ 2023-12-13 13:32           ` Pedro Andres Aranda Gutierrez
  2023-12-13 13:40           ` Fraga, Eric
  1 sibling, 0 replies; 13+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2023-12-13 13:32 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Fraga, Eric, Org Mode List

I’ll file a bug when time permits…

Best,//PA
Enviado desde mi iPhone

> El 13 dic 2023, a las 14:04, Ihor Radchenko <yantar92@posteo.net> escribió:
> 
> "Fraga, Eric" <e.fraga@ucl.ac.uk> writes:
> 
>> Just a potential suggestion for the OP: maybe change the line-width
>> attribute to e.g. "(1 . 1)" instead of 1 as all of the faces I have
>> customised (using customize-face) that have :box attributes use a
>> similar construct for the line width argument.  Just to see if maybe the
>> documentation does not reflect reality in the code?
> 
> The documentation explicitly states that :line-width 1 is the same as
> :line-width (1 . 1). I see no reason to change anything on Org side.
> 
> --
> 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>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange behaviour detected today
  2023-12-13 13:07         ` Ihor Radchenko
  2023-12-13 13:32           ` Pedro Andres Aranda Gutierrez
@ 2023-12-13 13:40           ` Fraga, Eric
  1 sibling, 0 replies; 13+ messages in thread
From: Fraga, Eric @ 2023-12-13 13:40 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Pedro Andres Aranda Gutierrez, Org Mode List

On Wednesday, 13 Dec 2023 at 13:07, Ihor Radchenko wrote:
> The documentation explicitly states that :line-width 1 is the same as
> :line-width (1 . 1). I see no reason to change anything on Org side.

I was not suggesting a change in Org for the moment, just suggesting the
OP tried to see if that helped (and would identify a bug in master).

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange behaviour detected today
  2023-12-13 10:56 Strange behaviour detected today Pedro Andres Aranda Gutierrez
  2023-12-13 11:02 ` Ihor Radchenko
@ 2023-12-13 14:57 ` William Denton
  2023-12-13 17:49   ` Pedro Andres Aranda Gutierrez
  1 sibling, 1 reply; 13+ messages in thread
From: William Denton @ 2023-12-13 14:57 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List

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

On 13 December 2023, Pedro Andres Aranda Gutierrez wrote:

> 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)
>
> both from emacs in interactive and in batch mode.

Is that perhaps related to commit dcd755dabcf9ef95d6d0534c11c668f44c6f89c2, "Fix 
validation of :box face attribute"?  It caused similar errors in solarized-theme 
(for example this bug¹).

Bill


¹ https://github.com/bbatsov/solarized-emacs/issues/447

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
CO₂: 421.99 ppm (Mauna Loa Observatory, 2023-12-12)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange behaviour detected today
  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
  0 siblings, 1 reply; 13+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2023-12-13 17:49 UTC (permalink / raw)
  To: William Denton; +Cc: Org Mode List

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

Thanks a ton, I'm looking into it :-)
/PA

On Wed, 13 Dec 2023 at 15:57, William Denton <wtd@pobox.com> wrote:

> On 13 December 2023, Pedro Andres Aranda Gutierrez wrote:
>
> > 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)
> >
> > both from emacs in interactive and in batch mode.
>
> Is that perhaps related to commit
> dcd755dabcf9ef95d6d0534c11c668f44c6f89c2, "Fix
> validation of :box face attribute"?  It caused similar errors in
> solarized-theme
> (for example this bug¹).
>
> Bill
>
>
> ¹ https://github.com/bbatsov/solarized-emacs/issues/447
>
> --
> William Denton
> https://www.miskatonic.org/
> Librarian, artist and licensed private investigator.
> Toronto, Canada
> CO₂: 421.99 ppm (Mauna Loa Observatory, 2023-12-12)



-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange behaviour detected today
  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
  0 siblings, 1 reply; 13+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2023-12-14  5:47 UTC (permalink / raw)
  To: William Denton; +Cc: Org Mode List

[-- Attachment #1: Type: text/html, Size: 2688 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange behaviour detected today
  2023-12-14  5:47     ` Pedro Andres Aranda Gutierrez
@ 2024-03-11 12:53       ` Detlev Zundel
  0 siblings, 0 replies; 13+ messages in thread
From: Detlev Zundel @ 2024-03-11 12:53 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

> Thanks a ton. I could bisect the issue and filed a bug yesterday. It
> seems to be the same commit that broke the themes.

May I ask what the outcome of all this was?  I am now seeing the same
problem with Emacs from master as of today and wonder about the best way
to solve this in the short and long term.

Thanks in advance
  Detlev

[...]

>  On Wed, 13 Dec 2023 at 15:57, William Denton <wtd@pobox.com> wrote:
>
>  On 13 December 2023, Pedro Andres Aranda Gutierrez wrote:
>
>  > 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)
>  >
>  > both from emacs in interactive and in batch mode.
>
>  Is that perhaps related to commit dcd755dabcf9ef95d6d0534c11c668f44c6f89c2, "Fix 
>  validation of :box face attribute"?  It caused similar errors in solarized-theme 
>  (for example this bug¹).
>
>  Bill



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange behaviour detected today
  2024-03-11 17:54 Pedro Andres Aranda Gutierrez
@ 2024-03-11 22:53 ` Detlev Zundel
  0 siblings, 0 replies; 13+ messages in thread
From: Detlev Zundel @ 2024-03-11 22:53 UTC (permalink / raw)
  To: emacs-orgmode

Hi Pedro Andres,

[...]

> Just for the record. The root cause for this problem is a :color definition
> with is not a string.
> So find the offending face definition and make sure the :color is a string,

Thanks for that useful tip which helped me to find the problem.  Indeed
I was still using org-mode in a local straight repository checkout
predating this fix in upstream:

  https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=65def05f6c6f7ce706a0116ad666c86eb0ecdae2
  
  lisp/ox-beamer.el: Fix face definition
  * lisp/ox-beamer.el (org-beamer-tag): Fix face definition.

Updating my local repo fixed it.

Thinking about it, I probably should stop using straight at all for
org-mode, as I seem to update Emacs more often lately than the straight
repos.  In this setup the old checkout from straight shadowed the
correct code in upstream Emacs.  Another interesting way to shoot my own
foot :/

Thanks!
  Detlev



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-03-11 22:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.