Pedro Andres Aranda Gutierrez <paag...@gmail.com> writes:

> Thanks for spotting the alt-title handling ;-) Apply this on top of my last
> patch.

Thanks!

> -          (let ((need-alternative (string-match "\\`\\\\\\(.+?\\){" 
> section-fmt))
> +          (let ((need-alternative (not (null (string-match 
> "\\`\\\\\\(.+?\\){" section-fmt))))

May you please explain this change?

> -                      ;; legacy behavior (รก la LaTeX)
> +                      ;; Treat the ToC as it has been originally

Maybe "Ignore unnumbered headings in ToC - as in LaTeX"

>              ;; In all cases
>              ;; Get rid of the footnotes in opt-title
> -            (unless (equal full-text-no-footnote full-text)
> -              (setq opt-title full-text-no-footnote))
> +            (when (and (not (string= full-text-no-footnote full-text)) ;; 
> when we have footnotess
> +                       (string= full-text-no-footnote opt-title))      ;; 
> And we do not impose an alternative title
> +                (setq opt-title full-text-no-footnote))

So, what happens if opt-title is not set at all and the heading contains
a footnote? (string= full-text-no-footnote nil) will err.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to