[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: |
Nicolas Goaziou |
Subject: |
Re: [O] Use org-element to figure out if I am in a drawer. |
Date: |
Tue, 26 Nov 2013 17:32:47 +0100 |
Hello,
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?
Something like:
(let ((element (org-element-at-point)))
(while (and element
(not (memq (org-element-type element) '(drawer
property-drawer))))
(setq element (org-element-property :parent element)))
element)
which should return containing drawer or nil.
Regards,
--
Nicolas Goaziou