[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Buffer positions from `org-element-map'?
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Buffer positions from `org-element-map'? |
Date: |
Wed, 28 Jan 2015 08:32:47 +0100 |
Hello,
"Charles C. Berry" <address@hidden> writes:
> What I would like is to have the same values of :begin as would be
> obtained by placing the cursor on each inline src block and evaluating
> (org-element-context). As is evident below, :begin is sometimes a
> relative position.
This was fixed recently.
> Suggestions on how to get the buffer position or some other way to do
> in situ buffer modifications from `org-element-map' without
> interpreting a complete parse tree (which I expect requires more
> computation that doing selected `delete then insert' operations) are
> welcome.
I think the most efficient is to do a fast search, e.g.,
(search-forward "src_" nil t)
then, with `org-element-context', double-check type of object found and
collect :begin property.
Regards,
--
Nicolas Goaziou