Re: Strange behaviour detected today

2024-03-11 Thread Detlev Zundel
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




Re: Re: Strange behaviour detected today

2024-03-11 Thread Pedro Andres Aranda Gutierrez
Hi,

> Message: 15
> Date: Mon, 11 Mar 2024 13:53:38 +0100
> From: Detlev Zundel 
> To: emacs-orgmode@gnu.org
> Subject: Re: Strange behaviour detected today
> Message-ID: <87bk7l53ql@member.fsf.org>
> Content-Type: text/plain; charset=utf-8
>
> 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  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

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,

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


Re: Strange behaviour detected today

2024-03-11 Thread Detlev Zundel
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  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




Re: Strange behaviour detected today

2023-12-13 Thread Pedro Andres Aranda Gutierrez
HiThanks a ton. I could bisect the issue and filed a bug yesterday. It seems to be the same commit that broke the themes./PAEnviado desde mi iPhoneEl 13 dic 2023, a las 18:49, Pedro Andres Aranda Gutierrez  escribió:Thanks a ton, I'm looking into it :-)/PAOn Wed, 13 Dec 2023 at 15:57, William Denton  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 werdenGeorg KreislerHeadaches 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


Re: Strange behaviour detected today

2023-12-13 Thread Pedro Andres Aranda Gutierrez
Thanks a ton, I'm looking into it :-)
/PA

On Wed, 13 Dec 2023 at 15:57, William Denton  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


Re: Strange behaviour detected today

2023-12-13 Thread William Denton

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)

Re: Strange behaviour detected today

2023-12-13 Thread Fraga, Eric
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


Re: Strange behaviour detected today

2023-12-13 Thread Pedro Andres Aranda Gutierrez
I’ll file a bug when time permits…

Best,//PA
Enviado desde mi iPhone

> El 13 dic 2023, a las 14:04, Ihor Radchenko  escribió:
> 
> "Fraga, Eric"  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 .
> Support Org development at ,
> or support my work at 



Re: Strange behaviour detected today

2023-12-13 Thread Ihor Radchenko
"Fraga, Eric"  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 .
Support Org development at ,
or support my work at 



Re: Strange behaviour detected today

2023-12-13 Thread Fraga, Eric
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


Re: Strange behaviour detected today

2023-12-13 Thread Ihor Radchenko
Pedro Andres Aranda Gutierrez  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 .
Support Org development at ,
or support my work at 



Re: Strange behaviour detected today

2023-12-13 Thread Pedro Andres Aranda Gutierrez
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) #))
  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) #)
  set-face-attribute(org-beamer-tag # :box 
(:line-width 1 :color grey40))
  apply(set-face-attribute org-beamer-tag # (:box 
(:line-width 1 :color grey40)))
  face-spec-set-2(org-beamer-tag # (:box (:line-width 
1 :color grey40)))
  face-spec-recalc(org-beamer-tag #)
  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  escribió:
> 
> Pedro Andres Aranda Gutierrez  writes:
> 
>> I've recompiled emacs master today and when I try to export an org
>> presentation to latex and I get the following error:

Re: Strange behaviour detected today

2023-12-13 Thread Ihor Radchenko
Pedro Andres Aranda Gutierrez  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 .
Support Org development at ,
or support my work at 



Strange behaviour detected today

2023-12-13 Thread Pedro Andres Aranda Gutierrez
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