emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Debugger entered--Lisp error: (wrong-type-argument stringp nil)
@ 2014-01-18  9:06 Sebastien Vauban
  2014-01-18 13:27 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Vauban @ 2014-01-18  9:06 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

Since a couple of days, I have the following trouble when capturing in
one (or more?) files.

I've not yet understood the problem. Anybody having tips?

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  format(nil "Notes")
  (re-search-forward (format org-complex-heading-regexp-format (regexp-quote hd)) nil t)
  (if (re-search-forward (format org-complex-heading-regexp-format (regexp-quote hd)) nil t) (goto-char (point-at-bol)) (goto-char (point-max)) (or (bolp) (insert "\n")) (insert "* " hd "\n") (beginning-of-line 0))
  (let ((hd (nth 2 target))) (goto-char (point-min)) (if (derived-mode-p (quote org-mode)) nil (error "Target buffer \"%s\" for file+headline should be in Org mode" (current-buffer))) (if (re-search-forward (format org-complex-heading-regexp-format (regexp-quote hd)) nil t) (goto-char (point-at-bol)) (goto-char (point-max)) (or (bolp) (insert "\n")) (insert "* " hd "\n") (beginning-of-line 0)))
  (cond ((eq (car target) (quote file)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (setq target-entry-p nil)) ((eq (car target) (quote id)) (let ((loc (org-id-find (nth 1 target)))) (if (not loc) (error "Cannot find target ID \"%s\"" (nth 1 target)) (set-buffer (org-capture-target-buffer (car loc))) (widen) (org-capture-put-target-region-and-position) (goto-char (cdr loc))))) ((eq (car target) (quote file+headline)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (let ((hd (nth 2 target))) (goto-char (point-min)) (if (derived-mode-p (quote org-mode)) nil (error "Target buffer \"%s\" for file+headline should be in Org mode" (current-buffer))) (if (re-search-forward (format org-complex-heading-regexp-format (regexp-quote hd)) nil t) (goto-char (point-at-bol)) (goto-char (point-max)) (or (bolp) (insert "\n")) (insert "* " hd "\n") (beginning-of-line 0)))) ((eq (car target) (quote file+olp)) (let ((m (org-find-olp (cons (org-capture-expand-file ...) (cddr target))))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m))) ((eq (car target) (quote file+regexp)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (re-search-forward (nth 2 target) nil t) (progn (goto-char (if (org-capture-get :prepend) (match-beginning 0) (match-end 0))) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p (quote org-mode)) (org-at-heading-p)))) (error "No match for target regexp in file %s" (nth 1 target)))) ((memq (car target) (quote (file+datetree file+datetree+prompt))) (require (quote org-datetree)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (org-datetree-find-date-create (calendar-gregorian-from-absolute (cond (org-overriding-default-time (time-to-days org-overriding-default-time)) ((eq (car target) (quote file+datetree+prompt)) (let (...) (org-capture-put :default-time ...) (time-to-days prompt-time))) (t (org-today)))))) ((eq (car target) (quote file+function)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (funcall (nth 2 target)) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p (quote org-mode)) (org-at-heading-p)))) ((eq (car target) (quote function)) (funcall (nth 1 target)) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p (quote org-mode)) (org-at-heading-p)))) ((eq (car target) (quote clock)) (if (and (markerp org-clock-hd-marker) (marker-buffer org-clock-hd-marker)) (progn (set-buffer (marker-buffer org-clock-hd-marker)) (org-capture-put-target-region-and-position) (widen) (goto-char org-clock-hd-marker)) (error "No running clock that could be used as capture target"))) (t (error "Invalid capture target specification")))
  (save-excursion (cond ((eq (car target) (quote file)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (setq target-entry-p nil)) ((eq (car target) (quote id)) (let ((loc (org-id-find (nth 1 target)))) (if (not loc) (error "Cannot find target ID \"%s\"" (nth 1 target)) (set-buffer (org-capture-target-buffer (car loc))) (widen) (org-capture-put-target-region-and-position) (goto-char (cdr loc))))) ((eq (car target) (quote file+headline)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (let ((hd (nth 2 target))) (goto-char (point-min)) (if (derived-mode-p (quote org-mode)) nil (error "Target buffer \"%s\" for file+headline should be in Org mode" (current-buffer))) (if (re-search-forward (format org-complex-heading-regexp-format (regexp-quote hd)) nil t) (goto-char (point-at-bol)) (goto-char (point-max)) (or (bolp) (insert "\n")) (insert "* " hd "\n") (beginning-of-line 0)))) ((eq (car target) (quote file+olp)) (let ((m (org-find-olp (cons ... ...)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m))) ((eq (car target) (quote file+regexp)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (re-search-forward (nth 2 target) nil t) (progn (goto-char (if (org-capture-get :prepend) (match-beginning 0) (match-end 0))) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p ...) (org-at-heading-p)))) (error "No match for target regexp in file %s" (nth 1 target)))) ((memq (car target) (quote (file+datetree file+datetree+prompt))) (require (quote org-datetree)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (org-datetree-find-date-create (calendar-gregorian-from-absolute (cond (org-overriding-default-time (time-to-days org-overriding-default-time)) ((eq ... ...) (let ... ... ...)) (t (org-today)))))) ((eq (car target) (quote file+function)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (funcall (nth 2 target)) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p (quote org-mode)) (org-at-heading-p)))) ((eq (car target) (quote function)) (funcall (nth 1 target)) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p (quote org-mode)) (org-at-heading-p)))) ((eq (car target) (quote clock)) (if (and (markerp org-clock-hd-marker) (marker-buffer org-clock-hd-marker)) (progn (set-buffer (marker-buffer org-clock-hd-marker)) (org-capture-put-target-region-and-position) (widen) (goto-char org-clock-hd-marker)) (error "No running clock that could be used as capture target"))) (t (error "Invalid capture target specification"))) (if (and (featurep (quote org-crypt)) (org-at-encrypted-entry-p)) (progn (org-decrypt-entry) (setq decrypted-hl-pos (save-excursion (and (org-back-to-heading t) (point)))))) (org-capture-put :buffer (current-buffer) :pos (point) :target-entry-p target-entry-p :decrypted decrypted-hl-pos))
  (let ((target-entry-p t) decrypted-hl-pos) (setq target (or target (org-capture-get :target))) (save-excursion (cond ((eq (car target) (quote file)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (setq target-entry-p nil)) ((eq (car target) (quote id)) (let ((loc (org-id-find ...))) (if (not loc) (error "Cannot find target ID \"%s\"" (nth 1 target)) (set-buffer (org-capture-target-buffer ...)) (widen) (org-capture-put-target-region-and-position) (goto-char (cdr loc))))) ((eq (car target) (quote file+headline)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (let ((hd (nth 2 target))) (goto-char (point-min)) (if (derived-mode-p (quote org-mode)) nil (error "Target buffer \"%s\" for file+headline should be in Org mode" (current-buffer))) (if (re-search-forward (format org-complex-heading-regexp-format ...) nil t) (goto-char (point-at-bol)) (goto-char (point-max)) (or (bolp) (insert "\n")) (insert "* " hd "\n") (beginning-of-line 0)))) ((eq (car target) (quote file+olp)) (let ((m (org-find-olp ...))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m))) ((eq (car target) (quote file+regexp)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (re-search-forward (nth 2 target) nil t) (progn (goto-char (if ... ... ...)) (org-capture-put :exact-position (point)) (setq target-entry-p (and ... ...))) (error "No match for target regexp in file %s" (nth 1 target)))) ((memq (car target) (quote (file+datetree file+datetree+prompt))) (require (quote org-datetree)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (org-datetree-find-date-create (calendar-gregorian-from-absolute (cond (org-overriding-default-time ...) (... ...) (t ...))))) ((eq (car target) (quote file+function)) (set-buffer (org-capture-target-buffer (nth 1 target))) (org-capture-put-target-region-and-position) (widen) (funcall (nth 2 target)) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p (quote org-mode)) (org-at-heading-p)))) ((eq (car target) (quote function)) (funcall (nth 1 target)) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p (quote org-mode)) (org-at-heading-p)))) ((eq (car target) (quote clock)) (if (and (markerp org-clock-hd-marker) (marker-buffer org-clock-hd-marker)) (progn (set-buffer (marker-buffer org-clock-hd-marker)) (org-capture-put-target-region-and-position) (widen) (goto-char org-clock-hd-marker)) (error "No running clock that could be used as capture target"))) (t (error "Invalid capture target specification"))) (if (and (featurep (quote org-crypt)) (org-at-encrypted-entry-p)) (progn (org-decrypt-entry) (setq decrypted-hl-pos (save-excursion (and (org-back-to-heading t) (point)))))) (org-capture-put :buffer (current-buffer) :pos (point) :target-entry-p target-entry-p :decrypted decrypted-hl-pos)))
  org-capture-set-target-location()
  (cond ((equal entry "C") (customize-variable (quote org-capture-templates))) ((equal entry "q") (error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and (featurep (quote dired)) (car (rassq orig-buf dired-buffers)))) :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (if (equal goto 0) (org-capture-insert-template-here) (condition-case error (org-capture-place-template (equal (car (org-capture-get :target)) (quote function))) ((error quit) (if (and (buffer-base-buffer ...) (string-match "\\`CAPTURE-" ...)) (kill-buffer (current-buffer))) (set-window-configuration (org-capture-get :return-to-wconf)) (error "Capture template `%s': %s" (org-capture-get :key) (nth 1 error)))) (if (and (derived-mode-p (quote org-mode)) (org-capture-get :clock-in)) (condition-case nil (progn (if (org-clock-is-active) (org-capture-put :interrupted-clock ...)) (org-clock-in) (org-set-local (quote org-capture-clock-was-started) t)) (error "Could not start the clock in this capture buffer"))) (if (org-capture-get :immediate-finish) (org-capture-finalize)))))
  (let* ((orig-buf (current-buffer)) (annotation (if (and (boundp (quote org-capture-link-is-already-stored)) org-capture-link-is-already-stored) (plist-get org-store-link-plist :annotation) (condition-case nil (progn (org-store-link nil)) (error nil)))) (entry (or org-capture-entry (org-capture-select-template keys))) initial) (setq initial (or org-capture-initial (and (org-region-active-p) (buffer-substring (point) (mark))))) (if (stringp initial) (progn (remove-text-properties 0 (length initial) (quote (read-only t)) initial))) (if (stringp annotation) (progn (remove-text-properties 0 (length annotation) (quote (read-only t)) annotation))) (cond ((equal entry "C") (customize-variable (quote org-capture-templates))) ((equal entry "q") (error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and (featurep (quote dired)) (car (rassq orig-buf dired-buffers)))) :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (if (equal goto 0) (org-capture-insert-template-here) (condition-case error (org-capture-place-template (equal (car ...) (quote function))) ((error quit) (if (and ... ...) (kill-buffer ...)) (set-window-configuration (org-capture-get :return-to-wconf)) (error "Capture template `%s': %s" (org-capture-get :key) (nth 1 error)))) (if (and (derived-mode-p (quote org-mode)) (org-capture-get :clock-in)) (condition-case nil (progn (if ... ...) (org-clock-in) (org-set-local ... t)) (error "Could not start the clock in this capture buffer"))) (if (org-capture-get :immediate-finish) (org-capture-finalize))))))
  (cond ((equal goto (quote (4))) (org-capture-goto-target)) ((equal goto (quote (16))) (org-capture-goto-last-stored)) (t (let* ((orig-buf (current-buffer)) (annotation (if (and (boundp ...) org-capture-link-is-already-stored) (plist-get org-store-link-plist :annotation) (condition-case nil (progn ...) (error nil)))) (entry (or org-capture-entry (org-capture-select-template keys))) initial) (setq initial (or org-capture-initial (and (org-region-active-p) (buffer-substring (point) (mark))))) (if (stringp initial) (progn (remove-text-properties 0 (length initial) (quote (read-only t)) initial))) (if (stringp annotation) (progn (remove-text-properties 0 (length annotation) (quote (read-only t)) annotation))) (cond ((equal entry "C") (customize-variable (quote org-capture-templates))) ((equal entry "q") (error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and ... ...)) :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory ...)) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if ... ...) (error "Capture abort: %s" error))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (if (equal goto 0) (org-capture-insert-template-here) (condition-case error (org-capture-place-template ...) (... ... ... ...)) (if (and ... ...) (condition-case nil ... ...)) (if (org-capture-get :immediate-finish) (org-capture-finalize))))))))
  org-capture(nil)
  call-interactively(org-capture nil nil)
  command-execute(org-capture)
