emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tara Lorenz <tara@terralonza.de>
To: emacs-orgmode@gnu.org
Subject: [PATCH] ox-latex.el: fix interpretation of org-latex-pdf-process
Date: Fri, 15 Jan 2021 22:41:21 +0100	[thread overview]
Message-ID: <87h7nh3mke.fsf@terralonza.de> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 469 bytes --]

Hi all,

it seems that the documentation and code for `org-latex-pdf-process' are
out of sync: Where the documentation mentions "%bib" the code expects
"%bibtex".  At least, that's how i understand it.

I resolved that confusing situation by making "%bib" and "%bibtex"
equally accepted, without touching the documentation.  Thus, old
configurations work again ("%bib") as well as workarounds (using
"%bibtex") which might have gotten employed somewhere.

Cheers, Tara

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-ox-latex.el-fix-interpretation-of-org-latex-pdf-proc.patch --]
[-- Type: text/x-patch, Size: 1492 bytes --]

From 0550f85f733bf81af7d365e81bbd7c1f22e98209 Mon Sep 17 00:00:00 2001
From: Tara Lorenz <tara@terralonza.de>
Date: Fri, 15 Jan 2021 16:47:39 +0100
Subject: [PATCH] ox-latex.el: fix interpretation of org-latex-pdf-process

* ox-latex.el (org-latex-export-to-pdf):  The documentation for
`org-latex-pdf-process' states that "%bib" will be expanded into the
current binding of `org-latex-bibtex-compiler'.  However, the
`org-latex-export-to-pdf', where the expansion takes place, expects
"%bibtex" instead.  This fix will accept "%bib" as well as "%bibtex"
as markers for `org-latex-bib-compiler'.
---
 lisp/ox-latex.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index fb9fc3cd6..3b7e67844 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -3666,12 +3666,12 @@ produced."
 		     (match-string 0)))
 	      "pdflatex"))
 	 (process (if (functionp org-latex-pdf-process) org-latex-pdf-process
-		    ;; Replace "%latex" and "%bibtex" with,
+		    ;; Replace "%latex", "%bib" and "%bibtex" with,
 		    ;; respectively, "%L" and "%B" so as to adhere to
 		    ;; `format-spec' specifications.
 		    (mapcar (lambda (command)
 			      (replace-regexp-in-string
-			       "%\\(?:bib\\|la\\)tex\\>"
+                               "%\\(?:\\(?:bib\\|la\\)tex\\|bib\\)\\>"
 			       (lambda (m) (upcase (substring m 0 2)))
 			       command))
 			    org-latex-pdf-process)))
-- 
2.30.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]

             reply	other threads:[~2021-01-16  1:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 21:41 Tara Lorenz [this message]
2021-01-25  3:31 ` [PATCH] ox-latex.el: fix interpretation of org-latex-pdf-process Kyle Meyer

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=87h7nh3mke.fsf@terralonza.de \
    --to=tara@terralonza.de \
    --cc=emacs-orgmode@gnu.org \
    /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).