emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: life on the eading bledge


From: Kyle Meyer
Subject: Re: life on the eading bledge
Date: Mon, 05 Apr 2021 20:51:22 -0400

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 via email to

[Prev in Thread] Current Thread [Next in Thread]