Re: oeg-add-note and double backslash ?

2023-12-13 Thread David Masterson
Ihor Radchenko  writes:

> David Masterson  writes:
>
>> Ihor Radchenko  writes:
>>
>>> Patches welcome.
>>
>> * What is my status as far as submitting patches to documentation
>>   (including docstrings)?
>
> I can see two commits of yours in Org repo. Beyond the 15LOC limit.
> So, we cannot accept more TINYCHANGE patches and need FSF copyright
> assignment - https://orgmode.org/worg/org-contribute.html#copyright

The form for copyright assignment asks what files have you changed so
far. I assumed the form would be universal for any past and future
changes you make to the program (Emacs).  Do people really need to fill
that part out? Do I need the info from the 2 commits?

>> * Is there a write-up on the process of "patching" I can follow?
>
> Yes, of course. See https://orgmode.org/worg/org-contribute.html#first-patch

Thanks
-- 
David Masterson



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: Citations: strip braces {} in titles in bibliographies in basic style?

2023-12-13 Thread William Denton

On 13 December 2023, Ihor Radchenko wrote:


This is a more difficult problem actually, because Bibtex allows more
than just curly braces - see https://www.bibtex.org/SpecialSymbols/ and
https://www.bibtex.org/Format/.

I tried to ask for bibtex.el to handle the accurate parsing in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57712, but it looks like
it is not of interest upstream. So, we may have to implement a Bibtex
entry parser according to the spec.


Wow, I didn't see any of that when I was looking at this.  I should have guessed 
there was more under the surface---there always is with LaTeX.  Thanks for the 
history.


"If this doesn't fit your needs for org mode, I suggest you develop a LaTeX 
parser that can process LaTeX code according to your needs."  Ah well.


Bill

--
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: How to use mpirun with C or C++ Org-babel?

2023-12-13 Thread Leo Butler
On Fri, Dec 08 2023, Ihor Radchenko  wrote:

> Leo Butler  writes:
>
>> I submitted an imperfect patch some time ago [1] that targeted your use
>> case: allow ob-C.el to create a named binary.

> Note that I did not oppose the above behaviour when the result of
> evaluation is just compiling to :file. The problem was with compiling to
> a :file and _also_ executing it.
>
> If you want to propose a patch that will allow compile-only, I see no
> problem at all.

Ok, thank you for the clarification. I had gone on holidays after you
put up the poll and lost track.

Please see the attached patch.

Leo

From 7d8e406bc4a92e2e2eab772b2671dcd72ca8c202 Mon Sep 17 00:00:00 2001
From: Leo Butler 
Date: Tue, 12 Dec 2023 12:32:41 -0600
Subject: [PATCH] lisp/ob-C.el: add :compile-only header to compile to a named
 target

* lisp/ob-C.el (org-babel-C-execute): The new header argument,
`:compile-only', causes source and compiled binary files to be named
using the `:file' header argument.  When `:compile-only' is set,
execution of source block ends at compilation.  The naming of source
and binary filenames is factored out to `org-babel-C-src/bin-file'.
* lisp/ob-C.el (org-babel-C-src/bin-file): A new function that factors
out the setting of source and binary filenames.  It also signals an
error if `:compile-only' is set, but `:file' is not.
* testing/examples/ob-C-test.org: Add three example that exercise the
`:compile-only' header argument, including one that causes an error.
* testing/lisp/test-ob-C.el: Add three tests of the `:compile-only'
header argument.  New tests: ob-C/set-src+bin-file-name-{1,2,3}.

Refs: https://list.orgmode.org/87fs81egk5@t14.reltub.ca/
https://list.orgmode.org/87msukbadu.fsf@localhost/
---
 lisp/ob-C.el   | 83 --
 testing/examples/ob-C-test.org | 26 +++
 testing/lisp/test-ob-C.el  | 32 +
 3 files changed, 108 insertions(+), 33 deletions(-)

diff --git a/lisp/ob-C.el b/lisp/ob-C.el
index 0278fc02a..dd772dc97 100644
--- a/lisp/ob-C.el
+++ b/lisp/ob-C.el
@@ -53,7 +53,8 @@
 (main. :any)
 (flags   . :any)
 (cmdline . :any)
