emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tod Middlebrook <whatifitsnot@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
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: Mon, 11 Nov 2013 16:22:43 -0600	[thread overview]
Message-ID: <87siv24lzg.fsf@gmail.com> (raw)
In-Reply-To: <874n7iho2t.fsf@bzg.ath.cx>

Bastien,
When there is no property drawer before the code block, C-c C-x p
affects the code block and either doesn't create a property drawer or it
leaves the 'real' property drawer unaffected.

An example for the second case, where org-set-property matches the code
block, despite an existing property drawer that happens to be below
it. The wrong "NAME" is matched, and "DEPENDS" isn't matched at
all. This could throw off for example org-dotemacs, where it would
tangle code blocks in the wrong order without the DEPENDS matching.
* stuff for bug report
#+BEGIN_SRC emacs-lisp
  
  (setq org-capture-templates
        (quote
         (
          ("c" "Contacts" entry (file+headline "~/my-stuff/file.org" "Contacts")
           "* %^{Name: }
          :PROPERTIES: 
          :EMAIL: %^{Email}
          :PHONE: %^{Phone number}
          :NAME: %^{Full Name}
          :END:
          %?
          "))))
#+END_SRC
:PROPERTIES:
:NAME: org-capture-templates
:DEPENDS: org
:END: 

Thanks,
Tod

bzg@gnu.org writes:

> Hi Tod,
>
> Tod Middlebrook <todmiddlebrook@gmail.com> writes:
>
>> The bug below prevents me from easily using dependencies in org-dotemacs.
>>
>> To reproduce,
>> start with this entry:
>>
>> *** stuff for bug report
>> #+BEGIN_SRC emacs-lisp
>>   (setq org-capture-templates
>>         (quote
>>          (
>>           ("c" "Contacts" entry (file+headline "~/my-stuff/file.org" "Contacts")
>>            "* %^{Name: }
>>           :PROPERTIES: 
>>           :EMAIL: %^{Email}
>>           :PHONE: %^{Phone number}
>>           :END:
>>           %?
>>           "))))
>> #+END_SRC
>>
>> Then do C-c C-x p EMAIL [RET] TestValue, and get the same block, with
>> the properties drawer folded. When expanded, there is:
>>
>> *** stuff for bug report
>> #+BEGIN_SRC emacs-lisp
>>     (setq org-capture-templates
>>           (quote
>>            (
>>             ("c" "Contacts" entry (file+headline "~/my-stuff/file.org" "Contacts")
>>              "* %^{Name: }
>>             :PROPERTIES: 
>>   :EMAIL:    TestValue
>>             :PHONE: %^{Phone number}
>>             :END:
>>             %?
>>             "))))
>> #+END_SRC
>
> I'm not sure to understand what the problem is exactly: if the problem
> is that `C-x C-c p' works in the context of source code blocks, we can
> easily fix it.  If the problems is that such properties are matched in
> contexts where they should not, we need more information about when
> you observe the wrong behavior, i.e. in what context do you see the
> properties taken into account while you expect them to be ignored?
>
> Thanks in advance for further details,

  reply	other threads:[~2013-11-11 22:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11  4:11 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/)] Tod Middlebrook
2013-11-11 16:59 ` Bastien
2013-11-11 22:22   ` Tod Middlebrook [this message]
2013-11-12  6:03     ` Bastien
2013-11-12 10:47       ` Tod Middlebrook
2013-11-12 10:59         ` Bastien
2013-11-12 21:28           ` Aaron Ecay
2013-11-12 21:44             ` Bastien
2013-11-13  8:41               ` Nicolas Goaziou
2013-11-13  8:54                 ` Bastien
2013-11-13  8:34             ` Sebastien Vauban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87siv24lzg.fsf@gmail.com \
    --to=whatifitsnot@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).