emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: Jere McDevitt <jere.mcdevitt@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Error saving remember item in non org-mode buffer
Date: Fri, 19 Jun 2009 10:55:29 +0200	[thread overview]
Message-ID: <87fxdwvbzy.fsf@kassiopeya.MSHEIMNETZ> (raw)
In-Reply-To: <d0897c3b0906161222k2f28bc1fg2d2fc9de62650ac9@mail.gmail.com> (Jere McDevitt's message of "Tue, 16 Jun 2009 15:22:52 -0400")

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

  reply	other threads:[~2009-06-19  8:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-16 19:22 Error saving remember item in non org-mode buffer Jere McDevitt
2009-06-19  8:55 ` Sebastian Rose [this message]
2009-06-20  0:07   ` Jere McDevitt

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=87fxdwvbzy.fsf@kassiopeya.MSHEIMNETZ \
    --to=sebastian_rose@gmx.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=jere.mcdevitt@gmail.com \
    /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).