* org-remember bug?
@ 2009-10-30 18:18 Adam Spiers
2009-11-02 10:02 ` Carsten Dominik
0 siblings, 1 reply; 3+ messages in thread
From: Adam Spiers @ 2009-10-30 18:18 UTC (permalink / raw
To: org-mode mailing list
Hi all,
With commit 79bcdbe73667be7ad811c1f2facd419cbef90426 of
http://repo.or.cz/r/org-mode.git, remember 2.0, and a value of
org-remember-templates similar to the following (I removed some
entries which work):
(("Procrastination" 80 "* [#B] %T %^{activity}\n :PROPERTIES:\n :thoughts/feelings: %^{thoughts/feelings}\n :justification: %^{justification}\n :attempted solution: %^{attempted solution}\n :resultant thoughts/feelings: %^{resultant thoughts/feelings}\n :END:" "~/roaming/notes/Procrastination.log" bottom nil))
I get this error when I hit C-c C-c in the *Remember* buffer:
Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
insert(nil)
(cond ((not ...) (if ... ... ... ...) (insert text-before-node-creation) (when remember-save-after-remembering ... ...) (throw ... t)) ((eq heading ...) (goto-char ...) (or ... ...) (setq org-goto-start-pos ...)) ((eq heading ...) (goto-char ...) (or ... ...) (setq org-goto-start-pos ...)) ((and ... ...) (goto-char ...) (if ... ... ...)) (t (goto-char ...) (setq org-goto-start-pos ... heading ...)))
(progn (cond (... ... ... ... ...) (... ... ... ...) (... ... ... ...) (... ... ...) (t ... ...)))
(if heading (progn (cond ... ... ... ... ...)))
(when heading (cond (... ... ... ... ...) (... ... ... ...) (... ... ... ...) (... ... ...) (t ... ...)))
(save-restriction (widen) (setq reversed (org-notes-order-reversed-p)) (when heading (cond ... ... ... ... ...)) (cond (... ...) (fastp ...) (... ...) (... ...) (t ...)) (if (not spos) (throw ... nil)) (and visitp (run-with-idle-timer 0.01 nil ...)) (goto-char spos) (cond (... ... ... ...) (... ... ... ... ...) (... ...) (... ...) (t ... ... ... ...)) (when remember-save-after-remembering (save-buffer) (if ... ...)) (when org-remember-auto-remove-backup-files (when backup-file ...) (when org-remember-backup-directory ...)))
(save-excursion (save-restriction (widen) (setq reversed ...) (when heading ...) (cond ... ... ... ... ...) (if ... ...) (and visitp ...) (goto-char spos) (cond ... ... ... ... ...) (when remember-save-after-remembering ... ...) (when org-remember-auto-remove-backup-files ... ...)))
(save-current-buffer (set-buffer (or visiting ...)) (unless (or ... ...) (error "Target files for notes must be in Org-mode if not filing to top/bottom")) (save-excursion (save-restriction ... ... ... ... ... ... ... ... ... ...)))
(with-current-buffer (or visiting (find-file-noselect file)) (unless (or ... ...) (error "Target files for notes must be in Org-mode if not filing to top/bottom")) (save-excursion (save-restriction ... ... ... ... ... ... ... ... ... ...)))
(let* ((visitp ...) (backup-file ...) (dummy ...) (previousp ...) (clockp ...) (fastp ...) (file ...) (heading org-remember-default-headline) (visiting ...) (org-startup-folded nil) (org-startup-align-all-tables nil) (org-goto-start-pos 1) spos exitcmd level reversed txt text-before-node-creation) (when (equal current-prefix-arg ...) (setq visitp t)) (when previousp (setq file ... visiting ... heading ... fastp t)) (when clockp (setq file ... visiting ... heading org-clock-heading-for-remember fastp t)) (setq current-prefix-arg nil) (when org-remember-delete-empty-lines-at-end (goto-char ...) (if ... ...)) (goto-char (point-min)) (unless (looking-at org-outline-regexp) (setq text-before-node-creation ...) (insert ...) (backward-char 1) (when org-adapt-indentation ...)) (when org-remember-delete-empty-lines-at-end (goto-char ...) (if ... ... ...)) (goto-char (point-min)) (setq txt (buffer-string)) (org-save-markers-in-region (point-min) (point-max)) (set-buffer-modified-p nil) (when (and ... ...) (org-refile nil ...) (and visitp ...) (save-excursion ... ... ...) (throw ... t)) (with-current-buffer (or visiting ...) (unless ... ...) (save-excursion ...)))
(catch (quote quit) (if org-note-abort (throw ... t)) (let* (... ... ... ... ... ... ... ... ... ... ... ... spos exitcmd level reversed txt text-before-node-creation) (when ... ...) (when previousp ...) (when clockp ...) (setq current-prefix-arg nil) (when org-remember-delete-empty-lines-at-end ... ...) (goto-char ...) (unless ... ... ... ... ...) (when org-remember-delete-empty-lines-at-end ... ...) (goto-char ...) (setq txt ...) (org-save-markers-in-region ... ...) (set-buffer-modified-p nil) (when ... ... ... ... ...) (with-current-buffer ... ... ...)))
org-remember-handler()
run-hook-with-args-until-success(org-remember-handler)
remember-region(1 179)
remember-finalize()
org-remember-finalize()
call-interactively(org-remember-finalize nil nil)
I tried to debug but got lost in a maze of code I didn't understand.
Any ideas?
Thanks!
Adam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-remember bug?
2009-10-30 18:18 org-remember bug? Adam Spiers
@ 2009-11-02 10:02 ` Carsten Dominik
2009-11-02 23:46 ` Adam Spiers
0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2009-11-02 10:02 UTC (permalink / raw
To: Adam Spiers; +Cc: org-mode mailing list
Hi Adam,
I have fixed this issue.
however, while debugging you example, I saw that a reason why this
happened is that your target file is not in Org-mode. This is allowed,
but it it does not seem what you want, because you are creating an Org
node
with properties etc.
So maybe you want to arrange for the file to be in Org-mode? By
changing
the extension, or by adding
# -*- mode:org -*-
to the top?
HTH
- Carsten
On Oct 30, 2009, at 7:18 PM, Adam Spiers wrote:
> Hi all,
>
> With commit 79bcdbe73667be7ad811c1f2facd419cbef90426 of
> http://repo.or.cz/r/org-mode.git, remember 2.0, and a value of
> org-remember-templates similar to the following (I removed some
> entries which work):
>
> (("Procrastination" 80 "* [#B] %T %^{activity}\n :PROPERTIES:
> \n :thoughts/feelings: %^{thoughts/feelings}\n :justification:
> %^{justification}\n :attempted solution: %^{attempted solution}
> \n :resultant thoughts/feelings: %^{resultant thoughts/feelings}
> \n :END:" "~/roaming/notes/Procrastination.log" bottom nil))
>
> I get this error when I hit C-c C-c in the *Remember* buffer:
>
> Debugger entered--Lisp error: (wrong-type-argument char-or-string-p
> nil)
> insert(nil)
> (cond ((not ...) (if ... ... ... ...) (insert text-before-node-
> creation) (when remember-save-after-remembering ... ...) (throw ...
> t)) ((eq heading ...) (goto-char ...) (or ... ...) (setq org-goto-
> start-pos ...)) ((eq heading ...) (goto-char ...) (or ... ...) (setq
> org-goto-start-pos ...)) ((and ... ...) (goto-char ...)
> (if ... ... ...)) (t (goto-char ...) (setq org-goto-start-pos ...
> heading ...)))
> (progn (cond (... ... ... ... ...) (... ... ... ...)
> (... ... ... ...) (... ... ...) (t ... ...)))
> (if heading (progn (cond ... ... ... ... ...)))
> (when heading (cond (... ... ... ... ...) (... ... ... ...)
> (... ... ... ...) (... ... ...) (t ... ...)))
> (save-restriction (widen) (setq reversed (org-notes-order-reversed-
> p)) (when heading (cond ... ... ... ... ...)) (cond (... ...)
> (fastp ...) (... ...) (... ...) (t ...)) (if (not spos) (throw ...
> nil)) (and visitp (run-with-idle-timer 0.01 nil ...)) (goto-char
> spos) (cond (... ... ... ...) (... ... ... ... ...) (... ...)
> (... ...) (t ... ... ... ...)) (when remember-save-after-remembering
> (save-buffer) (if ... ...)) (when org-remember-auto-remove-backup-
> files (when backup-file ...) (when org-remember-backup-
> directory ...)))
> (save-excursion (save-restriction (widen) (setq reversed ...) (when
> heading ...) (cond ... ... ... ... ...) (if ... ...) (and
> visitp ...) (goto-char spos) (cond ... ... ... ... ...) (when
> remember-save-after-remembering ... ...) (when org-remember-auto-
> remove-backup-files ... ...)))
> (save-current-buffer (set-buffer (or visiting ...)) (unless
> (or ... ...) (error "Target files for notes must be in Org-mode if
> not filing to top/bottom")) (save-excursion (save-
> restriction ... ... ... ... ... ... ... ... ... ...)))
> (with-current-buffer (or visiting (find-file-noselect file))
> (unless (or ... ...) (error "Target files for notes must be in Org-
> mode if not filing to top/bottom")) (save-excursion (save-
> restriction ... ... ... ... ... ... ... ... ... ...)))
> (let* ((visitp ...) (backup-file ...) (dummy ...) (previousp ...)
> (clockp ...) (fastp ...) (file ...) (heading org-remember-default-
> headline) (visiting ...) (org-startup-folded nil) (org-startup-align-
> all-tables nil) (org-goto-start-pos 1) spos exitcmd level reversed
> txt text-before-node-creation) (when (equal current-prefix-arg ...)
> (setq visitp t)) (when previousp (setq file ... visiting ...
> heading ... fastp t)) (when clockp (setq file ... visiting ...
> heading org-clock-heading-for-remember fastp t)) (setq current-
> prefix-arg nil) (when org-remember-delete-empty-lines-at-end (goto-
> char ...) (if ... ...)) (goto-char (point-min)) (unless (looking-at
> org-outline-regexp) (setq text-before-node-creation ...)
> (insert ...) (backward-char 1) (when org-adapt-indentation ...))
> (when org-remember-delete-empty-lines-at-end (goto-char ...)
> (if ... ... ...)) (goto-char (point-min)) (setq txt (buffer-string))
> (org-save-markers-in-region (point-min) (point-max)) (set-buffer-
> modified-p nil) (when (and ... ...) (org-refile nil ...) (and
> visitp ...) (save-excursion ... ... ...) (throw ... t)) (with-
> current-buffer (or visiting ...) (unless ... ...) (save-
> excursion ...)))
> (catch (quote quit) (if org-note-abort (throw ... t)) (let*
> (... ... ... ... ... ... ... ... ... ... ... ... spos exitcmd level
> reversed txt text-before-node-creation) (when ... ...) (when
> previousp ...) (when clockp ...) (setq current-prefix-arg nil) (when
> org-remember-delete-empty-lines-at-end ... ...) (goto-char ...)
> (unless ... ... ... ... ...) (when org-remember-delete-empty-lines-
> at-end ... ...) (goto-char ...) (setq txt ...) (org-save-markers-in-
> region ... ...) (set-buffer-modified-p nil)
> (when ... ... ... ... ...) (with-current-buffer ... ... ...)))
> org-remember-handler()
> run-hook-with-args-until-success(org-remember-handler)
> remember-region(1 179)
> remember-finalize()
> org-remember-finalize()
> call-interactively(org-remember-finalize nil nil)
>
> I tried to debug but got lost in a maze of code I didn't understand.
> Any ideas?
>
> Thanks!
> Adam
>
>
> _______________________________________________
> 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
- Carsten
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-remember bug?
2009-11-02 10:02 ` Carsten Dominik
@ 2009-11-02 23:46 ` Adam Spiers
0 siblings, 0 replies; 3+ messages in thread
From: Adam Spiers @ 2009-11-02 23:46 UTC (permalink / raw
To: org-mode mailing list
On Mon, Nov 02, 2009 at 11:02:56AM +0100, Carsten Dominik wrote:
> Hi Adam,
>
> I have fixed this issue.
Thanks!
> however, while debugging you example, I saw that a reason why this
> happened is that your target file is not in Org-mode. This is allowed,
> but it it does not seem what you want, because you are creating an
> Org node
> with properties etc.
>
> So maybe you want to arrange for the file to be in Org-mode? By
> changing
> the extension, or by adding
>
> # -*- mode:org -*-
>
> to the top?
Or I could just fix the typo'd ".log" file extension to ".org" -
oops! :-)
Many thanks again,
Adam
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-02 23:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-30 18:18 org-remember bug? Adam Spiers
2009-11-02 10:02 ` Carsten Dominik
2009-11-02 23:46 ` Adam Spiers
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.