From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: Bug: property drawers within code blocks interfere [8.2.2 (8.2.2-elpa @ /home/tod/.emacs.d/.cask/24.3.50.1/elpa/org-20131108/)] Date: Tue, 12 Nov 2013 16:28:56 -0500 Message-ID: <8761rxb97r.fsf@gmail.com> References: <87txfjy3vg.fsf@gmail.com> <874n7iho2t.fsf@bzg.ath.cx> <87siv24lzg.fsf@gmail.com> <87mwladulx.fsf@bzg.ath.cx> <87y54t28y2.fsf@gmail.com> <87vbzx6g31.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgLW9-0005Bh-0A for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 16:29:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgLW8-0000Fn-69 for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 16:29:00 -0500 In-Reply-To: <87vbzx6g31.fsf@bzg.ath.cx> 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: Bastien , Tod Middlebrook Cc: emacs-orgmode@gnu.org Hi Tod and Bastien, The property drawer after the code block is a red herring: the following file (with no real property drawer at all) misbehaves on property setting and getting functions, with the fake properties in the code block behaving as though they pertained to the headline (as can be confirmed by M-: (org-entry-get nil "EMAIL")): * stuff for bug report #+BEGIN_SRC emacs-lisp (setq i-am-a-string " :PROPERTIES: :EMAIL: %^{Email} :PHONE: %^{Phone number} :END: ") #+END_SRC I think this problem of unselective regex searches will also affect uses of e.g. org-scheduled-time-regexp This seems like an excellent use case for the parser: basically a bunch of uses of org-*-regexp and org-re-property need to be augmented with a check like: (not (memq (org-element-type (org-element-at-point)) '(src-block example-block ...))) A better alternative might be to use the parser to find the property drawer in the first place (instead of a regex). Either way, it seems like the best strategy might be to fix all uses of these problem variables at once, which is a big undertaking. -- Aaron Ecay