From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Use org-element to figure out if I am in a drawer. Date: Tue, 26 Nov 2013 10:41:12 -0500 Message-ID: <87eh639nmv.fsf@alphaville.bos.redhat.com> 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]:57441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlKle-0001bK-CH for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 10:41:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlKlX-00057D-2K for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 10:41:38 -0500 Received: from plane.gmane.org ([80.91.229.3]:50741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlKlW-000578-RX for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 10:41:30 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VlKlS-00068p-P8 for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 16:41:26 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Nov 2013 16:41:26 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Nov 2013 16:41:26 +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: > what is the magic incantation to use org-element to figure out if > point is currently inside a drawer? > (eq 'drawer (org-element-type (org-element-at-point))) is my (untested) guess, but I don't think you can be at an arbitrary place inside: you'll need to be on the :DRAWER: line or on the :END: line, otherwise you'll get the type of the drawer contents. Nick