emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-remember items are stored to the wrong headline
@ 2008-08-27  6:45 Tassilo Horn
  2008-08-27  9:52 ` Manish
  2008-09-05  6:20 ` Carsten Dominik
  0 siblings, 2 replies; 5+ messages in thread
From: Tassilo Horn @ 2008-08-27  6:45 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

I use org-mode which is included in Emacs 23 from CVS (a current
checkout).  This is my relevant config for org-remember:

--8<---------------cut here---------------start------------->8---
(require 'remember)
(setq org-default-notes-file "~/repos/org/main.org"
      org-remember-default-headline "Remember"
      org-remember-templates 
      '(;; TODOs
        ("todo-template" ?t "* TODO %?\n  (created: %U)\n  %i\n  %a")
        ;; Ideas
        ("idea-template" ?i "* Idea: %^{Title}\n  (created: %U)\n  %?\n  %i\n  %a")
        ;; Notes
        ("note-template" ?n "* Note: %?\n  (created: %U)\n  %i\n  %a")))
(setq remember-annotation-functions     '(org-remember-annotation)
      remember-handler-functions        '(org-remember-handler)
      org-remember-store-without-prompt t)
(add-hook 'remember-mode-hook 'org-remember-apply-template)
(global-set-key (kbd "C-c o r") 'org-remember)
--8<---------------cut here---------------end--------------->8---

The structure of my main.org file is as follows:

--8<---------------cut here---------------start------------->8---
* Remember
#+CATEGORY: Remember
   
* Projects
#+CATEGORY: Projects

* Foo
#+CATEGORY: Foo
--8<---------------cut here---------------end--------------->8---

When I create a new remember item with `C-c -o r', fill out one template
and hit `C-c C-c', it's always filed as **-headline in main.org, but not
below the "Remember" headline but below the last headline, i.e. "Foo".

As a workaround I can put the Remember headline to the end of the file,
but according to the docs, it should work as I've set it up...

Is this a bug or am I doing something wrong?

Bye,
Tassilo
-- 
RMS counted to infinity. Twice...

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

* Re: Org-remember items are stored to the wrong headline
  2008-08-27  6:45 Org-remember items are stored to the wrong headline Tassilo Horn
@ 2008-08-27  9:52 ` Manish
  2008-08-27 10:24   ` Tassilo Horn
  2008-09-05  6:20 ` Carsten Dominik
  1 sibling, 1 reply; 5+ messages in thread
From: Manish @ 2008-08-27  9:52 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode

  On Wed, Aug 27, 2008 at 12:15 PM, Tassilo Horn wrote:
  > Hi all,
  >
  > I use org-mode which is included in Emacs 23 from CVS (a current
  > checkout).  This is my relevant config for org-remember:
  >
  > --8<---------------cut here---------------start------------->8---
  > (require 'remember)
  > (setq org-default-notes-file "~/repos/org/main.org"
  >      org-remember-default-headline "Remember"
  >      org-remember-templates
  >      '(;; TODOs
  >        ("todo-template" ?t "* TODO %?\n  (created: %U)\n  %i\n  %a")
  >        ;; Ideas
  >        ("idea-template" ?i "* Idea: %^{Title}\n  (created: %U)\n
%?\n  %i\n  %a")
  >        ;; Notes
  >        ("note-template" ?n "* Note: %?\n  (created: %U)\n  %i\n  %a")))
  > (setq remember-annotation-functions     '(org-remember-annotation)
  >      remember-handler-functions        '(org-remember-handler)
  >      org-remember-store-without-prompt t)
  > (add-hook 'remember-mode-hook 'org-remember-apply-template)
  > (global-set-key (kbd "C-c o r") 'org-remember)
  > --8<---------------cut here---------------end--------------->8---
  >
  > The structure of my main.org file is as follows:
  >
  > --8<---------------cut here---------------start------------->8---
  > * Remember
  > #+CATEGORY: Remember
  >
  > * Projects
  > #+CATEGORY: Projects
  >
  > * Foo
  > #+CATEGORY: Foo
  > --8<---------------cut here---------------end--------------->8---
  >
  > When I create a new remember item with `C-c -o r', fill out one template
  > and hit `C-c C-c', it's always filed as **-headline in main.org, but not
  > below the "Remember" headline but below the last headline, i.e. "Foo".
  >
  > As a workaround I can put the Remember headline to the end of the file,
  > but according to the docs, it should work as I've set it up...


I took liberty to rephrase the template definition.  Seems to work as
you expect it to now.

(setq org-remember-templates
      (quote
       ((
         ;; TODOs
         ("todo-emplate" ?t "* TODO %? \n  :CREATED: %U%i\n  %a"
"~/org/main.org" "Remember")
         ;; Ideas
         ("idea-template" ?i "* Idea: %^{Title}\n  %?\n  :CREATED:
%U%i\n  %a" "~/org/main.org" "Remember")
         ;; Notes
         ("note-template" ?n "* Note: %?\n  :CREATED: %U%i\n  %a"
"~/org/main.org" "Remember"))))

HTH,
-- Manish

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

* Re: Org-remember items are stored to the wrong headline
  2008-08-27  9:52 ` Manish
@ 2008-08-27 10:24   ` Tassilo Horn
  0 siblings, 0 replies; 5+ messages in thread
From: Tassilo Horn @ 2008-08-27 10:24 UTC (permalink / raw)
  To: Manish; +Cc: emacs-orgmode

Manish <mailtomanish.sharma@gmail.com> writes:

Hi!

>   > --8<---------------cut here---------------start------------->8---
>   > (setq org-default-notes-file "~/repos/org/main.org"
>   >      org-remember-default-headline "Remember"
>   >      org-remember-templates
>   >      '(;; TODOs
>   >        ("todo-template" ?t "* TODO %?\n  (created: %U)\n  %i\n  %a")
>   >        ;; Ideas
>   >        ("idea-template" ?i "* Idea: %^{Title}\n  (created: %U)\n  %?\n  %i\n  %a")
>   >        ;; Notes
>   >        ("note-template" ?n "* Note: %?\n  (created: %U)\n  %i\n  %a")))
>   > --8<---------------cut here---------------end--------------->8---
>
> I took liberty to rephrase the template definition.  Seems to work as
> you expect it to now.
>
> (setq org-remember-templates
>       (quote
>        ((
>          ;; TODOs
>          ("todo-emplate" ?t "* TODO %? \n  :CREATED: %U%i\n  %a" "~/org/main.org" "Remember")
>          ;; Ideas
>          ("idea-template" ?i "* Idea: %^{Title}\n  %?\n  :CREATED: %U%i\n  %a" "~/org/main.org" "Remember")
>          ;; Notes
>          ("note-template" ?n "* Note: %?\n  :CREATED: %U%i\n  %a" "~/org/main.org" "Remember"))))

Even if it works with this definition, it's only a workaround.

,----[ C-h v org-remember-templates RET ]
| org-remember-templates is a variable defined in `org-remember.el'.

[...]

| The fourth element is optional and can specify a destination file for
| remember items created with this template.  The default file is given
| by `org-default-notes-file'.  If the file name is not an absolute
| path, it will be interpreted relative to `org-directory'.
| 
| 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.

[...]

| You can customize this variable.
| 
| [back]
`----

So the 4th and 5th element are optional and should use the values of
`org-default-notes-file' and `org-remember-default-headline' if not
specified.  But that's not done for the headline in my case...

Bye,
Tassilo
-- 
No person,  no idea, and no  religion deserves to be  illegal to insult,
not even the Church of Emacs. (Richard M. Stallman)

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

* Re: Org-remember items are stored to the wrong headline
  2008-08-27  6:45 Org-remember items are stored to the wrong headline Tassilo Horn
  2008-08-27  9:52 ` Manish
@ 2008-09-05  6:20 ` Carsten Dominik
  2008-09-05  7:42   ` Tassilo Horn
  1 sibling, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2008-09-05  6:20 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode

Hi Tassilo,

this is a bug in compatibility code that is supposed convert values  
previously valid for org-remember-templates to the new format.  In  
your case, this code modified your templates to include the empty  
string as the default headline.  You can see this if you look at the  
value of org-remember-templates after you have used remember for the  
first time in an emacs session.

Things will be fine if you explicitly specify nil for the file and  
headline fields in the template definition.  Or get the latest git  
release, where this problem is fixed as well.

Thanks for the report.

- Carsten

On Aug 27, 2008, at 8:45 AM, Tassilo Horn wrote:

> Hi all,
>
> I use org-mode which is included in Emacs 23 from CVS (a current
> checkout).  This is my relevant config for org-remember:
>
> --8<---------------cut here---------------start------------->8---
> (require 'remember)
> (setq org-default-notes-file "~/repos/org/main.org"
>     org-remember-default-headline "Remember"
>     org-remember-templates
>     '(;; TODOs
>       ("todo-template" ?t "* TODO %?\n  (created: %U)\n  %i\n  %a")
>       ;; Ideas
>       ("idea-template" ?i "* Idea: %^{Title}\n  (created: %U)\n  %? 
> \n  %i\n  %a")
>       ;; Notes
>       ("note-template" ?n "* Note: %?\n  (created: %U)\n  %i\n  %a")))
> (setq remember-annotation-functions     '(org-remember-annotation)
>     remember-handler-functions        '(org-remember-handler)
>     org-remember-store-without-prompt t)
> (add-hook 'remember-mode-hook 'org-remember-apply-template)
> (global-set-key (kbd "C-c o r") 'org-remember)
> --8<---------------cut here---------------end--------------->8---
>
> The structure of my main.org file is as follows:
>
> --8<---------------cut here---------------start------------->8---
> * Remember
> #+CATEGORY: Remember
>
> * Projects
> #+CATEGORY: Projects
>
> * Foo
> #+CATEGORY: Foo
> --8<---------------cut here---------------end--------------->8---
>
> When I create a new remember item with `C-c -o r', fill out one  
> template
> and hit `C-c C-c', it's always filed as **-headline in main.org, but  
> not
> below the "Remember" headline but below the last headline, i.e. "Foo".
>
> As a workaround I can put the Remember headline to the end of the  
> file,
> but according to the docs, it should work as I've set it up...
>
> Is this a bug or am I doing something wrong?
>
> Bye,
> Tassilo
> -- 
> RMS counted to infinity. Twice...
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Org-remember items are stored to the wrong headline
  2008-09-05  6:20 ` Carsten Dominik
@ 2008-09-05  7:42   ` Tassilo Horn
  0 siblings, 0 replies; 5+ messages in thread
From: Tassilo Horn @ 2008-09-05  7:42 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten Dominik <dominik@science.uva.nl> writes:

Hi Carsten,

> Things will be fine if you explicitly specify nil for the file and
> headline fields in the template definition.  Or get the latest git
> release, where this problem is fixed as well.

Thanks a lot.

Bye,
Tassilo
-- 
GNU Emacs is a text editor for Über-Geeks.

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

end of thread, other threads:[~2008-09-05  7:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-27  6:45 Org-remember items are stored to the wrong headline Tassilo Horn
2008-08-27  9:52 ` Manish
2008-08-27 10:24   ` Tassilo Horn
2008-09-05  6:20 ` Carsten Dominik
2008-09-05  7:42   ` Tassilo Horn

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