emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] doc patch: move footnote in external links


From: Nicolas Goaziou
Subject: Re: [O] doc patch: move footnote in external links
Date: Mon, 12 Jan 2015 23:56:26 +0100

Alan Schmitt <address@hidden> writes:

> Should we assume the cookie is at the end of the headline or not?

The cookie can be anywhere within the headline text.

> I'd gladly do this, but to use the `org-element-map' function it seem
> that I need a parse tree. How can I get it? Or is it possible to use
> directly `org-element-map' on a buffer?

You don't need to use `org-element-map'[fn:1]. However, you cannot just use
`re-search-forward' either. You probably need to map over entries (e.g.,
with `org-map-entries'), apply some filter to current headline, and
compare it with link's path. This is slower than the current
implementation.

Another option would be to ignore only contents of statistics cookies,
not the whole cookie. This way we still can turn path into a proper
regexp.

WDYT?


Regards,

[fn:1] Btw, you get a parse tree with `org-element-parse-buffer'.



reply via email to

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