From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Use org-element to figure out if I am in a drawer. Date: Tue, 26 Nov 2013 16:49:14 +0100 Message-ID: <87vbzfrwn9.fsf@pank.iue.private> References: <8A4B2A62-55B2-4326-A6CB-C7C62528AA19@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlKtO-0008Gu-Hh for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 10:49:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlKtF-0007hT-G6 for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 10:49:38 -0500 Received: from plane.gmane.org ([80.91.229.3]:33112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlKtF-0007hN-8a for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 10:49:29 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VlKtE-0001Zp-4T for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 16:49:28 +0100 Received: from ip-pool-133.iue.it ([192.167.90.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Nov 2013 16:49:28 +0100 Received: from rasmus by ip-pool-133.iue.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Nov 2013 16:49:28 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Carsten Dominik 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