-(libs. :any))
+(libs. :any)
+(compile-only . (nil no t yes)))
   "C/C++-specific header arguments.")
 
 (defconst org-babel-header-args:C++
@@ -128,17 +129,32 @@ This function is called by `org-babel-execute-src-block'."
   "Expand C BODY according to its header arguments PARAMS."
   (let ((org-babel-c-variant 'c)) (org-babel-C-expand-C body params)))
 
+(defun org-babel-C-src/bin-file (params src? compile-only?)
+  "Return the src or bin filename to `org-babel-C-execute'.
+
+If `SRC?' is T, a file extension is added to the filename.  By
+default, the filename is created by `org-babel-temp-file'. If
+`COMPILE-ONLY?' is T, the filename is taken from the `:file'
+field in `PARAMS'; if that is NIL, an error occurs."
+  (let ((f (cdr (assq :file params
+(when (and compile-only? (null f))
+  (error "Error: When COMPILE-ONLY is T or YES, output FILE needs to be set"))
+(let* ((file (cond (compile-only? f) (src? "C-src-") (t "C-bin-")))
+   (ext (if src? (pcase org-babel-c-variant
+	   (`c ".c") (`cpp ".cpp") (`d ".d"))
+  org-babel-exeext)))
+  (org-babel-process-file-name
+   (if compile-only? (concat file ext)
+ (org-babel-temp-file file ext))
+
 (defun org-babel-C-execute (body params)
   "Execute C/C++/D BODY according to its header arguments PARAMS.
 This function should only be called by `org-babel-execute:C' or
 `org-babel-execute:C++' or `org-babel-execute:D'."
-  (let* ((tmp-src-file (org-babel-temp-file
-			"C-src-"
-			(pcase org-babel-c-variant
-			  (`c ".c") (`cpp ".cpp") (`d ".d"
-	 (tmp-bin-file			;not used for D
-	  (org-babel-process-file-name
-	   (org-babel-temp-file "C-bin-" org-babel-exeext)))
+  (let* ((compile-only? (let ((c (cdr (assq :compile-only params
+  (or (string= c "t") (string= c "yes"
+ (tmp-src-file (org-babel-C-src/bin-file params t compile-only?))
+	 (tmp-bin-file (org-babel-C-src/bin-file params nil compile-only?)) ;not used for D
 	 (cmdline (cdr (assq :cmdline params)))
 	 (cmdline (if cmdline (concat " " cmdline) ""))
 	 (flags (cdr (assq :flags params)))
@@ -170,31 +186,32 @@ This function should only be called by `org-babel-execute:C' or
 		libs)
 	""))
   (`d nil)) ;; no separate compilation for D
-(let ((results
-	   (org-babel-eval
-	(pcase org-babel-c-variant
-	  ((or `c `cpp)
-	   (concat tmp-bin-file cmdline))
-	  (`d
-	   (format "%s %s %s %s"
-		   org-babel-D-compiler
-		   flags
-		   (org-babel-process-file-name tmp-src-file)
-		   cmdline)))
-	"")))
-  (when results
-	(setq results (org-remove-indentation results))
-	(org-babel-reassemble-table
-	 (org-babel-result-cond (cdr (assq :result-params 

[PATCH] ol-man.el: Enable completion

2023-12-13 Thread Max Nikulin

On 09/12/2023 18:32, Ihor Radchenko wrote:

Considering that the discussion on emacs-devel concluded that woman is
obsolete, that no interest has been shown in introducing a stable
completion API, and that the "man" part of the above code is reasonably
simple, I think that the above two functions would be an OK addition to
ol-man (with woman part of `org-man-complete' removed).

Max, may you convert this into a patch?


See attachmentsFrom d52265f6242b21561d5f96ae94afb1da37af1ce3 Mon Sep 17 00:00:00 2001
From: Max Nikulin 
Date: Mon, 9 Oct 2023 18:47:04 +0700
Subject: [PATCH 1/2] ol-man.el: Enable completion

* lisp/ol-man.el (org-man-complete): New function implementing
completion for man pages using `Man-completion-table'.  Set this
function as the `:complete' property of "man" links.

Ihor Radchenko. Re: Completion of links to man pages.
Sat, 09 Dec 2023 11:32:39 +.

---
 etc/ORG-NEWS   |  6 ++
 lisp/ol-man.el | 12 
 2 files changed, 18 insertions(+)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 9858df045..6c81221c1 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -729,6 +729,12 @@ respected.
 Images dropped also respect the value of ~org-yank-image-save-method~
 when ~org-yank-dnd-method~ is =attach=.
 
+*** Add completion for links to man pages
+
+Completion is enabled for links to man pages added using ~org-insert-link~:
+=C-c C-l man RET emacscl TAB= to get =emacsclient=.  Of course, the ~ol-man~
+library should be loaded first.
+
 ** New functions and changes in function arguments
 *** ~org-fold-hide-drawer-all~ is now interactive
 
diff --git a/lisp/ol-man.el b/lisp/ol-man.el
index b0701c689..f5533c5a5 100644
--- a/lisp/ol-man.el
+++ b/lisp/ol-man.el
@@ -34,6 +34,7 @@ (org-assert-version)
 (require 'ol)
 
 (org-link-set-parameters "man"
+ :complete #'org-man-complete
 			 :follow #'org-man-open
 			 :export #'org-man-export
 			 :store #'org-man-store-link)
@@ -99,6 +100,17 @@ (defun org-man-export (link description backend)
  ((eq backend 'md) (format "[%s](%s)" desc path))
  (t path
 
+(defun org-man-complete ( _arg)
+  "Complete man pages for `org-insert-link'."
+  (require 'man)
+  (concat
+   "man:"
+   (let ((completion-ignore-case t) ; See `man' comments.
+ (Man-completion-cache)) ; See `man' implementation.
+ (completing-read
+  "Manual entry: "
+  'Man-completion-table
+
 (provide 'ol-man)
 
 ;;; ol-man.el ends here
-- 
2.39.2

From d7ea42febd19825622c9779e197c37c4d9fd0435 Mon Sep 17 00:00:00 2001
From: Max Nikulin 
Date: Wed, 13 Dec 2023 22:03:36 +0700
Subject: [PATCH 2/2] ol-man.el: Mark WoMan link handler as obsolete

lisp/ol-man.el (org-man-command): Add label suggesting against
the WoMan package as a viewer for man pages.  It has enough bugs.

Eli Zaretskii to emacs-orgmode. Re: Completion of links to man pages.
Thu, 05 Oct 2023 19:33:26 +0300.

---
 lisp/ol-man.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ol-man.el b/lisp/ol-man.el
index f5533c5a5..633280942 100644
--- a/lisp/ol-man.el
+++ b/lisp/ol-man.el
@@ -42,7 +42,7 @@ (org-link-set-parameters "man"
 (defcustom org-man-command 'man
   "The Emacs command to be used to display a man page."
   :group 'org-link
-  :type '(choice (const man) (const woman)))
+  :type '(choice (const man) (const :tag "WoMan (obsolete)" woman)))
 
 (defun org-man-open (path _)
   "Visit the manpage on PATH.
-- 
2.39.2



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: Links & images with different attributes in the same paragraph

2023-12-13 Thread Max Nikulin

On 12/12/2023 20:18, Ihor Radchenko wrote:

Max Nikulin writes:


It is limitation of top-down parser that object of the same time can not
be nested, so I am unsure if special blocks would be solution in all cases.


Nested objects of the same type are not really a limitation of top-down
parser. It is the syntax of objects that might but does not have to be.
We might come up with a syntax that allow nesting.


I would be glad to learn that I am wrong. The current parser picks first 
terminating token ignoring other opening tokens in between. The only way 
I see is unique identifiers for opening and closing tokens to allow 
match them in pairs. It would be tedious to type and to copy fragments 
from similar text.


A similar problem is importing and exporting fragments of mail messages 
having multilevel quotes. #+begin_quote is not enough, it is necessary 
to use something else for inner citations, e.g. #+begin_quote1.


Moreover I would prefer to have links as links even when they need some 
special treatment.





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


Re: Citations: strip braces {} in titles in bibliographies in basic style?

2023-12-13 Thread Ihor Radchenko
William Denton  writes:

> Let's say we have a file Basic.bib, like so, with one or two pairs of braces 
> around words that need special case preservation:
>
> @book{friends,
>title = {{LaTeX} and Friends},
> ...
> Either one or two braces works and could well be used.  The Zotero extension 
> Better Bibtex has a FAQ explaining why it uses two by default: "because the 
> Bib(La)TeX case protection rules are incredibly convoluted."¹
> ...
> van Dongen, M.R.C. (2012). /{{LaTeX}} and Friends/, Springer.
>
> The braces are there.  The're also visible in the HTML and ODT exports.  In 
> LaTeX, in this example, they're exported but ultimately invisible because of 
> how 
> LaTeX handles "\textit{Lisp and {C}}".
>
> Should they be stripped?  I suggest they should.

This is a more difficult problem actually, because Bibtex allows more
than just curly braces - see https://www.bibtex.org/SpecialSymbols/ and
https://www.bibtex.org/Format/.

I tried to ask for bibtex.el to handle the accurate parsing in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57712, but it looks like
it is not of interest upstream. So, we may have to implement a Bibtex
entry parser according to the spec.

Patches welcome!

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Faces for org blocks that are not "src"

2023-12-13 Thread Ihor Radchenko
Maske  writes:

> Is it possible to change the face of org blocks that don't start by "src"?
>
>
> For example:
>   '(org-src-block-faces '(("ai" variable-pitch)))
>
>
> I think it should affect to:
>
> #+begin_ai blocks, but it doesn't seem to work for me.

`org-src-block-faces' only affects src blocks, not special blocks.
Org mode currently does not support custom faces for special blocks.
All you can do is setting the fontification manually, via
`font-lock-keywords', as you could in an arbitrary Emacs buffer.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: oeg-add-note and double backslash ?

2023-12-13 Thread Ihor Radchenko
David Masterson  writes:

> Ihor Radchenko  writes:
>
>> Patches welcome.
>
> * What is my status as far as submitting patches to documentation
>   (including docstrings)?

I can see two commits of yours in Org repo. Beyond the 15LOC limit.
So, we cannot accept more TINYCHANGE patches and need FSF copyright
assignment - https://orgmode.org/worg/org-contribute.html#copyright

> * Is there a write-up on the process of "patching" I can follow?

Yes, of course. See https://orgmode.org/worg/org-contribute.html#first-patch

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at