emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Felix Fernandes <felixfcaf@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Need help debugging org-capture-template failure invoked by keyboard macro
Date: Thu, 8 Jan 2015 20:24:59 +0000 (UTC)	[thread overview]
Message-ID: <loom.20150108T212256-110@post.gmane.org> (raw)
In-Reply-To: loom.20150108T201904-281@post.gmane.org


I'm no lisp expert, but I have attempted to indent the backtrace below for
easier reading.

Debugger entered--Lisp error: 
(error "Capture abort: (wrong-type-argument stringp
(file:~/org/todo.org::*Tasks Tasks))")

signal(error ("Capture abort: (wrong-type-argument stringp
(file:~/org/todo.org::*Tasks Tasks))"))

error("Capture abort: %s" (wrong-type-argument stringp
("file:~/org/todo.org::*Tasks" "Tasks")))

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

(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(jj record)
execute-extended-command(nil "jj")
call-interactively(execute-extended-command nil nil)

      reply	other threads:[~2015-01-08 20:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08 19:26 Need help debugging org-capture-template failure invoked by keyboard macro Felix Fernandes
2015-01-08 20:24 ` Felix Fernandes [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20150108T212256-110@post.gmane.org \
    --to=felixfcaf@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).