* Error saving remember item in non org-mode buffer
@ 2009-06-16 19:22 Jere McDevitt
2009-06-19 8:55 ` Sebastian Rose
0 siblings, 1 reply; 3+ messages in thread
From: Jere McDevitt @ 2009-06-16 19:22 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1535 bytes --]
Org-mode version: 6.27a
I configured org-remember-templates to use a file named "project.todo" to
hold todo entries for me.
(setq org-remember-templates
("Project" ?p "* TODO %?\n %u" "~/org/project.todo" bottom )))
I hadn't added the .todo extension to the auto-mode-alist so when it was
loaded to be written to by the org-remember-handler, it came up by default
in fundamental-mode, not org-mode.
This generates an error condition that I tracked down in the org-remember.el
file to line 887 in org-remember-handler:
((not (org-mode-p))
(if (eq heading 'top)
(goto-char (point-min))
(goto-char (point-max))
(or (bolp) (newline)))
(insert text-before-node-creation)
.......
The error is that text-before-node-creation apparently is a nil and the
insert routine is generating an error because of it. This variable is set
earlier in the handler at around line 845 but only if the text being
inserted does not look like an org-outline-regexp:
(unless (looking-at org-outline-regexp)
;; add a headline
(setq text-before-node-creation (buffer-string))
Because my template actually does look like an org-outline-regexp (it starts
with "* TODO"), that variable is never set and because the buffer is not in
org-mode, this code is triggered using the text-buffer-node-creation.
The simple work around was to add .todo files to the auto-mode-alist (or I
could have changed the template), but I thought I would post a note about
the problem.
Jere
[-- Attachment #1.2: Type: text/html, Size: 1705 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
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] 3+ messages in thread
* Re: Error saving remember item in non org-mode buffer
2009-06-16 19:22 Error saving remember item in non org-mode buffer Jere McDevitt
@ 2009-06-19 8:55 ` Sebastian Rose
2009-06-20 0:07 ` Jere McDevitt
0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Rose @ 2009-06-19 8:55 UTC (permalink / raw)
To: Jere McDevitt; +Cc: emacs-orgmode
As Carsten posted yesterday:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html
First line of project.todo:
-*- mode: org-mode; -*-
Sebastian
Jere McDevitt <jere.mcdevitt@gmail.com> writes:
> Org-mode version: 6.27a
>
> I configured org-remember-templates to use a file named "project.todo" to
> hold todo entries for me.
>
> (setq org-remember-templates
> ("Project" ?p "* TODO %?\n %u" "~/org/project.todo" bottom )))
>
> I hadn't added the .todo extension to the auto-mode-alist so when it was
> loaded to be written to by the org-remember-handler, it came up by default
> in fundamental-mode, not org-mode.
>
> This generates an error condition that I tracked down in the org-remember.el
> file to line 887 in org-remember-handler:
>
> ((not (org-mode-p))
> (if (eq heading 'top)
> (goto-char (point-min))
> (goto-char (point-max))
> (or (bolp) (newline)))
> (insert text-before-node-creation)
> .......
>
>
> The error is that text-before-node-creation apparently is a nil and the
> insert routine is generating an error because of it. This variable is set
> earlier in the handler at around line 845 but only if the text being
> inserted does not look like an org-outline-regexp:
>
> (unless (looking-at org-outline-regexp)
> ;; add a headline
> (setq text-before-node-creation (buffer-string))
>
> Because my template actually does look like an org-outline-regexp (it starts
> with "* TODO"), that variable is never set and because the buffer is not in
> org-mode, this code is triggered using the text-buffer-node-creation.
>
> The simple work around was to add .todo files to the auto-mode-alist (or I
> could have changed the template), but I thought I would post a note about
> the problem.
>
> Jere
> _______________________________________________
> 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
--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.: +49 (0)511 - 36 58 472
Fax: +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http: www.emma-stil.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Error saving remember item in non org-mode buffer
2009-06-19 8:55 ` Sebastian Rose
@ 2009-06-20 0:07 ` Jere McDevitt
0 siblings, 0 replies; 3+ messages in thread
From: Jere McDevitt @ 2009-06-20 0:07 UTC (permalink / raw)
To: Sebastian Rose; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 2916 bytes --]
Oh, I'm familiar with the file variables and all, thanks for the tip.
Since the org-remember code is written to support files that are not in
org-mode as targets of remember items, it just seemed to me it shouldn't
then switch back to assuming it was an org mode file simply because the text
being inserted resembles a particular type of regexp.
(gotta remember to hit reply-all)
On Fri, Jun 19, 2009 at 4:55 AM, Sebastian Rose <sebastian_rose@gmx.de>wrote:
> As Carsten posted yesterday:
>
>
>
> http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html
>
>
> First line of project.todo:
>
>
> -*- mode: org-mode; -*-
>
>
> Sebastian
>
>
> Jere McDevitt <jere.mcdevitt@gmail.com> writes:
> > Org-mode version: 6.27a
> >
> > I configured org-remember-templates to use a file named "project.todo" to
> > hold todo entries for me.
> >
> > (setq org-remember-templates
> > ("Project" ?p "* TODO %?\n %u" "~/org/project.todo" bottom )))
> >
> > I hadn't added the .todo extension to the auto-mode-alist so when it was
> > loaded to be written to by the org-remember-handler, it came up by
> default
> > in fundamental-mode, not org-mode.
> >
> > This generates an error condition that I tracked down in the
> org-remember.el
> > file to line 887 in org-remember-handler:
> >
> > ((not (org-mode-p))
> > (if (eq heading 'top)
> > (goto-char (point-min))
> > (goto-char (point-max))
> > (or (bolp) (newline)))
> > (insert text-before-node-creation)
> > .......
> >
> >
> > The error is that text-before-node-creation apparently is a nil and the
> > insert routine is generating an error because of it. This variable is
> set
> > earlier in the handler at around line 845 but only if the text being
> > inserted does not look like an org-outline-regexp:
> >
> > (unless (looking-at org-outline-regexp)
> > ;; add a headline
> > (setq text-before-node-creation (buffer-string))
> >
> > Because my template actually does look like an org-outline-regexp (it
> starts
> > with "* TODO"), that variable is never set and because the buffer is not
> in
> > org-mode, this code is triggered using the text-buffer-node-creation.
> >
> > The simple work around was to add .todo files to the auto-mode-alist (or
> I
> > could have changed the template), but I thought I would post a note about
> > the problem.
> >
> > Jere
> > _______________________________________________
> > 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
>
> --
> Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
> Tel.: +49 (0)511 - 36 58 472
> Fax: +49 (0)1805 - 233633 - 11044
> mobil: +49 (0)173 - 83 93 417
> Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
> Http: www.emma-stil.de
>
[-- Attachment #1.2: Type: text/html, Size: 4119 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
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] 3+ messages in thread
end of thread, other threads:[~2009-06-20 0:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-16 19:22 Error saving remember item in non org-mode buffer Jere McDevitt
2009-06-19 8:55 ` Sebastian Rose
2009-06-20 0:07 ` Jere McDevitt
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.