[ I am re-adding Org mailing list to CC to keep the discussion public ]

>>> -            (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.
>
> Can that happen? I have been tracing this part of the code and have found 
> opt-title to always be set to something.
> Let me check more thoroughly…

It actually cannot. opt-title is set via `org-export-get-alt-title',
which always returns something. So, I have no problem with the
logic. Although the variable name now appears confusing to me, as a
reader of the code. Not a big deal.

So, you can ignore this comment of mine.

-- 
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