From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Define org-capture-templates with variables via customize Date: Mon, 30 Mar 2015 10:49:41 -0400 Message-ID: <87sicm35h6.fsf@alphaville.usersys.redhat.com> References: <86oanbxh56.fsf@kcals2.maillard.im> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycb14-00033x-9i for emacs-orgmode@gnu.org; Mon, 30 Mar 2015 10:50:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ycb11-00061G-Ft for emacs-orgmode@gnu.org; Mon, 30 Mar 2015 10:50:14 -0400 Received: from plane.gmane.org ([80.91.229.3]:51037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycb11-000619-4p for emacs-orgmode@gnu.org; Mon, 30 Mar 2015 10:50:11 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ycb0z-0008SL-Od for emacs-orgmode@gnu.org; Mon, 30 Mar 2015 16:50:09 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 Mar 2015 16:50:09 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 Mar 2015 16:50:09 +0200 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 Trying to just read Xavier's email message in Gnus, I get the following backtrace (with unprintable characters replaced by periods) - to me, this looks like a bug somewhere, but not sure where: Debugger entered--Lisp error: (error "Before first headline at position 114= in buffer *fontification*<2>") signal(error ("Before first headline at position 114 in buffer *fontifica= tion*<2>")) error("Before first headline at position %d in buffer %s" 114 #>) (condition-case nil (outline-back-to-heading invisible-ok) (error (error = "Before first headline at position %d in buffer %s" (point) (current-buffer= )))) org-back-to-heading(t) (save-excursion (org-back-to-heading t) (if (symbolp tprop) (put-text-pro= perty (point) (or (outline-next-heading) (point-max)) tprop p) (mapc (funct= ion (lambda (al) (save-excursion (put-text-property (point-at-bol) (or ... = ...) (car al) (funcall ... p))))) tprop))) org-refresh-property(((effort . identity) (effort-minutes . org-duration-= string-to-minutes)) "%^{effort|1:00|0:30|0:05|0:15|2:00|3:00|4:00}") (while (re-search-forward (concat "^[ ]*:" dprop ": +\\(.*\\)[ ]*$") ni= l t) (org-refresh-property tprop (org-match-string-no-properties 1))) (save-restriction (widen) (goto-char (point-min)) (while (re-search-forwa= rd (concat "^[ ]*:" dprop ": +\\(.*\\)[ ]*$") nil t) (org-refresh-propert= y tprop (org-match-string-no-properties 1)))) (save-excursion (save-restriction (widen) (goto-char (point-min)) (while = (re-search-forward (concat "^[ ]*:" dprop ": +\\(.*\\)[ ]*$") nil t) (org= -refresh-property tprop (org-match-string-no-properties 1))))) (progn (save-excursion (save-restriction (widen) (goto-char (point-min)) = (while (re-search-forward (concat "^[ ]*:" dprop ": +\\(.*\\)[ ]*$") nil = t) (org-refresh-property tprop (org-match-string-no-properties 1)))))) (unwind-protect (progn (save-excursion (save-restriction (widen) (goto-ch= ar (point-min)) (while (re-search-forward (concat "^[ ]*:" dprop ": +\\(.*= \\)[ ]*$") nil t) (org-refresh-property tprop (org-match-string-no-propert= ies 1)))))) (if modified nil (restore-buffer-modified-p nil))) (let* ((modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-= only t) (inhibit-modification-hooks t)) (unwind-protect (progn (save-excurs= ion (save-restriction (widen) (goto-char (point-min)) (while (re-search-for= ward (concat "^[ ]*:" dprop ": +\\(.*\\)[ ]*$") nil t) (org-refresh-prope= rty tprop (org-match-string-no-properties 1)))))) (if modified nil (restore= -buffer-modified-p nil)))) (let ((case-fold-search t) (inhibit-read-only t)) (let* ((modified (buffe= r-modified-p)) (buffer-undo-list t) (inhibit-read-only t) (inhibit-modifica= tion-hooks t)) (unwind-protect (progn (save-excursion (save-restriction (wi= den) (goto-char (point-min)) (while (re-search-forward ... nil t) (org-refr= esh-property tprop ...))))) (if modified nil (restore-buffer-modified-p nil= ))))) org-refresh-properties("Effort" ((effort . identity) (effort-minutes . or= g-duration-string-to-minutes))) org-refresh-effort-properties() (let ((buffer-undo-list t) (inhibit-modification-hooks t)) (and org-start= up-with-beamer-mode (org-beamer-mode)) (if org-startup-align-all-tables (pr= ogn (org-table-map-tables (quote org-table-align) (quote quietly)))) (if or= g-startup-with-inline-images (progn (org-display-inline-images))) (if org-s= tartup-with-latex-preview (progn (org-toggle-latex-fragment))) (if org-inhi= bit-startup-visibility-stuff nil (org-set-startup-visibility)) (org-refresh= -effort-properties)) (unwind-protect (let ((buffer-undo-list t) (inhibit-modification-hooks t)= ) (and org-startup-with-beamer-mode (org-beamer-mode)) (if org-startup-alig= n-all-tables (progn (org-table-map-tables (quote org-table-align) (quote qu= ietly)))) (if org-startup-with-inline-images (progn (org-display-inline-ima= ges))) (if org-startup-with-latex-preview (progn (org-toggle-latex-fragment= ))) (if org-inhibit-startup-visibility-stuff nil (org-set-startup-visibilit= y)) (org-refresh-effort-properties)) (set-buffer-modified-p --was-modified)) (let ((--was-modified (buffer-modified-p))) (unwind-protect (let ((buffer= -undo-list t) (inhibit-modification-hooks t)) (and org-startup-with-beamer-= mode (org-beamer-mode)) (if org-startup-align-all-tables (progn (org-table-= map-tables (quote org-table-align) (quote quietly)))) (if org-startup-with-= inline-images (progn (org-display-inline-images))) (if org-startup-with-lat= ex-preview (progn (org-toggle-latex-fragment))) (if org-inhibit-startup-vis= ibility-stuff nil (org-set-startup-visibility)) (org-refresh-effort-propert= ies)) (set-buffer-modified-p --was-modified))) (if org-inhibit-startup nil (let ((--was-modified (buffer-modified-p))) (= unwind-protect (let ((buffer-undo-list t) (inhibit-modification-hooks t)) (= and org-startup-with-beamer-mode (org-beamer-mode)) (if org-startup-align-a= ll-tables (progn (org-table-map-tables (quote org-table-align) (quote quiet= ly)))) (if org-startup-with-inline-images (progn (org-display-inline-images= ))) (if org-startup-with-latex-preview (progn (org-toggle-latex-fragment)))= (if org-inhibit-startup-visibility-stuff nil (org-set-startup-visibility))= (org-refresh-effort-properties)) (set-buffer-modified-p --was-modified)))) (let ((delay-mode-hooks t)) (outline-mode) (setq major-mode (quote org-mo= de)) (setq mode-name "Org") (progn (if (get (quote outline-mode) (quote mod= e-class)) (put (quote org-mode) (quote mode-class) (get (quote outline-mode= ) (quote mode-class)))) (if (keymap-parent org-mode-map) nil (set-keymap-pa= rent org-mode-map (current-local-map))) (let ((parent (char-table-parent or= g-mode-syntax-table))) (if (and parent (not (eq parent (standard-syntax-tab= le)))) nil (set-char-table-parent org-mode-syntax-table (syntax-table)))) (= if (or (abbrev-table-get org-mode-abbrev-table :parents) (eq org-mode-abbre= v-table local-abbrev-table)) nil (abbrev-table-put org-mode-abbrev-table :p= arents (list local-abbrev-table)))) (use-local-map org-mode-map) (set-synta= x-table org-mode-syntax-table) (setq local-abbrev-table org-mode-abbrev-tab= le) (if nil (if (boundp (quote outline-mode-menu-heading)) (progn (easy-men= u-remove outline-mode-menu-heading) (easy-menu-remove outline-mode-menu-sho= w) (easy-menu-remove outline-mode-menu-hide))) (define-key org-mode-map [me= nu-bar headings] (quote undefined)) (define-key org-mode-map [menu-bar hide= ] (quote undefined)) (define-key org-mode-map [menu-bar show] (quote undefi= ned))) (org-load-modules-maybe) (easy-menu-add org-org-menu) (easy-menu-add= org-tbl-menu) (org-install-agenda-files-menu) (if org-descriptive-links (a= dd-to-invisibility-spec (quote (org-link)))) (add-to-invisibility-spec (quo= te (org-cwidth))) (add-to-invisibility-spec (quote (org-hide-block . t))) (= if nil (progn (org-set-local (quote line-move-ignore-invisible) t))) (org-s= et-local (quote outline-regexp) org-outline-regexp) (org-set-local (quote o= utline-level) (quote org-outline-level)) (setq bidi-paragraph-direction (qu= ote left-to-right)) (if (and org-ellipsis (fboundp (quote set-display-table= -slot)) (boundp (quote buffer-display-table)) (fboundp (quote make-glyph-co= de))) (progn (if org-display-table nil (setq org-display-table (make-displa= y-table))) (set-display-table-slot org-display-table 4 (vconcat (mapcar (fu= nction (lambda ... ...)) (if (stringp org-ellipsis) org-ellipsis "...")))) = (setq buffer-display-table org-display-table))) (org-set-regexps-and-option= s) (org-set-font-lock-defaults) (if (and org-tag-faces (not org-tags-specia= l-faces-re)) (progn (org-set-tag-faces (quote org-tag-faces) org-tag-faces)= )) (org-set-local (quote calc-embedded-open-mode) "# ") (modify-syntax-entr= y 64 "w") (modify-syntax-entry 34 "\"") (modify-syntax-entry 92 "_") (modif= y-syntax-entry 126 "_") (if org-startup-truncated (setq truncate-lines t)) = (if org-startup-indented (progn (require (quote org-indent)) (org-indent-mo= de 1))) (org-set-local (quote font-lock-unfontify-region-function) (quote o= rg-unfontify-region)) (org-set-local (quote org-table-may-need-update) t) (= org-add-hook (quote before-change-functions) (quote org-before-change-funct= ion) nil (quote local)) (org-add-hook (quote kill-buffer-hook) (quote org-c= heck-running-clock) nil (quote local)) (org-macro-initialize-templates) (or= g-update-radio-target-regexp) (org-set-local (quote indent-line-function) (= quote org-indent-line)) (org-set-local (quote indent-region-function) (quot= e org-indent-region)) (org-setup-filling) (org-setup-comments-handling) (or= g-element-cache-reset) (org-set-local (quote beginning-of-defun-function) (= quote org-backward-element)) (org-set-local (quote end-of-defun-function) (= function (lambda nil (if (not (org-at-heading-p)) (org-forward-element) (or= g-forward-element) (forward-char -1))))) (org-set-local (quote next-error-f= unction) (quote org-occur-next-match)) (if org-enforce-todo-dependencies (a= dd-hook (quote org-blocker-hook) (quote org-block-todo-from-children-or-sib= lings-or-parent)) (remove-hook (quote org-blocker-hook) (quote org-block-to= do-from-children-or-siblings-or-parent))) (if org-enforce-todo-checkbox-dep= endencies (add-hook (quote org-blocker-hook) (quote org-block-todo-from-che= ckboxes)) (remove-hook (quote org-blocker-hook) (quote org-block-todo-from-= checkboxes))) (org-set-local (quote align-mode-rules-list) (quote ((org-in-= buffer-settings (regexp . "^[ ]*#\\+[A-Z_]+:\\(\\s-*\\)\\S-+") (modes quot= e (org-mode)))))) (org-set-local (quote imenu-create-index-function) (quote= org-imenu-get-tree)) ...) (progn (make-local-variable (quote delay-mode-hooks)) (let ((delay-mode-h= ooks t)) (outline-mode) (setq major-mode (quote org-mode)) (setq mode-name = "Org") (progn (if (get (quote outline-mode) (quote mode-class)) (put (quote= org-mode) (quote mode-class) (get (quote outline-mode) (quote mode-class))= )) (if (keymap-parent org-mode-map) nil (set-keymap-parent org-mode-map (cu= rrent-local-map))) (let ((parent (char-table-parent org-mode-syntax-table))= ) (if (and parent (not (eq parent ...))) nil (set-char-table-parent org-mod= e-syntax-table (syntax-table)))) (if (or (abbrev-table-get org-mode-abbrev-= table :parents) (eq org-mode-abbrev-table local-abbrev-table)) nil (abbrev-= table-put org-mode-abbrev-table :parents (list local-abbrev-table)))) (use-= local-map org-mode-map) (set-syntax-table org-mode-syntax-table) (setq loca= l-abbrev-table org-mode-abbrev-table) (if nil (if (boundp (quote outline-mo= de-menu-heading)) (progn (easy-menu-remove outline-mode-menu-heading) (easy= -menu-remove outline-mode-menu-show) (easy-menu-remove outline-mode-menu-hi= de))) (define-key org-mode-map [menu-bar headings] (quote undefined)) (defi= ne-key org-mode-map [menu-bar hide] (quote undefined)) (define-key org-mode= -map [menu-bar show] (quote undefined))) (org-load-modules-maybe) (easy-men= u-add org-org-menu) (easy-menu-add org-tbl-menu) (org-install-agenda-files-= menu) (if org-descriptive-links (add-to-invisibility-spec (quote (org-link)= ))) (add-to-invisibility-spec (quote (org-cwidth))) (add-to-invisibility-sp= ec (quote (org-hide-block . t))) (if nil (progn (org-set-local (quote line-= move-ignore-invisible) t))) (org-set-local (quote outline-regexp) org-outli= ne-regexp) (org-set-local (quote outline-level) (quote org-outline-level)) = (setq bidi-paragraph-direction (quote left-to-right)) (if (and org-ellipsis= (fboundp (quote set-display-table-slot)) (boundp (quote buffer-display-tab= le)) (fboundp (quote make-glyph-code))) (progn (if org-display-table nil (s= etq org-display-table (make-display-table))) (set-display-table-slot org-di= splay-table 4 (vconcat (mapcar (function ...) (if ... org-ellipsis "...")))= ) (setq buffer-display-table org-display-table))) (org-set-regexps-and-opti= ons) (org-set-font-lock-defaults) (if (and org-tag-faces (not org-tags-spec= ial-faces-re)) (progn (org-set-tag-faces (quote org-tag-faces) org-tag-face= s))) (org-set-local (quote calc-embedded-open-mode) "# ") (modify-syntax-en= try 64 "w") (modify-syntax-entry 34 "\"") (modify-syntax-entry 92 "_") (mod= ify-syntax-entry 126 "_") (if org-startup-truncated (setq truncate-lines t)= ) (if org-startup-indented (progn (require (quote org-indent)) (org-indent-= mode 1))) (org-set-local (quote font-lock-unfontify-region-function) (quote= org-unfontify-region)) (org-set-local (quote org-table-may-need-update) t)= (org-add-hook (quote before-change-functions) (quote org-before-change-fun= ction) nil (quote local)) (org-add-hook (quote kill-buffer-hook) (quote org= -check-running-clock) nil (quote local)) (org-macro-initialize-templates) (= org-update-radio-target-regexp) (org-set-local (quote indent-line-function)= (quote org-indent-line)) (org-set-local (quote indent-region-function) (qu= ote org-indent-region)) (org-setup-filling) (org-setup-comments-handling) (= org-element-cache-reset) (org-set-local (quote beginning-of-defun-function)= (quote org-backward-element)) (org-set-local (quote end-of-defun-function)= (function (lambda nil (if (not (org-at-heading-p)) (org-forward-element) (= org-forward-element) (forward-char -1))))) (org-set-local (quote next-error= -function) (quote org-occur-next-match)) (if org-enforce-todo-dependencies = (add-hook (quote org-blocker-hook) (quote org-block-todo-from-children-or-s= iblings-or-parent)) (remove-hook (quote org-blocker-hook) (quote org-block-= todo-from-children-or-siblings-or-parent))) (if org-enforce-todo-checkbox-d= ependencies (add-hook (quote org-blocker-hook) (quote org-block-todo-from-c= heckboxes)) (remove-hook (quote org-blocker-hook) (quote org-block-todo-fro= m-checkboxes))) (org-set-local (quote align-mode-rules-list) (quote ((org-i= n-buffer-settings (regexp . "^[ ]*#\\+[A-Z_]+:\\(\\s-*\\)\\S-+") (modes qu= ote (org-mode)))))) (org-set-local (quote imenu-create-index-function) (quo= te org-imenu-get-tree)) ...)) org-mode() mm-display-inline-fontify((# ("text/x-org") nil n= il nil nil nil nil) org-mode) mm-display-org-inline((# ("text/x-org") nil nil n= il nil nil nil)) mm-display-inline((# ("text/x-org") nil nil nil n= il nil nil)) mm-display-part((# ("text/x-org") nil nil nil nil= nil nil) t) byte-code("\203..\306\211A.\242 \"\203..\307\300\310\"\210\202..\n\211.= \205\".\311\312=0B!!)\203/.r\nq\210\f)\2020.\f\203:.\306\313 \"\204x.\314.!= ?\205T.\315.8?\206T.\315.8@\316\232\206T.\317.!\211.*\203x.\320.!\203x.\321= .!\203l.\322.!\204r.\323 !\203x.\324.+\202\231...\325.\211.@;\203\210..@\20= 2\214..A@@)\326\"@)\327\232\203\231.\324.,.-GT\310..\211./.B.-B.-.+\203\357= ...\325.\211.@;\203\277..@\202\303..A@@)\326\"@)\330\232\203\357.\331\332n\= 204\327.\333\202\355.o\204\350.`S\206\341.`Sf\332=3D\203\354.\334\202\355.\= 335\"\210.+\203..\336 !\203.../.0=3D\203..\337../.+\206...*\205...,C#\210\3= 40 \210\324.1`...+\203\231..1\203..\341y\210`...2\212\310\342\343\217\210.3= ).4.5\344\345!\203^..6\211.\205O.\311\312=0B!!)\203^.r.6q\210.7)\202`..7\21= 1.8\204j.\324\202\204..9;\203y.\306.9.8\"\202\204..9:\205\204..8.9\235?\205= \212..:).:\346.\324\"\210+db\210\202\270..,\203\270..*\203\270..1\203\256.\= 341y\210`..\340 \210\347.!\210db\210\212\214..`}\210..;=3D\203\340.\350\310= \335\211.\211.@;\203\327..@\202\333..A@@)$\2021.\310.<.;\310.=3D\211.>\203.= ..>@\211.=3D;\204 ..=3DA@@\351\232\204 ..=3D.A\211.>\204\356.*\350\31= 0..<>G. ("text/x-org") nil ni= l nil nil nil nil)) gnus-mime-display-part((# ("text/x-org") nil nil = nil nil nil nil)) mapcar(gnus-mime-display-part ((# ("text/plain" (= charset . gnus-decoded)) nil (lambda nil (let ((inhibit-read-only t)) (dele= te-region # #))) nil nil nil= nil) (# ("text/x-org") nil nil nil nil nil nil) (#= ("text/plain" (charset . gnus-decoded)) nil nil ni= l nil nil nil) (# ("text/x-org") nil nil nil nil ni= l nil) (# ("text/plain" (charset . gnus-decoded)) n= il nil nil nil nil nil))) gnus-mime-display-mixed(((# ("text/plain" (charse= t . gnus-decoded)) nil (lambda nil (let ((inhibit-read-only t)) (delete-reg= ion # #))) nil nil nil nil) = (# ("text/x-org") nil nil nil nil nil nil) (# ("text/plain" (charset . gnus-decoded)) nil nil nil nil = nil nil) (# ("text/x-org") nil nil nil nil nil nil)= (# ("text/plain" (charset . gnus-decoded)) nil nil= nil nil nil nil))) gnus-mime-display-part(("multipart/mixed" (# ("te= xt/plain" (charset . gnus-decoded)) nil (lambda nil (let ((inhibit-read-onl= y t)) (delete-region # #))) = nil nil nil nil) (# ("text/x-org") nil nil nil nil = nil nil) (# ("text/plain" (charset . gnus-decoded))= nil nil nil nil nil nil) (# ("text/x-org") nil nil= nil nil nil nil) (# ("text/plain" (charset . gnus-= decoded)) nil nil nil nil nil nil))) gnus-display-mime() gnus-article-prepare-display() gnus-article-prepare(96536 nil) gnus-summary-display-article(96536) gnus-summary-next-page(nil) funcall-interactively(gnus-summary-next-page nil) call-interactively(gnus-summary-next-page nil nil) command-execute(gnus-summary-next-page)