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.bugs Subject: bug#23917: [O] bug#23917: bug#23917: Please consider making Bug #23917 a blocker for 25.1 (was Re: org-capture: Capture template =?UTF-8?Q?=E2=80=98g=E2=80=99:?= Match data clobbered by buffer modification hooks) Date: Wed, 20 Jul 2016 10:48:45 +0100 Message-ID: <877fcgmygy.fsf@linaro.org> 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> <87eg6rgmlg.fsf@gmail.com> <83lh0y24y6.fsf@gnu.org> <83eg6q1hbo.fsf@gnu.org> <83a8hd1vzi.fsf@gnu.org> <834m7l1u8u.fsf@gnu.org> <87a8hdmuce.fsf@linaro.org> <8337n51r4f.fsf@gnu.org> <878twxmshj.fsf@linaro.org> <831t2p1n98.fsf@gnu.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 1469008181 8938 80.91.229.3 (20 Jul 2016 09:49:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Jul 2016 09:49:41 +0000 (UTC) Cc: 23917@debbugs.gnu.org, rpluim@gmail.com, jwiegley@gmail.com, monnier@iro.umontreal.ca, nljlistbox2@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 20 11:49:30 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1bPo85-0000RJ-Nj for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jul 2016 11:49:25 +0200 Original-Received: from localhost ([::1]:33300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPo84-0007J8-I2 for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jul 2016 05:49:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPo7s-00074Q-4U for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 05:49:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPo7q-00023i-Hl for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 05:49:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPo7i-00022j-IB; Wed, 20 Jul 2016 05:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bPo7i-0001Ii-Bx; Wed, 20 Jul 2016 05:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex =?UTF-8?Q?Benn=C3=A9e?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Resent-Date: Wed, 20 Jul 2016 09:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23917 X-GNU-PR-Package: emacs,org-mode X-GNU-PR-Keywords: Original-Received: via spool by 23917-submit@debbugs.gnu.org id=B23917.14690081394992 (code B ref 23917); Wed, 20 Jul 2016 09:49:02 +0000 Original-Received: (at 23917) by debbugs.gnu.org; 20 Jul 2016 09:48:59 +0000 Original-Received: from localhost ([127.0.0.1]:57915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPo7f-0001IS-8f for submit@debbugs.gnu.org; Wed, 20 Jul 2016 05:48:59 -0400 Original-Received: from mail-wm0-f49.google.com ([74.125.82.49]:37855) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPo7c-0001IE-P0 for 23917@debbugs.gnu.org; Wed, 20 Jul 2016 05:48:57 -0400 Original-Received: by mail-wm0-f49.google.com with SMTP id i5so60124357wmg.0 for <23917@debbugs.gnu.org>; Wed, 20 Jul 2016 02:48:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=c5nH1iyKUG9EQJPUDcSe9YPmdpSvpVtH4kK9ijW+Ogk=; b=CZLoSOFsLU9XAqy0KKtnzFazuAlvMJQ77pUGUO1KUfN/9rYY1PLJu7w9U3bpsWxTWw quxqlioA4nBoof9xZBGQtCA1O6qSJvaPS2hbUNIcBW7yi1dOijDQUeRm/IT9pj9PLBfR xjvJM52FxGRLsJfn3NxReukn7CYLKJR+lLTOU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=c5nH1iyKUG9EQJPUDcSe9YPmdpSvpVtH4kK9ijW+Ogk=; b=TRTP8+AsyPRPcUJCsldVCErRL286Q0Y1CN7NPVQA1eDe2u+cYY0dl0OPaBAX/6EHdb tosPr1Ja2J3BzLTZHrnmwdUEa/X7zo++T4928uaDGNF9gUVc2e3tEIlxGhv2D0DLOEVF EOzgBrFLiL4S0nMdj3CKmvlo+b7M81YijbBROZifQjW6YTSrZ7IhjxM5c1ANFG42VgMs 3QqTAVek4GxxthRgIqMpcqAj3hf+zWFLB/3mloBYAVXt0aTTotAr9lZoMYhiCXrFae5K zA3w8d/uvF6ZvVlWtk0FdIPUpmoWnWUnOka/aeLcYqb64hwbWBa5hCHjzDdirCWp6p3I H7qg== X-Gm-Message-State: ALyK8tI3SG/5VlX7m75zl0VdoVt7V0sIXt5md1qrpwJBJUvYJ4TLat1SZNBPaNGhm+589Bgw X-Received: by 10.28.169.203 with SMTP id s194mr10760144wme.95.1469008130840; Wed, 20 Jul 2016 02:48:50 -0700 (PDT) Original-Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m127sm28615403wmm.21.2016.07.20.02.48.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jul 2016 02:48:49 -0700 (PDT) Original-Received: from zen (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTPS id AB4973E0366; Wed, 20 Jul 2016 10:48:45 +0100 (BST) User-agent: mu4e 0.9.17; emacs 25.0.95.10 In-reply-to: <831t2p1n98.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121292 Archived-At: Eli Zaretskii writes: >> From: Alex Bennée >> Cc: monnier@iro.umontreal.ca, 23917@debbugs.gnu.org, rpluim@gmail.com, jwiegley@gmail.com, nljlistbox2@gmail.com, me@lunaryorn.com >> Date: Tue, 19 Jul 2016 18:45:44 +0100 >> >> ;; Save and restore the match data, as recommended in (elisp)Change Hooks >> (save-match-data >> (when flycheck-mode >> ;; The buffer was changed, thus clear the idle timer >> (flycheck-clear-idle-change-timer) >> (if (string-match-p (rx "\n") (buffer-substring beg end)) >> (flycheck-buffer-automatically 'new-line 'force-deferred) >> (setq flycheck-idle-change-timer >> (run-at-time flycheck-idle-change-delay nil >> #'flycheck-handle-idle-change)))))) >> >> However it doesn't look as though it tweaks the buffer until idle timer >> has run. Weird.... > > Tweaking the buffer is not what causes the problem. It's the call to > save-match-data itself. It doesn't matter at all what the code inside > save-match-data does. Ahh I misunderstood the description of the problem. I thought it was a changing of the buffer underneath that meant the match data wasn't updated and hence got out of sync. So is the match data already out of sync by the time the save-match-data call is made? -- Alex Bennée