From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: =?UTF-8?B?UmU6IFtSRkNdIFtQQVRDSF0gb3JnLmVsOiBmaXgg4oCYb3JnLWJ1?= =?UTF-8?B?ZmZlci1wcm9wZXJ0eS1rZXlz4oCZ?= Date: Thu, 28 Aug 2014 11:48:55 +0200 Message-ID: <87ha0xeygo.fsf@nicolasgoaziou.fr> References: <1409103341-17457-1-git-send-email-aaronecay@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMwJZ-0006HL-W7 for emacs-orgmode@gnu.org; Thu, 28 Aug 2014 05:48:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMwJP-0002Qw-Mu for emacs-orgmode@gnu.org; Thu, 28 Aug 2014 05:48:21 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:34745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMwJP-0002QZ-H2 for emacs-orgmode@gnu.org; Thu, 28 Aug 2014 05:48:11 -0400 In-Reply-To: <1409103341-17457-1-git-send-email-aaronecay@gmail.com> (Aaron Ecay's message of "Tue, 26 Aug 2014 21:35:41 -0400") 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: Aaron Ecay Cc: emacs-orgmode@gnu.org Hello, Aaron Ecay writes: > + (unless (eq (org-element-type (org-element-at-point)) 'property-drawer) > + (throw 'cont nil)) > (setq range (or (org-get-property-block) > (if (y-or-n-p > (format "Malformed drawer at %d, repair?" (point))) This will not work as you short-circuit the following part of the test (i.e., since you only get `property-drawer' type on a well-formed drawer, you get no change to repair malformed ones). Also, if you store `org-element-at-point', you don't need anymore to call `org-get-propert-block'. Nevertheless, I think we should take a radical different approach, as discussed recently with Bastien, which is to enforce property drawers to start on the line right after the headline and maybe the planning info, if any. As a consequence, the code for this function will be different anyway. IOW, I wouldn't bother too much. Regards, -- Nicolas Goaziou