From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Error saving remember item in non org-mode buffer Date: Fri, 19 Jun 2009 10:55:29 +0200 Message-ID: <87fxdwvbzy.fsf@kassiopeya.MSHEIMNETZ> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHZos-0003X7-Ud for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 04:51:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHZoo-0003QN-Ai for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 04:51:34 -0400 Received: from [199.232.76.173] (port=56624 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHZoo-0003QE-1T for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 04:51:30 -0400 Received: from mail.gmx.net ([213.165.64.20]:57441) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MHZon-0006FZ-CL for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 04:51:29 -0400 In-Reply-To: (Jere McDevitt's message of "Tue, 16 Jun 2009 15:22:52 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jere McDevitt Cc: emacs-orgmode@gnu.org 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 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