emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [bug, patch, ox] INCLUDE and footnotes


From: Nicolas Goaziou
Subject: Re: [O] [bug, patch, ox] INCLUDE and footnotes
Date: Mon, 22 Dec 2014 23:51:37 +0100

Rasmus <address@hidden> writes:

>>> * Foo
>>> [1] foo
>>>
>>> * Bar
>>> Baz[1]
>>
>> I'm not sure to understand. Would you mind elaborating?
>
> If I have #+INCLUDE: "example-above.org::*Bar" then point-min of the
> include area will be pushed forward by four since the definition of [1] is
> changed to fn:1-1 or something like that.  So min-marker should be a
> marker.  Or I'm misunderstanding something.

No, you're right. However, this raises a question: why are we modifying
definition at all? We are only interested in its new label, which we can
get without modifying buffer (i.e. if definition is within range, modify
it, otherwise, compute new label and store its definition).

Anyway, it doesn't matter much. The marker is fine, indeed.

> Since it's soon Christmas, so I could perhaps accommodate.

I ensure you I have mostly been kind all year long.

> +                 (org-with-wide-buffer
> +                  (let* ((definition (org-footnote-get-definition label))
> +                         (beginning (line-beginning-position)))

There's one potential problem here: `org-footnote-get-definition' may
return a nil value if there is no matching definition for label. Maybe
throw an error?

Also, BEGINNING should refer to (nth 1 definition) since you're not
using `org-footnote-goto-definition' and therefore, not moving point.

I think you can push once the issues above are fixed. Thank you for the
work.


Regards,



reply via email to

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