From unknown Fri Jun 20 05:38:24 2025 X-Loop: don@donarmstrong.com Subject: bug#451: 23.0.60; x-gtk-map-stock destroys match data Reply-To: Nick Roberts , 451@debbugs.gnu.org Resent-From: Nick Roberts Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 20 Jun 2008 03:50:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 451 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121393340516852 (code B ref -1); Fri, 20 Jun 2008 03:50:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.0 required=4.0 tests=AWL,BAYES_00,FOURLA, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 20 Jun 2008 03:43:25 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5K3hG4r016846 for ; Thu, 19 Jun 2008 20:43:18 -0700 Received: from mx10.gnu.org ([199.232.76.166]:54530) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1K9XWt-0007cd-AC for emacs-pretest-bug@gnu.org; Thu, 19 Jun 2008 23:43:15 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1K9XWp-0002lo-Pi for emacs-pretest-bug@gnu.org; Thu, 19 Jun 2008 23:43:15 -0400 Received: from viper.snap.net.nz ([202.37.101.25]:37663) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K9XWp-0002kk-24 for emacs-pretest-bug@gnu.org; Thu, 19 Jun 2008 23:43:11 -0400 Received: from kahikatea.snap.net.nz (137.62.255.123.dynamic.snap.net.nz [123.255.62.137]) by viper.snap.net.nz (Postfix) with ESMTP id 7A3263DA11D for ; Fri, 20 Jun 2008 14:40:33 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 6AED48FC6D; Fri, 20 Jun 2008 14:38:25 +1200 (NZST) From: Nick Roberts To: emacs-pretest-bug@gnu.org Message-Id: <20080620023825.6AED48FC6D@kahikatea.snap.net.nz> Date: Fri, 20 Jun 2008 14:38:25 +1200 (NZST) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 In the event loop (?), update_frame_tool_bar calls x-gtk-map-stock (in x-win.el) which uses string-match. This changes the match data that I need for my application. I don't know what the rules are about using string-match from C code but as a minimum x-gtk-map-stock should wrap save-match-data around the call to it. In GNU Emacs 23.0.60.19 (i686-pc-linux-gnu, GTK+ Version 2.10.11) of 2008-06-20 on kahikatea.snap.net.nz Windowing system distributor `The X.Org Foundation', version 11.0.70200000 configured using `configure 'CFLAGS=-g3' '--enable-font-backend'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_NZ.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Change Log Minor modes in effect: isearch-buffers-minor-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: (only . t) Recent input: C-x C-s C-x C-b C-x C-f s r c / s t C-h f g t x - s t C-g C-h C-h C-g C-x C-g s t o c k C-s g t k f C-s c a l l 1 C-s C-s C-M-S-a C-S-s C-S-s C-S-x V G C-s c a l l 1 C-a C-r C-r C-s C-s C-s C-s C-s M-x r e p o r t SPC C-g C-s C-w C-w C-w C-w C-s C-r C-r C-r C-M-a C-s C-s C-s C-s C-s c a l l 1 C-s C-w C-r C-r C-r C-s C-s M-x r e p o r t SPC e m SPC SPC Recent messages: Type C-x 4 C-o RET to restore the other window. Mark saved where search started [3 times] Annotating... Mark saved where search started Redisplaying annotation...done (Spanned from 1979.6 to 5.6 days old) Mark set Annotating... done Mark saved where search started [2 times] Quit Mark saved where search started [4 times] -- Nick http://www.inet.net.nz/~nickrob From unknown Fri Jun 20 05:38:24 2025 X-Loop: don@donarmstrong.com Subject: bug#451: 23.0.60; x-gtk-map-stock destroys match data Reply-To: Stefan Monnier , 451@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 20 Jun 2008 14:35:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 451 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121397212213620 (code B ref -1); Fri, 20 Jun 2008 14:35:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 20 Jun 2008 14:28:42 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5KEScA1013611 for ; Fri, 20 Jun 2008 07:28:39 -0700 Received: from mail.gnu.org ([199.232.76.166]:53457 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1K9hbQ-0006fC-4W for emacs-pretest-bug@gnu.org; Fri, 20 Jun 2008 10:28:36 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1K9hbO-00043H-Dp for emacs-pretest-bug@gnu.org; Fri, 20 Jun 2008 10:28:37 -0400 Received: from ironport2-out.pppoe.ca ([206.248.154.182]:32272 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K9hbO-00042v-3R for emacs-pretest-bug@gnu.org; Fri, 20 Jun 2008 10:28:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicFAANcW0jO+KWv/2dsb2JhbACBW64i X-IronPort-AV: E=Sophos;i="4.27,679,1204520400"; d="scan'208";a="23014154" Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 20 Jun 2008 10:28:31 -0400 Received: from pastel.home ([206.248.165.175]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id AUW23431; Fri, 20 Jun 2008 10:28:31 -0400 Received: by pastel.home (Postfix, from userid 20848) id CC9F57F05; Fri, 20 Jun 2008 10:28:30 -0400 (EDT) From: Stefan Monnier To: Nick Roberts Cc: 451@debbugs.gnu.org, emacs-pretest-bug@gnu.org Message-ID: References: <20080620023825.6AED48FC6D@kahikatea.snap.net.nz> Date: Fri, 20 Jun 2008 10:28:30 -0400 In-Reply-To: <20080620023825.6AED48FC6D@kahikatea.snap.net.nz> (Nick Roberts's message of "Fri, 20 Jun 2008 14:38:25 +1200 (NZST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. > In the event loop (?), update_frame_tool_bar calls x-gtk-map-stock (in > x-win.el) which uses string-match. This changes the match data that > I need for my application. I don't know what the rules are about > using string-match from C code but as a minimum x-gtk-map-stock should > wrap save-match-data around the call to it. The match-data is a very volatile piece of data. So while you may be right, I think it's more likely that the problem is in your code (i.e., your code should save the match-data itself if it needs to use it after some non-trivial code has been run, and by "trivial" I *really* mean trivial). Stefan From unknown Fri Jun 20 05:38:24 2025 X-Loop: don@donarmstrong.com Subject: bug#451: 23.0.60; x-gtk-map-stock destroys match data Reply-To: Nick Roberts , 451@debbugs.gnu.org Resent-From: Nick Roberts Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 20 Jun 2008 23:10:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 451 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 451-submit@emacsbugs.donarmstrong.com id=B451.121400291110385 (code B ref 451); Fri, 20 Jun 2008 23:10:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 451) by emacsbugs.donarmstrong.com; 20 Jun 2008 23:01:51 +0000 Received: from viper.snap.net.nz (viper.snap.net.nz [202.37.101.25]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5KN1g8W010369 for <451@emacsbugs.donarmstrong.com>; Fri, 20 Jun 2008 16:01:43 -0700 Received: from kahikatea.snap.net.nz (30.31.255.123.static.snap.net.nz [123.255.31.30]) by viper.snap.net.nz (Postfix) with ESMTP id BB2D33DA176; Sat, 21 Jun 2008 11:01:36 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id BA9B38FC6D; Sat, 21 Jun 2008 11:01:18 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18524.14013.836890.285017@kahikatea.snap.net.nz> Date: Sat, 21 Jun 2008 11:01:17 +1200 To: Stefan Monnier Cc: 451@debbugs.gnu.org, emacs-pretest-bug@gnu.org In-Reply-To: References: <20080620023825.6AED48FC6D@kahikatea.snap.net.nz> X-Mailer: VM 7.19 under Emacs 22.2.50.3 > > In the event loop (?), update_frame_tool_bar calls x-gtk-map-stock (in > > x-win.el) which uses string-match. This changes the match data that > > I need for my application. I don't know what the rules are about > > using string-match from C code but as a minimum x-gtk-map-stock should > > wrap save-match-data around the call to it. > > The match-data is a very volatile piece of data. So while you may be > right, I think it's more likely that the problem is in your code > (i.e., your code should save the match-data itself if it needs to use > it after some non-trivial code has been run, and by "trivial" I *really* > mean trivial). I don't think that's right. The problem goes away if I remove the tool bar. If I do: (string-match "ox" "The quick lazy fox jumped") in the *scratch* buffer then (match-beginning 0) (match-end 0) give me false values immediately afterwards. Presumably update_frame_tool_bar gets called in between the evaluations. I'm not sure exactly why it's called but I have: (add-hook 'gdb-mode-hook '(lambda () (tool-bar-mode 1) (if (eq window-system 'x) (define-key-after gud-tool-bar-map [function-step] '(menu-item "Step outer" gud-function-step :image (image :type xpm :file "/home/nickrob/emacs/etc/images/jump-to.xpm") :enable (not gud-running) :visible (memq gud-minor-mode '(gdbmi gdba))))))) in my .emacs -- Nick http://www.inet.net.nz/~nickrob From unknown Fri Jun 20 05:38:24 2025 X-Loop: don@donarmstrong.com Subject: bug#451: 23.0.60; x-gtk-map-stock destroys match data Reply-To: Stefan Monnier , 451@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 21 Jun 2008 02:35:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 451 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121401527328848 (code B ref -1); Sat, 21 Jun 2008 02:35:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 21 Jun 2008 02:27:53 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5L2RjJH028839 for ; Fri, 20 Jun 2008 19:27:46 -0700 Received: from mx10.gnu.org ([199.232.76.166]:33632) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1K9spK-0004I1-TM for emacs-pretest-bug@gnu.org; Fri, 20 Jun 2008 22:27:42 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1K9spJ-0001Na-95 for emacs-pretest-bug@gnu.org; Fri, 20 Jun 2008 22:27:44 -0400 Received: from ironport2-out.pppoe.ca ([206.248.154.182]:49884 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K9spI-0001NA-U1 for emacs-pretest-bug@gnu.org; Fri, 20 Jun 2008 22:27:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvQEAJcDXEjO+KWv/2dsb2JhbACBW64G X-IronPort-AV: E=Sophos;i="4.27,683,1204520400"; d="scan'208";a="23044090" Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 20 Jun 2008 22:27:39 -0400 Received: from pastel.home ([206.248.165.175]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id BIW89039; Fri, 20 Jun 2008 22:27:39 -0400 Received: by pastel.home (Postfix, from userid 20848) id 97BDF7F05; Fri, 20 Jun 2008 22:27:39 -0400 (EDT) From: Stefan Monnier To: Nick Roberts Cc: 451@debbugs.gnu.org, emacs-pretest-bug@gnu.org Message-ID: References: <20080620023825.6AED48FC6D@kahikatea.snap.net.nz> <18524.14013.836890.285017@kahikatea.snap.net.nz> Date: Fri, 20 Jun 2008 22:27:39 -0400 In-Reply-To: <18524.14013.836890.285017@kahikatea.snap.net.nz> (Nick Roberts's message of "Sat, 21 Jun 2008 11:01:17 +1200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. > I don't think that's right. The problem goes away if I remove the tool bar. > If I do: > (string-match "ox" "The quick lazy fox jumped") > in the *scratch* buffer then > (match-beginning 0) > (match-end 0) > give me false values immediately afterwards. What do you mean "immediately afterwards"? If you get back to the toplevel in the mean time, the "immediately" actually runs a crapload of code. I.e. it's anything but "immediate". Your expectation is just wrong. > Presumably update_frame_tool_bar gets called in between the evaluations. This and megabytes of code, yes. Stefan From unknown Fri Jun 20 05:38:24 2025 X-Loop: don@donarmstrong.com Subject: bug#451: 23.0.60; x-gtk-map-stock destroys match data Reply-To: Nick Roberts , 451@debbugs.gnu.org Resent-From: Nick Roberts Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 21 Jun 2008 05:15:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 451 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12140249113622 (code B ref -1); Sat, 21 Jun 2008 05:15:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-9.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 21 Jun 2008 05:08:31 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5L58SU9003616 for ; Fri, 20 Jun 2008 22:08:29 -0700 Received: from mail.gnu.org ([199.232.76.166]:39390 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1K9vKr-0004vl-EQ for emacs-pretest-bug@gnu.org; Sat, 21 Jun 2008 01:08:25 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1K9vKp-00069c-N3 for emacs-pretest-bug@gnu.org; Sat, 21 Jun 2008 01:08:27 -0400 Received: from viper.snap.net.nz ([202.37.101.25]:55568) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K9vKp-00067e-6t for emacs-pretest-bug@gnu.org; Sat, 21 Jun 2008 01:08:23 -0400 Received: from kahikatea.snap.net.nz (30.31.255.123.static.snap.net.nz [123.255.31.30]) by viper.snap.net.nz (Postfix) with ESMTP id 0BC563DA048; Sat, 21 Jun 2008 17:08:16 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id CF3AC8FC6D; Sat, 21 Jun 2008 17:07:55 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18524.36010.681991.485230@kahikatea.snap.net.nz> Date: Sat, 21 Jun 2008 17:07:54 +1200 To: Stefan Monnier Cc: 451@debbugs.gnu.org, emacs-pretest-bug@gnu.org In-Reply-To: References: <20080620023825.6AED48FC6D@kahikatea.snap.net.nz> X-Mailer: VM 7.19 under Emacs 22.2.50.3 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-CrossAssassin-Score: 2 > > I don't think that's right. The problem goes away if I remove the tool bar. > > If I do: > > (string-match "ox" "The quick lazy fox jumped") > > in the *scratch* buffer then > > (match-beginning 0) > > (match-end 0) > > give me false values immediately afterwards. > What do you mean "immediately afterwards"? If you get back to the > toplevel in the mean time, the "immediately" actually runs a crapload of > code. I.e. it's anything but "immediate". Your expectation is > just wrong. I meam using C-x C-e. It looks like you are indeed right and that match-beginning and match-end can only be used programmatically. I was using edebug and getting strange values evaluating them (manually). I thought I had done that before - but clearly not. Sorry but I don't know how to close the bug report. -- Nick http://www.inet.net.nz/~nickrob From unknown Fri Jun 20 05:38:24 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Nick Roberts Subject: bug#451 closed by Stefan Monnier (Re: bug#451: 23.0.60; x-gtk-map-stock destroys match data) Message-ID: References: <20080620023825.6AED48FC6D@kahikatea.snap.net.nz> X-Emacs-PR-Message: they-closed 451 X-Emacs-PR-Package: emacs Reply-To: 451@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1214078105-27214-1" This is a multi-part message in MIME format... ------------=_1214078105-27214-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #451: 23.0.60; x-gtk-map-stock destroys match data It has been closed by Stefan Monnier . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Stefan Monnier by replying to this email. --=20 451: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D451 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1214078105-27214-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From monnier@iro.umontreal.ca Sat Jun 21 12:46:13 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 451-close) by emacsbugs.donarmstrong.com; 21 Jun 2008 19:46:14 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5LJkAWo026001 for <451-close@emacsbugs.donarmstrong.com>; Sat, 21 Jun 2008 12:46:12 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvAEAFj3XEjO+KWv/2dsb2JhbACBW6xW X-IronPort-AV: E=Sophos;i="4.27,684,1204520400"; d="scan'208";a="23057006" Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 21 Jun 2008 15:46:05 -0400 Received: from pastel.home ([206.248.165.175]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id BZP74205; Sat, 21 Jun 2008 15:46:05 -0400 Received: by pastel.home (Postfix, from userid 20848) id 519DF7F05; Sat, 21 Jun 2008 15:46:05 -0400 (EDT) From: Stefan Monnier To: 451-close@debbugs.gnu.org Subject: Re: bug#451: 23.0.60; x-gtk-map-stock destroys match data Message-ID: References: <20080620023825.6AED48FC6D@kahikatea.snap.net.nz> <18524.36010.681991.485230@kahikatea.snap.net.nz> Date: Sat, 21 Jun 2008 15:46:05 -0400 In-Reply-To: <18524.36010.681991.485230@kahikatea.snap.net.nz> (Nick Roberts's message of "Sat, 21 Jun 2008 17:07:54 +1200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I meam using C-x C-e. It looks like you are indeed right and that > match-beginning and match-end can only be used programmatically. I was > using edebug and getting strange values evaluating them (manually). I > thought I had done that before - but clearly not. In edebug, if you use `e' you should be able to use match-beginning and match-end. But with M-: it's hopeless. > Sorry but I don't know how to close the bug report. Just send it to -close@... as I've done here. Stefan ------------=_1214078105-27214-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From nickrob@snap.net.nz Thu Jun 19 20:43:25 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.0 required=4.0 tests=AWL,BAYES_00,FOURLA, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 20 Jun 2008 03:43:25 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5K3hG4r016846 for ; Thu, 19 Jun 2008 20:43:18 -0700 Received: from mx10.gnu.org ([199.232.76.166]:54530) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1K9XWt-0007cd-AC for emacs-pretest-bug@gnu.org; Thu, 19 Jun 2008 23:43:15 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1K9XWp-0002lo-Pi for emacs-pretest-bug@gnu.org; Thu, 19 Jun 2008 23:43:15 -0400 Received: from viper.snap.net.nz ([202.37.101.25]:37663) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K9XWp-0002kk-24 for emacs-pretest-bug@gnu.org; Thu, 19 Jun 2008 23:43:11 -0400 Received: from kahikatea.snap.net.nz (137.62.255.123.dynamic.snap.net.nz [123.255.62.137]) by viper.snap.net.nz (Postfix) with ESMTP id 7A3263DA11D for ; Fri, 20 Jun 2008 14:40:33 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 6AED48FC6D; Fri, 20 Jun 2008 14:38:25 +1200 (NZST) From: Nick Roberts To: emacs-pretest-bug@gnu.org Subject: 23.0.60; x-gtk-map-stock destroys match data Message-Id: <20080620023825.6AED48FC6D@kahikatea.snap.net.nz> Date: Fri, 20 Jun 2008 14:38:25 +1200 (NZST) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 In the event loop (?), update_frame_tool_bar calls x-gtk-map-stock (in x-win.el) which uses string-match. This changes the match data that I need for my application. I don't know what the rules are about using string-match from C code but as a minimum x-gtk-map-stock should wrap save-match-data around the call to it. In GNU Emacs 23.0.60.19 (i686-pc-linux-gnu, GTK+ Version 2.10.11) of 2008-06-20 on kahikatea.snap.net.nz Windowing system distributor `The X.Org Foundation', version 11.0.70200000 configured using `configure 'CFLAGS=-g3' '--enable-font-backend'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_NZ.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Change Log Minor modes in effect: isearch-buffers-minor-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: (only . t) Recent input: C-x C-s C-x C-b C-x C-f s r c / s t C-h f g t x - s t C-g C-h C-h C-g C-x C-g s t o c k C-s g t k f C-s c a l l 1 C-s C-s C-M-S-a C-S-s C-S-s C-S-x V G C-s c a l l 1 C-a C-r C-r C-s C-s C-s C-s C-s M-x r e p o r t SPC C-g C-s C-w C-w C-w C-w C-s C-r C-r C-r C-M-a C-s C-s C-s C-s C-s c a l l 1 C-s C-w C-r C-r C-r C-s C-s M-x r e p o r t SPC e m SPC SPC Recent messages: Type C-x 4 C-o RET to restore the other window. Mark saved where search started [3 times] Annotating... Mark saved where search started Redisplaying annotation...done (Spanned from 1979.6 to 5.6 days old) Mark set Annotating... done Mark saved where search started [2 times] Quit Mark saved where search started [4 times] -- Nick http://www.inet.net.nz/~nickrob ------------=_1214078105-27214-1--