From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: Help on org-export-filter-link-functions
Date: Sun, 05 Oct 2014 09:11:12 -0400 [thread overview]
Message-ID: <m2mw9a64r3.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <87a95be2t3.fsf@gmx.us> (rasmus@gmx.us's message of "Sun, 05 Oct 2014 03:13:44 +0200")
Rasmus <rasmus@gmx.us> 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 <jkitchin@andrew.cmu.edu> 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
next prev parent reply other threads:[~2014-10-05 13:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-03 11:19 Help on org-export-filter-link-functions Daimrod
2014-10-04 16:40 ` John Kitchin
2014-10-05 1:13 ` Rasmus
2014-10-05 13:11 ` John Kitchin [this message]
2014-10-05 22:24 ` Rasmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2mw9a64r3.fsf@andrew.cmu.edu \
--to=jkitchin@andrew.cmu.edu \
--cc=emacs-orgmode@gnu.org \
--cc=rasmus@gmx.us \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).