[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
org-capture: Capture template ‘g’: Match data clobbered by buffer modifi
From: |
Alex Bennée |
Subject: |
org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks |
Date: |
Fri, 15 Jul 2016 17:39:48 +0100 |
User-agent: |
mu4e 0.9.17; emacs 25.0.95.10 |
Hi,
This seems to have been introduced by commit:
3a9d6296b35e5317c497674d5725eb52699bd3b8
Author: Eli Zaretskii <address@hidden>
Avoid crashes when buffer modification hooks clobber match data
* src/search.c (Freplace_match): Error out if buffer modification
hooks triggered by buffer changes in replace_range, upcase-region,
and upcase-initials-region clobber the match data needed to be
adjusted for the replacement. (Bug#23869)
1 file changed, 13 insertions(+)
src/search.c | 13 +++++++++++++
I have a org-capture template set up that's triggered by a helper
function:
(defun my-capture-review-tags ()
"Return a list of DCO style tags for current buffer."
(let ((tags))
(save-excursion
(goto-char (point-min))
(while (re-search-forward my-dco-tag-re (point-max) t)
(add-to-list 'tags (match-string-no-properties 0))))
tags))
(defun my-org-maybe-capture-review-tag ()
"Check buffer for DCO tags and if found queue a review comment."
(interactive)
(let ((tags (my-capture-review-tags)))
(when tags
(kill-new (mapconcat 'identity tags "\n"))
(org-capture nil "g"))))
And the following template:
("g" "Save reference to review tag"
entry
(file+headline "review.org" "Review Tags")
"** %a\n%c" :immediate-finish t)
But I'm not sure what's going on. Obviously there is match data setup as
I snarf the tags but I don't care about them by the time I run the
template insert. It's hard to tell what hooks are running that might be
doing something like this.
I tried setting debug-on-message to:
(setq debug-on-message "\\(?:Match data clobbered by\\)")
But it wouldn't trigger at all so I'm a little stumped by what is going
on? Have I done something wrong in my code or triggered a bug somewhere else?
--
Alex Bennée
- org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks,
Alex Bennée <=
- Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks, Eli Zaretskii, 2016/07/15
- Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks, Alex Bennée, 2016/07/15
- Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks, Noam Postavsky, 2016/07/15
- Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks, Alex Bennée, 2016/07/15
- Please consider making Bug #23917 a blocker for 25.1 (was Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks), N. Jackson, 2016/07/16
- Re: Please consider making Bug #23917 a blocker for 25.1 (was Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks), Eli Zaretskii, 2016/07/16
- Re: Please consider making Bug #23917 a blocker for 25.1 (was Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks), John Wiegley, 2016/07/16
- Re: Please consider making Bug #23917 a blocker for 25.1 (was Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks), Alex Bennée, 2016/07/17
- Re: Please consider making Bug #23917 a blocker for 25.1 (was Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks), Eli Zaretskii, 2016/07/17