[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [patch] more robust footnotes
From: |
Rasmus |
Subject: |
Re: [O] [patch] more robust footnotes |
Date: |
Wed, 25 May 2016 19:51:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Nicolas Goaziou <address@hidden> writes:
> Hello,
>
> Rasmus <address@hidden> writes:
>
>> Nicolas Goaziou <address@hidden> writes:
>>>
>>> I suggest to avoid calling repeatedly
>>> `org-export-get-footnote-definition'. Also, if the footnote reference is
>>> anonymous, there is no point in calling `org-element-map'. The following
>>> is more efficient:
>>>
>>> (format "\\footnote{%s%s}"
>>> (org-trim (org-export-data def info))
>>> ;; Only insert a label if there exist another reference to def.
>>> (cond
>>> ((not label) "")
>>> ((org-element-map (plist-get info :parse-tree)
>>> 'footnote-reference
>>> (lambda (f)
>>> (and (not (eq f footnote-reference))
>>> (equal (org-element-property :label f) label)
>>> (org-latex--label def info t t)))
>>> info t))
>>> (t "")))
>>
>> Thanks.
>>
>> I have pushed the change.
>
> Thank you.
>
> However, the patch you committed doesn't short-circuit on anonymous
> footnotes, per above (the (not label) part). As a consequence, every
> anonymous footnote (as long as there is more than one) gets a label,
> AFAICT.
You are right. I missed that case. I've pushed your suggested fix.
Rasmus
--
Spil noget med Slayer!
- Re: [O] Bug: When exporting to PDF an Org file where multiple footnotes share the same definition, only the first footnote is clickable [8.3.4 (8.3.4-39-ge0acd8-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160418/)], Rasmus, 2016/05/22
- Re: [O] Bug: When exporting to PDF an Org file where multiple footnotes share the same definition, only the first footnote is clickable [8.3.4 (8.3.4-39-ge0acd8-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160418/)], Nicolas Goaziou, 2016/05/23
- [O] [patch] more robust footnotes (was: Bug: When exporting to PDF an Org file where multiple footnotes share the same definition, only the first footnote is clickable [8.3.4 (8.3.4-39-ge0acd8-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160418/)]), Rasmus, 2016/05/24
- Re: [O] [patch] more robust footnotes, Nicolas Goaziou, 2016/05/24
- Re: [O] [patch] more robust footnotes, Rasmus, 2016/05/24
- Re: [O] [patch] more robust footnotes, Nicolas Goaziou, 2016/05/24
- Re: [O] [patch] more robust footnotes, Rasmus, 2016/05/25
- Re: [O] [patch] more robust footnotes, Nicolas Goaziou, 2016/05/25
- Re: [O] [patch] more robust footnotes,
Rasmus <=