From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23917: 25.0.95; commit 3a9d6296b35e5317c497674d5725eb52699bd3b8 causing org-capture to error out Date: Fri, 08 Jul 2016 17:02:46 +0300 Message-ID: <83lh1ci5x5.fsf@gnu.org> References: <8760sgnvxh.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1467986694 27414 80.91.229.3 (8 Jul 2016 14:04:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2016 14:04:54 +0000 (UTC) Cc: 23917@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 08 16:04:43 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 1bLWOY-0007tG-Br for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Jul 2016 16:04:42 +0200 Original-Received: from localhost ([::1]:45786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLWOX-00084g-Jh for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Jul 2016 10:04:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLWNy-0007kT-OK for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 10:04:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLWNu-0006AA-GX for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 10:04:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLWNu-0006A6-D6 for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 10:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bLWNu-0002f0-68 for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 10:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Jul 2016 14:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23917 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23917-submit@debbugs.gnu.org id=B23917.146798658810165 (code B ref 23917); Fri, 08 Jul 2016 14:04:02 +0000 Original-Received: (at 23917) by debbugs.gnu.org; 8 Jul 2016 14:03:08 +0000 Original-Received: from localhost ([127.0.0.1]:42801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLWN2-0002dt-Ml for submit@debbugs.gnu.org; Fri, 08 Jul 2016 10:03:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLWN1-0002dJ-9l for 23917@debbugs.gnu.org; Fri, 08 Jul 2016 10:03:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLWMs-0005jh-TQ for 23917@debbugs.gnu.org; Fri, 08 Jul 2016 10:03:02 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLWMs-0005jV-Q7; Fri, 08 Jul 2016 10:02:58 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3343 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bLWMq-0004oU-5e; Fri, 08 Jul 2016 10:02:56 -0400 In-reply-to: <8760sgnvxh.fsf@gmail.com> (message from Robert Pluim on Fri, 08 Jul 2016 14:42:02 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:120628 Archived-At: > From: Robert Pluim > Date: Fri, 08 Jul 2016 14:42:02 +0200 > > (this is with org-20160704 from elpa. The org version ("8.2.10") in > emacs-25 does not exhibit this error) > > This is from emacs -Q, with a subsequent changing of load-paths to > point at the elpa org. Reverting the commit mentioned above makes the > error go away. > > In gdb: > > Breakpoint 3, Freplace_match (newtext=8699012, fixedcase=, literal=0, string=, subexp=) > at search.c:2710 > 2710 error ("Match data clobbered by buffer modification hooks"); > (gdb) xbacktrace > "replace-match" (0xffffc680) > "org-capture-empty-lines-after" (0xffffc850) > "org-capture-place-entry" (0xffffca30) > "org-capture-place-template" (0xffffcc10) > "org-capture" (0xffffcf20) > "funcall-interactively" (0xffffcf18) > "call-interactively" (0xffffd180) > "command-execute" (0xffffd328) > "execute-extended-command" (0xffffd580) > "funcall-interactively" (0xffffd578) > "call-interactively" (0xffffd820) > "command-execute" (0xffffd998) > > Based on the discussion in Bug#23869, there's a hook somewhere that > needs to do save-match-data Right. > but I have no idea how to figure out which one. Run Emacs under a debugger, and set a breakpoint before the call to replace_range in Freplace_match. When the breakpoint breaks, make sure it's indeed being called from org-capture-empty-lines-after, and if so, do this: (gdb) watch -l search_regs.start[sub] (gdb) watch -l search_regs.end[sub] (gdb) watch -l search_regs.num_regs (gdb) continue Then GDB will kick in as soon as one of these 3 is clobbered, and the backtrace will show you whodunit.