emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* possible bug in adding properties to headlines with no properties
@ 2014-11-28 13:28 John Kitchin
  2014-11-28 16:57 ` Charles C. Berry
  0 siblings, 1 reply; 3+ messages in thread
From: John Kitchin @ 2014-11-28 13:28 UTC (permalink / raw)
  To: emacs-orgmode

I noticed an undesirable behavior in setting a property on a headline
with no properties, but which contains a code block that generates
headlines with properties. When I try to set a property with C-c C-x p,
the property gets put in the wrong place (inside the code block). It is
a small issue, but I thought I would report. 

If the headline already has a PROPERTIES drawer then it seems to work fine.

Here is an example.

* bug in setting properties?
 <- put cursor here, C-c C-x p add property

The property goes in the code block below
 
#+BEGIN_SRC emacs-lisp
(format "** %s
  :PROPERTIES:
  :ID: %s
  :END:
%s" "A headline" "some id" "some body text")
#+END_SRC
#+RESULTS:
: ** A headline
:   :PROPERTIES:
:   :ID: some id
:   :END:
: some body text

-- 
-----------------------------------
John Kitchin
http://kitchingroup.cheme.cmu.edu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: possible bug in adding properties to headlines with no properties
  2014-11-28 13:28 possible bug in adding properties to headlines with no properties John Kitchin
@ 2014-11-28 16:57 ` Charles C. Berry
  2014-11-28 19:35   ` John Kitchin
  0 siblings, 1 reply; 3+ messages in thread
From: Charles C. Berry @ 2014-11-28 16:57 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode

On Fri, 28 Nov 2014, John Kitchin wrote:

> I noticed an undesirable behavior in setting a property on a headline
> with no properties, but which contains a code block that generates
> headlines with properties. When I try to set a property with C-c C-x p,
> the property gets put in the wrong place (inside the code block). It is
> a small issue, but I thought I would report.
>

John,

When I do as you suggest, I get a prompt:

Malformed drawer at 348, repair? (y or n)

`348' was the bol for the first :PROPERTIES: line.

When I respond `y', a properties drawer is created under the headline and 
I get the usual prompts to complete the addition of a property.

In the end, it looks correct.

I get the same behavior with both current and older 8.3beta commits:

: commit e4195fa7db03284c0c0d5b70a66d419ce7caf3e9
: Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
: Date:   Thu Nov 13 21:49:03 2014 +0100


: commit 5945beef05120ce319228195a9e0c562f8573d19
: Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
: Date:   Thu Nov 27 00:21:03 2014 +0100
:

HTH,

Chuck

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: possible bug in adding properties to headlines with no properties
  2014-11-28 16:57 ` Charles C. Berry
@ 2014-11-28 19:35   ` John Kitchin
  0 siblings, 0 replies; 3+ messages in thread
From: John Kitchin @ 2014-11-28 19:35 UTC (permalink / raw)
  To: Charles C. Berry; +Cc: emacs-orgmode

"Charles C. Berry" <ccberry@ucsd.edu> writes:

thanks for the note. I am still on 8.2.7, so it sounds like the issue is
fixed upstream of me. I look forward to getting there!

> On Fri, 28 Nov 2014, John Kitchin wrote:
>
>> I noticed an undesirable behavior in setting a property on a headline
>> with no properties, but which contains a code block that generates
>> headlines with properties. When I try to set a property with C-c C-x p,
>> the property gets put in the wrong place (inside the code block). It is
>> a small issue, but I thought I would report.
>>
>
> John,
>
> When I do as you suggest, I get a prompt:
>
> Malformed drawer at 348, repair? (y or n)
>
> `348' was the bol for the first :PROPERTIES: line.
>
> When I respond `y', a properties drawer is created under the headline
> and I get the usual prompts to complete the addition of a property.
>
> In the end, it looks correct.
>
> I get the same behavior with both current and older 8.3beta commits:
>
> : commit e4195fa7db03284c0c0d5b70a66d419ce7caf3e9
> : Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
> : Date:   Thu Nov 13 21:49:03 2014 +0100
>
>
> : commit 5945beef05120ce319228195a9e0c562f8573d19
> : Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
> : Date:   Thu Nov 27 00:21:03 2014 +0100
> :
>
> HTH,
>
> Chuck
>
>
>

-- 
-----------------------------------
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-28 19:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-28 13:28 possible bug in adding properties to headlines with no properties John Kitchin
2014-11-28 16:57 ` Charles C. Berry
2014-11-28 19:35   ` John Kitchin

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).