Hello,

Thorsten Jolitz <tjol...@gmail.com> writes:

> with the new parser, how do I parse only the headline at point?  There
> are ARGS in the parser/mapper functions that restrict parsing, but I
> suspect that still the whole buffer is parsed for the genealogy - right?
>
> With my current knowledge I would either narrow the buffer to the subtree at
> point or copy this subtree to a temp-buffer before parsing/mapping it,
> but maybe there is a better way?
>
> Would this be a valid template (a simple and fast solution)?
>
> #+begin_src emacs-lisp
>   (save-restriction
>    (org-narrow-to-subtree
>     (org-element-map (org-element-parse-buffer 'headline t) 'headline
>       (lambda () ...)
>       nil t t)))
> #+end_src

What about (org-element-at-point) ?


Regards,

-- 
Nicolas Goaziou

Reply via email to