emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Use org-element to figure out if I am in a drawer.


From: Rasmus
Subject: Re: [O] Use org-element to figure out if I am in a drawer.
Date: Tue, 26 Nov 2013 16:49:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Carsten Dominik <address@hidden> writes:

> Hmmm,
>
> what is the magic incantation to use org-element to figure out if
> point is currently inside a drawer?

What about org-element-at-point?

E.g. like here:

* This is a headline
  Still outside the drawer
   :DRAWERNAME:
   This is inside the drawer.
   :END:
   After the drawer.
   

   =org-element-at-point= within the drawer:
(paragraph
 (:begin 65 :end 95 :contents-begin 65 :contents-end 95 :post-blank 0 
:post-affiliated 65 :parent
         (drawer
         (:begin 49 :end 104 :drawer-name "DRAWERNAME" :contents-begin 65 
:contents-end 95 :post-blank 0 :post-affiliated 49 :parent nil))))


-- 
Together we'll stand, divided we'll fall




reply via email to

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