emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Greg Minshall <minshall@umich.edu>
Cc: emacs-orgmode@gnu.org, Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: life on the eading bledge
Date: Mon, 05 Apr 2021 20:51:22 -0400	[thread overview]
Message-ID: <875z10ck1h.fsf@kyleam.com> (raw)
In-Reply-To: <856927.1617641279@apollo2.minshall.org>

Greg Minshall writes:

> hi.  running c881b60593b3beeed7b8c7a2bada64157cd9940a, the following 
>
> ====
> *** this =equals= that
>
> and, so on
> ====
>
> exporting [C-e l o], gives
> : replace-regexp-in-string: Wrong type argument: arrayp, nil

Thanks for reporting.  The failure was introduced by bcfe6f985
(ox-latex: convert verbatim text in headings to texttt, 2021-04-04).
The below change seems to fix the issue, though Nicolas may be able to
suggest a more appropriate change.

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 932f38530..ac24f1f74 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1961,8 +1961,16 @@ (defun org-latex-headline (headline contents info)
                ;; commands (like \section, etc.), and this causes compilation to fail.
                ;; So, within headings it's a good idea to replace any instances of \verb
                ;; with \texttt.
-               (code . (lambda (_ c _) (org-latex--protect-texttt c)))
-               (verbatim . (lambda (_ c _) (org-latex--protect-texttt c))))))
+               (code . (lambda (o c i)
+                         (org-latex--protect-texttt
+                          (or c
+                              (org-export-data
+                               (org-element-property :value o) i)))))
+               (verbatim . (lambda (o c i)
+                             (org-latex--protect-texttt
+                              (or c
+                                  (org-export-data
+                                   (org-element-property :value o) i))))))))
 	   (text
 	    (org-export-data-with-backend
 	     (org-element-property :title headline) section-back-end info))



  reply	other threads:[~2021-04-06  0:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 16:47 life on the eading bledge Greg Minshall
2021-04-06  0:51 ` Kyle Meyer [this message]
2021-04-06  2:25   ` Greg Minshall
2021-04-06 11:52   ` Nicolas Goaziou
2021-04-06 12:23     ` Greg Minshall

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=875z10ck1h.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    --cc=minshall@umich.edu \
    /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).