[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: property drawers within code blocks interfere [8.2.2 (8.2.2

From: Aaron Ecay
Subject: Re: [O] Bug: property drawers within code blocks interfere [8.2.2 (8.2.2-elpa @ /home/tod/.emacs.d/.cask/]
Date: Tue, 12 Nov 2013 16:28:56 -0500
User-agent: Notmuch/0.16+154~g96c0ce2 (http://notmuchmail.org) Emacs/ (x86_64-unknown-linux-gnu)

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
          :EMAIL: %^{Email}
          :PHONE: %^{Phone number}

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]