emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* inserting notes at level 1 with org-remember
@ 2010-02-25 17:18 Trance Diviner
  2010-02-26  3:38 ` Matt Lundin
  0 siblings, 1 reply; 5+ messages in thread
From: Trance Diviner @ 2010-02-25 17:18 UTC (permalink / raw)
  To: emacs-orgmode

Hello!

The documentation for org-remember-templates says the following:
"""
An optional fifth element can specify the headline in that file that should
be offered first when the user is asked to file the entry.  The default
headline is given in the variable `org-remember-default-headline'.  When
this element is `top' or `bottom', the note will be placed as a level-1
entry at the beginning or end of the file, respectively.
"""

But I find that org-remember always creates notes as a level-2 entry.
For example, starting with an empty "example.org" file and the
following configuration:

(setq org-remember-templates
      '(("Note" ?n "* %u %?\n\n%i\n%a" "example.org" top)))

Invoking org-remember twice results in these contents:

** [2010-02-25 Thu] note two
** [2010-02-25 Thu] note one

What I expected was:

* [2010-02-25 Thu] note two
* [2010-02-25 Thu] note one

Am I doing it wrong?  Or is this a bug in org-remember?  If a bug,
is there a workaround I could apply to my configuration?

Kind thanks for your time,
-- 
Trance

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

* Re: inserting notes at level 1 with org-remember
  2010-02-25 17:18 inserting notes at level 1 with org-remember Trance Diviner
@ 2010-02-26  3:38 ` Matt Lundin
  2010-02-26 15:24   ` Trance Diviner
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Lundin @ 2010-02-26  3:38 UTC (permalink / raw)
  To: Trance Diviner; +Cc: emacs-orgmode

Trance Diviner <trance.diviner@gmail.com> writes:

> But I find that org-remember always creates notes as a level-2 entry.
> For example, starting with an empty "example.org" file and the
> following configuration:
>
> (setq org-remember-templates
>       '(("Note" ?n "* %u %?\n\n%i\n%a" "example.org" top)))
>
> Invoking org-remember twice results in these contents:
>
> ** [2010-02-25 Thu] note two
> ** [2010-02-25 Thu] note one
>
>
> What I expected was:
>
> * [2010-02-25 Thu] note two
> * [2010-02-25 Thu] note one

I cannot duplicate this. With your remember template, org mode files the
entries at the top of example.org as level 1 headlines. 

Best,
Matt

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

* Re: inserting notes at level 1 with org-remember
  2010-02-26  3:38 ` Matt Lundin
@ 2010-02-26 15:24   ` Trance Diviner
  2010-02-26 22:26     ` Matthew Lundin
  0 siblings, 1 reply; 5+ messages in thread
From: Trance Diviner @ 2010-02-26 15:24 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

On Feb 25, 2010, at 7:38 PM, Matt Lundin wrote:

> Trance Diviner <trance.diviner@gmail.com> writes:
> 
>> But I find that org-remember always creates notes as a level-2 entry.
>> For example, starting with an empty "example.org" file and the
>> following configuration:
>> 
>> (setq org-remember-templates
>>      '(("Note" ?n "* %u %?\n\n%i\n%a" "example.org" top)))
>> 
>> Invoking org-remember twice results in these contents:
>> 
>> ** [2010-02-25 Thu] note two
>> ** [2010-02-25 Thu] note one
>> 
>> 
>> What I expected was:
>> 
>> * [2010-02-25 Thu] note two
>> * [2010-02-25 Thu] note one
> 
> I cannot duplicate this. With your remember template, org mode files the
> entries at the top of example.org as level 1 headlines. 

That's promising.  What org-mode and emacs version?

org-version
"6.33x"
emacs-version
"23.1.90.1"

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

* Re: inserting notes at level 1 with org-remember
  2010-02-26 15:24   ` Trance Diviner
@ 2010-02-26 22:26     ` Matthew Lundin
  2010-03-04 11:49       ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Matthew Lundin @ 2010-02-26 22:26 UTC (permalink / raw)
  To: Trance Diviner; +Cc: Matt Lundin, emacs-orgmode

Hi Trance,

Trance Diviner <trance.diviner@gmail.com> writes:

> On Feb 25, 2010, at 7:38 PM, Matt Lundin wrote:
>
>> Trance Diviner <trance.diviner@gmail.com> writes:
>> 
>>> But I find that org-remember always creates notes as a level-2 entry.
>>> For example, starting with an empty "example.org" file and the
>>> following configuration:
>>> 
>>> (setq org-remember-templates
>>>      '(("Note" ?n "* %u %?\n\n%i\n%a" "example.org" top)))
>>> 
>>> Invoking org-remember twice results in these contents:
>>> 
>>> ** [2010-02-25 Thu] note two
>>> ** [2010-02-25 Thu] note one
>>> 
>>> 
>>> What I expected was:
>>> 
>>> * [2010-02-25 Thu] note two
>>> * [2010-02-25 Thu] note one
>> 
>> I cannot duplicate this. With your remember template, org mode files the
>> entries at the top of example.org as level 1 headlines. 
>
> That's promising.  What org-mode and emacs version?
>
> org-version
> "6.33x"
> emacs-version
> "23.1.90.1"

I tried it again exactly as you explained and now can confirm that this
behavior occurs when there is no blank/new line at the top of the
remember target file. (When I tried it before, I used a file that had a
new line.)

To duplicate the bug, I did the following:

1) "touch example.org"

2) called the remember template above.

If you want a temporary fix, ensure that there is a blank/new line (or a
comment line) at the top of your target file. (If you have content in
the file, this shouldn't be a problem.)

Best,
Matt

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

* Re: Re: inserting notes at level 1 with org-remember
  2010-02-26 22:26     ` Matthew Lundin
@ 2010-03-04 11:49       ` Carsten Dominik
  0 siblings, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2010-03-04 11:49 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs-orgmode, Trance Diviner

Hi Trance and Matt,

I am not able to reproduce this problem.

- Carsten

On Feb 26, 2010, at 11:26 PM, Matthew Lundin wrote:

> Hi Trance,
>
> Trance Diviner <trance.diviner@gmail.com> writes:
>
>> On Feb 25, 2010, at 7:38 PM, Matt Lundin wrote:
>>
>>> Trance Diviner <trance.diviner@gmail.com> writes:
>>>
>>>> But I find that org-remember always creates notes as a level-2  
>>>> entry.
>>>> For example, starting with an empty "example.org" file and the
>>>> following configuration:
>>>>
>>>> (setq org-remember-templates
>>>>     '(("Note" ?n "* %u %?\n\n%i\n%a" "example.org" top)))
>>>>
>>>> Invoking org-remember twice results in these contents:
>>>>
>>>> ** [2010-02-25 Thu] note two
>>>> ** [2010-02-25 Thu] note one
>>>>
>>>>
>>>> What I expected was:
>>>>
>>>> * [2010-02-25 Thu] note two
>>>> * [2010-02-25 Thu] note one
>>>
>>> I cannot duplicate this. With your remember template, org mode  
>>> files the
>>> entries at the top of example.org as level 1 headlines.
>>
>> That's promising.  What org-mode and emacs version?
>>
>> org-version
>> "6.33x"
>> emacs-version
>> "23.1.90.1"
>
> I tried it again exactly as you explained and now can confirm that  
> this
> behavior occurs when there is no blank/new line at the top of the
> remember target file. (When I tried it before, I used a file that  
> had a
> new line.)
>
> To duplicate the bug, I did the following:
>
> 1) "touch example.org"
>
> 2) called the remember template above.
>
> If you want a temporary fix, ensure that there is a blank/new line  
> (or a
> comment line) at the top of your target file. (If you have content in
> the file, this shouldn't be a problem.)
>
> Best,
> Matt
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

end of thread, other threads:[~2010-03-04 11:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-25 17:18 inserting notes at level 1 with org-remember Trance Diviner
2010-02-26  3:38 ` Matt Lundin
2010-02-26 15:24   ` Trance Diviner
2010-02-26 22:26     ` Matthew Lundin
2010-03-04 11:49       ` Carsten Dominik

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