From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alex =?utf-8?Q?Benn=C3=A9e?= Newsgroups: gmane.emacs.devel Subject: org-capture: Capture template =?utf-8?B?4oCYZ+KAmTo=?= Match data clobbered by buffer modification hooks Date: Fri, 15 Jul 2016 17:39:48 +0100 Message-ID: <87vb066ejv.fsf@linaro.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1468600823 17249 80.91.229.3 (15 Jul 2016 16:40:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Jul 2016 16:40:23 +0000 (UTC) Cc: Eli Zaretskii To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 15 18:40:13 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bO69g-0003JI-FO for ged-emacs-devel@m.gmane.org; Fri, 15 Jul 2016 18:40:00 +0200 Original-Received: from localhost ([::1]:33765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO69f-0004qV-Dr for ged-emacs-devel@m.gmane.org; Fri, 15 Jul 2016 12:39:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO69Z-0004qP-FG for emacs-devel@gnu.org; Fri, 15 Jul 2016 12:39:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bO69W-0006Ah-4k for emacs-devel@gnu.org; Fri, 15 Jul 2016 12:39:53 -0400 Original-Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:35925) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO69V-00069x-IQ for emacs-devel@gnu.org; Fri, 15 Jul 2016 12:39:50 -0400 Original-Received: by mail-wm0-x231.google.com with SMTP id f126so32726084wma.1 for ; Fri, 15 Jul 2016 09:39:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=user-agent:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HYSREZQNE9/pIMnRGKGkAtNabdU06AsPr1XmLPbA3P0=; b=XtHy8hx1zfDbmI6CIOhDDuhjMZOQBsia44Ur8+B1L7HzIN3yvCUTSCSoNuVg8rGD+f uoSakDbaLfrDkrIe30psVfgNXjtPKQ83DR5Kp9TM3JPMOCY8Asjo/Iql6c0EXVvgr95n P8TZ7K5Sq08apc9O8fGtAXKvoVzYdARnxSdRc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:user-agent:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=HYSREZQNE9/pIMnRGKGkAtNabdU06AsPr1XmLPbA3P0=; b=LIJ2gIDdG9E+RI65p/wff/33aolEaftOJ+8zwFOnwGJNzaZpui5eYWDs3BmhPlmxYw 19YmWrkyp/2ikSYmJHafs4CDE82wRBZYYZBLO93wevvaPmA7HE/IBMFI9a4SkZkkCH5e KWKjygEe4mZ0WObzu4eYXXIiPRAoVVopWo3+y7U15lovhyi5JeEH7fr+aS3GlBhoztFv fR2/CeaP2PCCgeXOh+h/O8T51Y8wegUKhqCuVmz2kusMYthR18CPU9rbSPJiEhjkHk5M 8XwzVc4zpYz0xExEWco9QGySLYBNPlBmjxS71C+tzP7iudTaQKPQA3JfecgVwPlNOocG DY6g== X-Gm-Message-State: ALyK8tLYqJuO8z7MSZbUjs+CxHY2xBzTSKUsZg10e1+6olQW9ITqmcQBDkVEoQZz44gLsWWz X-Received: by 10.28.166.140 with SMTP id p134mr2043777wme.21.1468600787180; Fri, 15 Jul 2016 09:39:47 -0700 (PDT) Original-Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m125sm6750267wmm.8.2016.07.15.09.39.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jul 2016 09:39:45 -0700 (PDT) Original-Received: from zen (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTPS id F3ADD3E006F; Fri, 15 Jul 2016 17:39:48 +0100 (BST) User-agent: mu4e 0.9.17; emacs 25.0.95.10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:205734 Archived-At: Hi, This seems to have been introduced by commit: 3a9d6296b35e5317c497674d5725eb52699bd3b8 Author: Eli Zaretskii 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