--8<---------------cut here---------------end--------------->8---

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  2014-01-18  9:06 Debugger entered--Lisp error: (wrong-type-argument stringp nil) Sebastien Vauban
@ 2014-01-18 13:27 ` Bastien
       [not found]   ` <8738klh13i.fsf-E3UqQZAQFPqWIDz0JBNUog@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2014-01-18 13:27 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hi Sébastien,

"Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:

> Since a couple of days, I have the following trouble when capturing in
> one (or more?) files.
>
> I've not yet understood the problem. Anybody having tips?

Can you check the value of `org-complex-heading-regexp-format'
in the buffer where the error happens?

-- 
 Bastien

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

* Re: Debugger entered--Lisp error: (wrong-type-argument stringp nil)
       [not found]   ` <8738klh13i.fsf-E3UqQZAQFPqWIDz0JBNUog@public.gmane.org>
@ 2014-01-22  9:10     ` Sebastien Vauban
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastien Vauban @ 2014-01-22  9:10 UTC (permalink / raw)
  To: public-emacs-orgmode-mXXj517/zsQ-wOFGN7rlS/M9smdsby/KFg



Hi Bastien,

> "Sebastien Vauban" writes:
>> Since a couple of days, I have the following trouble when capturing in
>> one (or more?) files.
>>
>> I've not yet understood the problem. Anybody having tips?
>
> Can you check the value of `org-complex-heading-regexp-format'
> in the buffer where the error happens?

After Org updates, and maybe others as well (?), I can't reproduce this
anymore. Closing it. Thanks.

Best regards,
  Seb

-- 
Sebastien Vauban

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

end of thread, other threads:[~2014-01-22  9:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-18  9:06 Debugger entered--Lisp error: (wrong-type-argument stringp nil) Sebastien Vauban
2014-01-18 13:27 ` Bastien
     [not found]   ` <8738klh13i.fsf-E3UqQZAQFPqWIDz0JBNUog@public.gmane.org>
2014-01-22  9:10     ` Sebastien Vauban

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