* Remember mode (frist time) reports wrong type argument: stringp, nil
@ 2008-12-22 23:48 Charles Cave
2008-12-23 22:04 ` Remember mode (frist time) reports wrong type argument:stringp, nil Carsten Dominik
0 siblings, 1 reply; 2+ messages in thread
From: Charles Cave @ 2008-12-22 23:48 UTC (permalink / raw
To: emacs-orgmode
The first time I use Remember, after I file the note with C-c C-c
I get a message: Wrong type argument: stringp, nil
When I repeat C-c C-c the note is filed successfully.
When I run Remember again, there is no problem.
My org version: 6.15d
My emacs version: 22.1.1 (GNU on Windows XP)
Relevant part of .emacs file:
(setq load-path (append load-path (list "L:/elisp")))
(add-to-list 'load-path "L:/elisp/")
(add-to-list 'load-path "L:/elisp/remember-1.9/")
;; 20th JUly 2007 following line:
;; (require 'org-export-latex)
(autoload 'remember "remember" nil t)
(autoload 'remember-region "remember" nil t)
(setq org-directory "~/orgfiles/")
(setq org-default-notes-file "~/.notes")
(setq remember-annotation-functions '(org-remember-annotation))
(setq remember-handler-functions '(org-remember-handler))
(add-hook 'remember-mode-hook 'org-remember-apply-template)
(define-key global-map "\C-cr" 'org-remember)
(setq org-remember-templates
'(("Todo" ?t "* TODO %? %^g\n %i\n " "E:/GTD/newgtd.org" "Tasks")
("Journal" ?j "\n* %^{topic} %T \n%i%?\n" "L:journal.org")
("Book" ?b "\n* %^{Book Title} %t :READING: \n%[l:/booktemp.txt]\n" "L:journal.org")
("Private" ?p "\n* %^{topic} %T \n%i%?\n" "E:/gtd/privnotes.org")
("Special" ?s "\n* My test\n %i \nLIne2 %x" "E:/gtd/privnotes.org")
("Contact" ?c "\n* %^{Name} :CONTACT:\n%[l:/contemp.txt]\n" "E:/gtd/privnotes.org")
))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Backward trace:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
set-buffer(nil)
(save-current-buffer (set-buffer (or visiting ...)) (unless (org-mode-p) (error "Target files for remember notes must be in Org-mode")) (save-excursion (save-restriction ... ... ... ... ... ... ... ... ... ...)))
(with-current-buffer (or visiting (get-file-buffer file)) (unless (org-mode-p) (error "Target files for remember notes must be in Org-mode")) (save-excursion (save-restriction ... ... ... ... ... ... ... ... ... ...)))
(let* ((visitp ...) (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) (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) (goto-char (point-min)) (if (re-search-forward "[ \n]+\\'" nil t) (replace-match "")) (goto-char (point-min)) (unless (looking-at org-outline-regexp) (insert ...) (backward-char 1) (when org-adapt-indentation ...)) (goto-char (point-min)) (if (re-search-forward "\n[ ]*\n[ \n]*\\'" nil t) (replace-match "\n\n")
(if ... ...)) (goto-char (point-min)) (setq txt (buffer-string)) (org-save-markers-in-region (point-min) (point-max)) (when (and ... ...) (org-refile nil ...) (and visitp ...) (save-excursi!
on ... ... ...) (throw ... t)) (if (not visiting) (find-file-noselect file)) (with-current-buffer (or visiting ...) (unless ... ...) (save-excursion ...)))
(catch (quote quit) (if org-note-abort (throw ... nil)) (let* (... ... ... ... ... ... ... ... ... ... spos exitcmd level reversed txt) (when ... ...) (when previousp ...) (when clockp ...) (setq current-prefix-arg nil) (goto-char ...) (if ... ...) (goto-char ...) (unless ... ... ... ...) (goto-char ...) (if ... ... ...) (goto-char ...) (setq txt ...) (org-save-markers-in-region ... ...) (when ... ... ... ... ...) (if ... ...) (with-current-buffer ... ... ...)))
org-remember-handler()
run-hook-with-args-until-success(org-remember-handler)
(if remember-all-handler-functions (run-hooks (quote remember-handler-functions)) (run-hook-with-args-until-success (quote remember-handler-functions)))
(save-restriction (narrow-to-region b e) (if remember-all-handler-functions (run-hooks ...) (run-hook-with-args-until-success ...)) (remember-destroy))
(let ((b ...) (e ...)) (save-restriction (narrow-to-region b e) (if remember-all-handler-functions ... ...) (remember-destroy)))
remember-region(1 412)
remember-finalize()
org-remember-finalize()
call-interactively(org-remember-finalize)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Remember mode (frist time) reports wrong type argument:stringp, nil
2008-12-22 23:48 Remember mode (frist time) reports wrong type argument: stringp, nil Charles Cave
@ 2008-12-23 22:04 ` Carsten Dominik
0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2008-12-23 22:04 UTC (permalink / raw
To: charles_cave; +Cc: emacs-orgmode
Hi Charles,
this is a strange bug which should not happen.
Basically what seems to happen is this:
I do
(find-file-no-select file)
followed by
(with-current-buffer (get-file-buffer file))
For some strange reason, get-file-buffer cannot find the buffer
even though it has just been created. Is there something strange
with the file name, is is accessed through a shortcut/link?
Can you please try this:
In the file where you want to store the item, insert "(buffer-file-
name)",
press `C-c C-e' with the cursor after that line and memorize the result.
Then compare with the result of evaluating
(expand-file-name "...")
where you insert the file name exactly as given in the remember template
you are using to produce this bug.
Do the two file name representations differ?
This is just for my curiosity - I have modified the code so that it
should
now work anyway, hopefully.
- Carsten
On Dec 23, 2008, at 12:48 AM, Charles Cave wrote:
> The first time I use Remember, after I file the note with C-c C-c
> I get a message: Wrong type argument: stringp, nil
> When I repeat C-c C-c the note is filed successfully.
>
> When I run Remember again, there is no problem.
>
> My org version: 6.15d
> My emacs version: 22.1.1 (GNU on Windows XP)
>
> Relevant part of .emacs file:
>
> (setq load-path (append load-path (list "L:/elisp")))
> (add-to-list 'load-path "L:/elisp/")
> (add-to-list 'load-path "L:/elisp/remember-1.9/")
>
> ;; 20th JUly 2007 following line:
> ;; (require 'org-export-latex)
>
> (autoload 'remember "remember" nil t)
> (autoload 'remember-region "remember" nil t)
>
> (setq org-directory "~/orgfiles/")
> (setq org-default-notes-file "~/.notes")
> (setq remember-annotation-functions '(org-remember-annotation))
> (setq remember-handler-functions '(org-remember-handler))
> (add-hook 'remember-mode-hook 'org-remember-apply-template)
> (define-key global-map "\C-cr" 'org-remember)
>
> (setq org-remember-templates
> '(("Todo" ?t "* TODO %? %^g\n %i\n " "E:/GTD/newgtd.org" "Tasks")
> ("Journal" ?j "\n* %^{topic} %T \n%i%?\n" "L:journal.org")
> ("Book" ?b "\n* %^{Book Title} %t :READING: \n%[l:/booktemp.txt]
> \n" "L:journal.org")
> ("Private" ?p "\n* %^{topic} %T \n%i%?\n" "E:/gtd/privnotes.org")
> ("Special" ?s "\n* My test\n %i \nLIne2 %x" "E:/gtd/
> privnotes.org")
> ("Contact" ?c "\n* %^{Name} :CONTACT:\n%[l:/contemp.txt]\n" "E:/
> gtd/privnotes.org")
> ))
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> Backward trace:
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> set-buffer(nil)
> (save-current-buffer (set-buffer (or visiting ...)) (unless (org-
> mode-p) (error "Target files for remember notes must be in Org-
> mode")) (save-excursion (save-
> restriction ... ... ... ... ... ... ... ... ... ...)))
> (with-current-buffer (or visiting (get-file-buffer file)) (unless
> (org-mode-p) (error "Target files for remember notes must be in Org-
> mode")) (save-excursion (save-
> restriction ... ... ... ... ... ... ... ... ... ...)))
> (let* ((visitp ...) (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) (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) (goto-char (point-min)) (if (re-
> search-forward "[ \n]+\\'" nil t) (replace-match "")) (goto-char
> (point-min)) (unless (looking-at org-outline-regexp) (insert ...)
> (backward-char 1) (when org-adapt-indentation ...)) (goto-char
> (point-min)) (if (re-search-forward "\n[ ]*\n[ \n]*\\'" nil t)
> (replace-match "\n\n") (if ... ...)) (goto-char (point-min)) (setq
> txt (buffer-string)) (org-save-markers-in-region (point-min) (point-
> max)) (when (and ... ...) (org-refile nil ...) (and visitp ...)
> (save-excursi!
> on ... ... ...) (throw ... t)) (if (not visiting) (find-file-
> noselect file)) (with-current-buffer (or visiting ...)
> (unless ... ...) (save-excursion ...)))
>
>
> (catch (quote quit) (if org-note-abort (throw ... nil)) (let*
> (... ... ... ... ... ... ... ... ... ... spos exitcmd level reversed
> txt) (when ... ...) (when previousp ...) (when clockp ...) (setq
> current-prefix-arg nil) (goto-char ...) (if ... ...) (goto-char ...)
> (unless ... ... ... ...) (goto-char ...) (if ... ... ...) (goto-
> char ...) (setq txt ...) (org-save-markers-in-region ... ...)
> (when ... ... ... ... ...) (if ... ...) (with-current-
> buffer ... ... ...)))
> org-remember-handler()
> run-hook-with-args-until-success(org-remember-handler)
> (if remember-all-handler-functions (run-hooks (quote remember-
> handler-functions)) (run-hook-with-args-until-success (quote
> remember-handler-functions)))
> (save-restriction (narrow-to-region b e) (if remember-all-handler-
> functions (run-hooks ...) (run-hook-with-args-until-success ...))
> (remember-destroy))
> (let ((b ...) (e ...)) (save-restriction (narrow-to-region b e) (if
> remember-all-handler-functions ... ...) (remember-destroy)))
> remember-region(1 412)
> remember-finalize()
> org-remember-finalize()
> call-interactively(org-remember-finalize)
>
>
>
>
> _______________________________________________
> 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] 2+ messages in thread
end of thread, other threads:[~2008-12-23 22:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-22 23:48 Remember mode (frist time) reports wrong type argument: stringp, nil Charles Cave
2008-12-23 22:04 ` Remember mode (frist time) reports wrong type argument:stringp, nil Carsten Dominik
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.