[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Help on org-export-filter-link-functions
From: |
John Kitchin |
Subject: |
Re: [O] Help on org-export-filter-link-functions |
Date: |
Sun, 05 Oct 2014 09:11:12 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (darwin) |
Rasmus <address@hidden> writes:
hmmm... the sometimes makes me nervous. I found even for links, this
only works sometimes. That doesn't seem reliable to me.
I think extending existing backends
(e.g. http://orgmode.org/manual/Advanced-configuration.html) is probably
more reliable for getting element properties, and approximately the same
amount of work.
I guess it just depends on how significantly you are modifying the
export, and what information you need to modify it. Filters are great
for simple wrapping and regexp based modifications. A derived backend is
better if you need reliable element properties, and a different format
than the default export.
> John Kitchin <address@hidden> writes:
>
>> I too am wondering if there is a defined way to get to the element
>> properties within a filter function.
>
> qNo. But sometimes you can recover it from the text-properties, if it
> is not a verb, (~·~, =·=). Her's an example:
>
> (defun rasmus/get-org-headline-string-element (headline backend info)
> "Return the org element representation of a headline."
> (let ((prop-point (next-property-change 0 headline)))
> (and prop-point (plist-get (text-properties-at prop-point headline)
> :parent))))
--
-----------------------------------
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu