From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: Re: check if properties drawer exists before creating or manipulating? Date: Thu, 31 Oct 2013 15:36:08 +0100 Message-ID: <20131031153608.39887c23@aga-netbook> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbtM8-0002QO-Vx for emacs-orgmode@gnu.org; Thu, 31 Oct 2013 10:36:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbtM3-000700-KE for emacs-orgmode@gnu.org; Thu, 31 Oct 2013 10:36:16 -0400 Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:49727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbtM3-0006zt-DD for emacs-orgmode@gnu.org; Thu, 31 Oct 2013 10:36:11 -0400 Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id 0D7135AA51 for ; Thu, 31 Oct 2013 15:36:10 +0100 (CET) Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xz5DtX66joGv for ; Thu, 31 Oct 2013 15:36:09 +0100 (CET) Received: from aga-netbook (unknown [IPv6:2001:808:114:6:7db7:74d2:f44b:8020]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id DFD845AA4A for ; Thu, 31 Oct 2013 15:36:09 +0100 (CET) In-Reply-To: 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 Dnia 2013-10-31, o godz. 10:18:01 Matt Price napisa=C5=82(a): > Is there a simple way to check if the properties drawer exists before > creating one? > I'm trying to add a hook to org-insert-heading-hook that will create a > property drawer if one doesn't exist (see my earlier email, in which I > ask, >=20 What about narrowing to the current entry and then searching for the regex in the variable org-property-drawer-re (which see)? Hth, --=20 Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University