From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felix Fernandes Subject: Need help debugging org-capture-template failure invoked by keyboard macro Date: Thu, 8 Jan 2015 19:26:35 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9IkQ-0003gS-Be for emacs-orgmode@gnu.org; Thu, 08 Jan 2015 14:28:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9IkM-0007B9-Pk for emacs-orgmode@gnu.org; Thu, 08 Jan 2015 14:27:58 -0500 Received: from plane.gmane.org ([80.91.229.3]:51352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9IkM-0007B2-ED for emacs-orgmode@gnu.org; Thu, 08 Jan 2015 14:27:54 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Y9IkD-00057G-Iq for emacs-orgmode@gnu.org; Thu, 08 Jan 2015 20:27:45 +0100 Received: from 216.1.169.18 ([216.1.169.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Jan 2015 20:27:45 +0100 Received: from felixfcaf by 216.1.169.18 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Jan 2015 20:27:45 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I am trying to use the following keyboard test macro (fset 'jj [?\C-c ?c ?t ?j ?j return ?\C-c ?\C-c]) to invoke this capture template definition (setq org-capture-templates '(("t" "Todo" entry (file "~/org/j.org")))) Note that C-c c invokes M-x org-capture. Unfortunately, it produces the following error message: After 0 kbd macro iterations: byte-code: Capture abort: (wrong-type-argument stringp (file:~/org/todo.org::*Tasks Tasks)) I have produced the backtrace show below. The org-mode configuration is appended after the backtrace. Please help me debug and fix this problem. Thanks. Sincerely, Felix 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) ---------------------------------------------------- ORG-MODE CONFIGURATION Emacs : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) of 2014-02-22 on chindi10, modified by Debian Package: Org-mode version 8.2.10 (8.2.10-dist @ /usr/share/emacs/site-lisp/org/) current state: ============== (setq org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-agenda-use-time-grid nil org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-custom-commands '(("pa" "A-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"A\"") ("pb" "B-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"B\"") ("pc" "C-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"C\"") ("b" "Buy" tags "+CATEGORY=\"BUY\"") ("w" "Web" tags "+CATEGORY=\"WEB\"") ("k" "Books" tags "+CATEGORY=\"BOOKS\"") ("v" "Movies" tags "+CATEGORY=\"MOVIES\"") ("u" "Music" tags "+CATEGORY=\"MUSIC\"")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-deadline-warning-days 0 org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-capture-templates '(("t" "Todo" entry (file "~/org/j.org"))) org-agenda-sorting-strategy '((agenda priority-down) (todo priority-down category-keep) (tags priority-down category-keep) (search category-keep)) org-agenda-start-with-follow-mode t org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-agenda-prefix-format " %-11:c% s" org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes my-org-mode-hook) org-agenda-start-on-weekday nil org-agenda-mode-hook '(my-org-agenda-mode-hook) org-directory "~/org/" org-metadown-hook '(org-babel-pop-to-session-maybe) org-agenda-files '("~/org/todo.org" "~/org/home.org") org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-confirm-shell-link-function 'yes-or-no-p )