From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: =?UTF-8?B?YnVnIzIzOTE3OiBQbGVhc2UgY29uc2lkZXIgbWFraW5nIEJ1ZyAj?= =?UTF-8?B?MjM5MTcgYSBibG9ja2VyIGZvciAyNS4xICh3YXMgUmU6IG9yZy1jYXB0dXJl?= =?UTF-8?B?OiBDYXB0dXJlIHRlbXBsYXRlIOKAmGfigJk6IE1hdGNoIGRhdGEgY2xvYmJl?= =?UTF-8?B?cmVkIGJ5IGJ1ZmZlciBtb2RpZmljYXRpb24gaG9va3Mp?= Date: Mon, 18 Jul 2016 17:59:47 +0100 Message-ID: <87eg6q2870.fsf__26366.2811987617$1468862105$gmane$org@ucl.ac.uk> References: <87vb066ejv.fsf@linaro.org> <8360s67qcp.fsf@gnu.org> <87bn1yyaui.fsf@linaro.org> <87mvlhmv0x.fsf_-_@moondust.awandering> <837fcl5zs9.fsf@gnu.org> <87a8hgkwcb.fsf@linaro.org> <8360s42mcb.fsf@gnu.org> <9613abde4dbd48fdb2b5e780101a13a0@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPBts-0006E8-So for emacs-orgmode@gnu.org; Mon, 18 Jul 2016 13:00:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPBtq-0004qx-8J for emacs-orgmode@gnu.org; Mon, 18 Jul 2016 13:00:11 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <9613abde4dbd48fdb2b5e780101a13a0@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> (Kaushal Modi's message of "Mon, 18 Jul 2016 14:50:20 +0000") 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" To: Kaushal Modi Cc: "23917@debbugs.gnu.org" <23917@debbugs.gnu.org>, Eli Zaretskii , "jwiegley@gmail.com" On Monday, 18 Jul 2016 at 14:50, Kaushal Modi wrote: > @Eric Would it be possible for you to provide a recipe to recreate > this issue from an emacs -Q session? With emacs-snapshot (aka 25.0.95.1), and the following emacs-minimal.el file: --8<---------------cut here---------------start------------->8--- (add-to-list 'load-path "~/git/org-mode/lisp") (require 'org) (setq org-capture-templates '(("t" "todo" entry (file+datetree "/tmp/tasks.= org") "* TODO %^{Task} %^G\nSCHEDULED: %t\n%i%?"))) --8<---------------cut here---------------end--------------->8--- the following sequence: --8<---------------cut here---------------start------------->8--- emacs -Q -l emacs-minimal.el M-x org-capture RET t this is a test RET testing RET --8<---------------cut here---------------end--------------->8--- gives --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (error "Capture template =E2=80=98t=E2=80=99:= Match data clobbered by buffer modification hooks") signal(error ("Capture template =E2=80=98t=E2=80=99: Match data clobbered= by buffer modification hooks")) error("Capture template `%s': %s" "t" "Match data clobbered by buffer mod= ification hooks") (condition-case error (org-capture-place-template (equal (car (org-captur= e-get :target)) (quote function))) ((error quit) (if (and (buffer-base-buff= er (current-buffer)) (string-match "\\`CAPTURE-" (buffer-name))) (kill-buff= er (current-buffer))) (set-window-configuration (org-capture-get :return-to= -wconf)) (error "Capture template `%s': %s" (org-capture-get :key) (nth 1 e= rror)))) (if (equal goto 0) (org-capture-insert-template-here) (condition-case err= or (org-capture-place-template (equal (car (org-capture-get :target)) (quot= e function))) ((error quit) (if (and (buffer-base-buffer (current-buffer)) = (string-match "\\`CAPTURE-" (buffer-name))) (kill-buffer (current-buffer)))= (set-window-configuration (org-capture-get :return-to-wconf)) (error "Capt= ure template `%s': %s" (org-capture-get :key) (nth 1 error)))) (if (and (de= rived-mode-p (quote org-mode)) (org-capture-get :clock-in)) (condition-case= nil (progn (if (org-clock-is-active) (org-capture-put :interrupted-clock (= copy-marker org-clock-marker))) (org-clock-in) (set (make-local-variable (q= uote org-capture-clock-was-started)) t)) (error "Could not start the clock = in this capture buffer"))) (if (org-capture-get :immediate-finish) (org-cap= ture-finalize))) (cond ((equal entry "C") (customize-variable (quote org-capture-templates= ))) ((equal entry "q") (user-error "Abort")) (t (org-capture-set-plist entr= y) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :o= riginal-file (or (buffer-file-name orig-buf) (and (featurep (quote dired)) = (car (rassq orig-buf dired-buffers)))) :original-file-nondirectory (and (bu= ffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf= ))) :annotation annotation :initial initial :return-to-wconf (current-windo= w-configuration) :default-time (or org-overriding-default-time (org-current= -time))) (org-capture-set-target-location) (condition-case error (org-captu= re-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 go= to 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-captur= e-get :return-to-wconf)) (error "Capture template `%s': %s" (org-capture-ge= t :key) (nth 1 error)))) (if (and (derived-mode-p (quote org-mode)) (org-ca= pture-get :clock-in)) (condition-case nil (progn (if (org-clock-is-active) = (org-capture-put :interrupted-clock ...)) (org-clock-in) (set (make-local-v= ariable ...) 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 or= g-capture-link-is-already-stored)) org-capture-link-is-already-stored) (pli= st-get org-store-link-plist :annotation) (condition-case nil (progn (org-st= ore-link nil)) (error nil)))) (entry (or org-capture-entry (org-capture-sel= ect-template keys))) initial) (setq initial (or org-capture-initial (and (o= rg-region-active-p) (buffer-substring (point) (mark))))) (if (stringp initi= al) (progn (remove-text-properties 0 (length initial) (quote (read-only t))= initial))) (if (stringp annotation) (progn (remove-text-properties 0 (leng= th annotation) (quote (read-only t)) annotation))) (cond ((equal entry "C")= (customize-variable (quote org-capture-templates))) ((equal entry "q") (us= er-error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-templa= te) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-f= ile-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-capt= ure-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 (ca= r ...) (quote function))) ((error quit) (if (and ... ...) (kill-buffer ...)= ) (set-window-configuration (org-capture-get :return-to-wconf)) (error "Cap= ture template `%s': %s" (org-capture-get :key) (nth 1 error)))) (if (and (d= erived-mode-p (quote org-mode)) (org-capture-get :clock-in)) (condition-cas= e nil (progn (if ... ...) (org-clock-in) (set ... t)) (error "Could not sta= rt the clock in this capture buffer"))) (if (org-capture-get :immediate-fin= ish) (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-b= uffer)) (annotation (if (and (boundp ...) org-capture-link-is-already-store= d) (plist-get org-store-link-plist :annotation) (condition-case nil (progn = ...) (error nil)))) (entry (or org-capture-entry (org-capture-select-templa= te 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 annotat= ion) (quote (read-only t)) annotation))) (cond ((equal entry "C") (customiz= e-variable (quote org-capture-templates))) ((equal entry "q") (user-error "= Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-c= apture-put :original-buffer orig-buf :original-file (or (buffer-file-name o= rig-buf) (and ... ...)) :original-file-nondirectory (and (buffer-file-name = orig-buf) (file-name-nondirectory ...)) :annotation annotation :initial ini= tial :return-to-wconf (current-window-configuration) :default-time (or org-= overriding-default-time (org-current-time))) (org-capture-set-target-locati= on) (condition-case error (org-capture-put :template (org-capture-fill-temp= late)) ((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) funcall-interactively(org-capture nil) call-interactively(org-capture record nil) command-execute(org-capture record) execute-extended-command(nil "org-capture" "org-capture") funcall-interactively(execute-extended-command nil "org-capture" "org-cap= ture") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) --8<---------------cut here---------------end--------------->8--- and the /tmp/tasks.org file looks like this: --8<---------------cut here---------------start------------->8--- * 2016 ** 2016-07 July *** 2016-07-18 Monday **** TODO this is a test :testing: SCHEDULED: <2016-07-18 Mon> %? --8<---------------cut here---------------end--------------->8--- The file did not exist before org-capture was invoked so we can see that the majority of the template was invoked. HTH, eric --=20 : Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.4-1049-g481709