emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* minor bug: org-remember without target file buffer causes error
@ 2008-09-21  4:42 Samuel Wales
  2008-09-21  6:38 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Wales @ 2008-09-21  4:42 UTC (permalink / raw)
  To: emacs-orgmode

In org-mode 6.06b, c-c c-c after org-remember without first finding
the target file causes wrong type argument stringp, nil error.  Trying
it again works OK.
This is not a problem for me.

Perhaps the relevant function, org-remember-handler, can be broken
into smaller functions for easier debugging.

Thanks.


  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 ...) (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) (if (and ... org-remember-previous-location) (setq
file ... heading ... fastp t)) (setq current-prefix-arg nil)
(goto-char (point-min)) (if (re-search-forward "[
]+\\'" 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 "
[ 	]*
[ 	
]*\\'" nil t) (replace-match "

") (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 ...) (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) (if ...
...) (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 409)
  remember-finalize()
  org-remember-finalize()
  funcall(org-remember-finalize)
  (cond ((or ... org-occur-highlights
org-latex-fragment-image-overlays) (and ... ...)
(org-remove-occur-highlights)
(org-remove-latex-fragment-image-overlays) (message "Temporary
highlights/overlays removed from current buffer")) ((and ... ...)
(funcall org-finish-function)) ((org-at-property-p)
(call-interactively ...)) ((org-on-target-p) (call-interactively ...))
((org-on-heading-p) (call-interactively ...)) ((org-at-table\.el-p)
(require ...) (beginning-of-line 1) (re-search-forward "|" ...)
(call-interactively ...)) ((org-at-table-p)
(org-table-maybe-eval-formula) (if arg ... ...) (call-interactively
...)) ((org-at-item-checkbox-p) (call-interactively ...))
((org-at-item-p) (call-interactively ...)) ((save-excursion ... ...)
(beginning-of-line 1) (org-update-dblock)) ((save-excursion ... ...)
(cond ... ...)) (t (error "C-c C-c can do nothing useful at this
location.")))
  (let ((org-enable-table-editor t)) (cond (... ... ... ... ...) (...
...) (... ...) (... ...) (... ...) (... ... ... ... ...) (... ... ...
...) (... ...) (... ...) (... ... ...) (... ...) (t ...)))
  org-ctrl-c-ctrl-c(nil)
  call-interactively(org-ctrl-c-ctrl-c)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: minor bug: org-remember without target file buffer causes error
  2008-09-21  4:42 minor bug: org-remember without target file buffer causes error Samuel Wales
@ 2008-09-21  6:38 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2008-09-21  6:38 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Hi Samuel,

I cannot reproduce this bug.  Please try again with 6.07b, and if it  
persists, make me a test case with configuration.  Thanks.

- Carsten

P.S.  Yes, org-remember-handler is a monster.......

On Sep 21, 2008, at 6:42 AM, Samuel Wales wrote:

> In org-mode 6.06b, c-c c-c after org-remember without first finding
> the target file causes wrong type argument stringp, nil error.  Trying
> it again works OK.
> This is not a problem for me.
>
> Perhaps the relevant function, org-remember-handler, can be broken
> into smaller functions for easier debugging.
>
> Thanks.
>
>
>  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 ...) (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) (if (and ... org-remember-previous-location) (setq
> file ... heading ... fastp t)) (setq current-prefix-arg nil)
> (goto-char (point-min)) (if (re-search-forward "[
> ]+\\'" 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 "
> [ 	]*
> [ 	
> ]*\\'" nil t) (replace-match "
>
> ") (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 ...) (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) (if ...
> ...) (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 409)
>  remember-finalize()
>  org-remember-finalize()
>  funcall(org-remember-finalize)
>  (cond ((or ... org-occur-highlights
> org-latex-fragment-image-overlays) (and ... ...)
> (org-remove-occur-highlights)
> (org-remove-latex-fragment-image-overlays) (message "Temporary
> highlights/overlays removed from current buffer")) ((and ... ...)
> (funcall org-finish-function)) ((org-at-property-p)
> (call-interactively ...)) ((org-on-target-p) (call-interactively ...))
> ((org-on-heading-p) (call-interactively ...)) ((org-at-table\.el-p)
> (require ...) (beginning-of-line 1) (re-search-forward "|" ...)
> (call-interactively ...)) ((org-at-table-p)
> (org-table-maybe-eval-formula) (if arg ... ...) (call-interactively
> ...)) ((org-at-item-checkbox-p) (call-interactively ...))
> ((org-at-item-p) (call-interactively ...)) ((save-excursion ... ...)
> (beginning-of-line 1) (org-update-dblock)) ((save-excursion ... ...)
> (cond ... ...)) (t (error "C-c C-c can do nothing useful at this
> location.")))
>  (let ((org-enable-table-editor t)) (cond (... ... ... ... ...) (...
> ...) (... ...) (... ...) (... ...) (... ... ... ... ...) (... ... ...
> ...) (... ...) (... ...) (... ... ...) (... ...) (t ...)))
>  org-ctrl-c-ctrl-c(nil)
>  call-interactively(org-ctrl-c-ctrl-c)
>
>
> _______________________________________________
> 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-09-21  6:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-21  4:42 minor bug: org-remember without target file buffer causes error Samuel Wales
2008-09-21  6:38 ` Carsten Dominik

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).