From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: Kevin Ryde , 3863@debbugs.gnu.org Resent-From: Kevin Ryde Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 16 Jul 2009 00:10:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12477027564151 (code B ref -1); Thu, 16 Jul 2009 00:10:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 16 Jul 2009 00:05:56 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.6 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6G05pEL004146 for ; Wed, 15 Jul 2009 17:05:52 -0700 Received: from mx10.gnu.org ([199.232.76.166]:38386) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MRETv-0001lR-0j for emacs-pretest-bug@gnu.org; Wed, 15 Jul 2009 20:05:51 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MRETt-0006GI-9T for emacs-pretest-bug@gnu.org; Wed, 15 Jul 2009 20:05:50 -0400 Received: from mailout2-10.pacific.net.au ([125.255.80.137]:57426 helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRETs-0006G4-Hz for emacs-pretest-bug@gnu.org; Wed, 15 Jul 2009 20:05:49 -0400 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 3BEEF18103A for ; Thu, 16 Jul 2009 10:05:46 +1000 (EST) Received: from blah.blah (ppp29B9.dyn.pacific.net.au [61.8.41.185]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 6F9638C1E for ; Thu, 16 Jul 2009 10:05:45 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MRETj-0002Mu-Mf for emacs-pretest-bug@gnu.org; Thu, 16 Jul 2009 10:05:39 +1000 From: Kevin Ryde To: emacs-pretest-bug@gnu.org Date: Thu, 16 Jul 2009 10:05:39 +1000 Message-ID: <87ocrla3vw.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) --=-=-= In recent copyright.el I noticed copyright-update using the match data after a y-or-n-p query. Is that a good idea? When running it in emacs 22 I seemed to sometimes get the match data clobbered by y-or-n-p. I never tracked down the circumstances, but wondered if copyright.el shouldn't rely on what an input func like y-or-n-p could do, per diff below. In GNU Emacs 23.1.50.1 (i586-pc-linux-gnu, GTK+ Version 2.16.4) of 2009-07-12 on blah.blah configured using `configure 'CFLAGS=-O -g' '--prefix=/down/emacs/b/inst' '--with-x-toolkit=gtk'' 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_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t 2009-07-16 Kevin Ryde * emacs-lisp/copyright.el (copyright-update): save-match-data across y-or-n-p, for safety. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=copyright.el.save-match-data.diff *** copyright.el 16 Jul 2009 09:44:20 +1000 1.81 --- copyright.el 16 Jul 2009 09:55:57 +1000 *************** *** 223,230 **** (< (string-to-number (match-string 3)) (string-to-number copyright-current-gpl-version)) (or noquery ! (y-or-n-p (format "Replace GPL version by %s? " ! copyright-current-gpl-version))) (progn (if (match-end 2) ;; Esperanto bilingual comment in two-column.el --- 223,231 ---- (< (string-to-number (match-string 3)) (string-to-number copyright-current-gpl-version)) (or noquery ! (save-match-data ! (y-or-n-p (format "Replace GPL version by %s? " ! copyright-current-gpl-version)))) (progn (if (match-end 2) ;; Esperanto bilingual comment in two-column.el --=-=-=-- From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: Stefan Monnier , 3863@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 16 Jul 2009 02:10:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124770971422812 (code B ref -1); Thu, 16 Jul 2009 02:10:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 16 Jul 2009 02:01:54 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6G21ou0022806 for ; Wed, 15 Jul 2009 19:01:52 -0700 Received: from mx10.gnu.org ([199.232.76.166]:47140) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MRGIA-0006Tn-9T for emacs-pretest-bug@gnu.org; Wed, 15 Jul 2009 22:01:50 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MRGI9-0000MD-Am for emacs-pretest-bug@gnu.org; Wed, 15 Jul 2009 22:01:50 -0400 Received: from ironport2-out.pppoe.ca ([206.248.154.182]:42209 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRGI9-0000M7-38 for emacs-pretest-bug@gnu.org; Wed, 15 Jul 2009 22:01:49 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlwFAH8mXkrO+KNz/2dsb2JhbACBUdA1hAsFgUCFNA X-IronPort-AV: E=Sophos;i="4.42,408,1243828800"; d="scan'208";a="41704424" Received: from 206-248-163-115.dsl.teksavvy.com (HELO pastel.home) ([206.248.163.115]) by ironport2-out.teksavvy.com with ESMTP; 15 Jul 2009 22:01:48 -0400 Received: by pastel.home (Postfix, from userid 20848) id 051C680B0; Wed, 15 Jul 2009 22:01:47 -0400 (EDT) From: Stefan Monnier To: Kevin Ryde Cc: 3863@debbugs.gnu.org, emacs-pretest-bug@gnu.org Message-ID: References: <87ocrla3vw.fsf@blah.blah> Date: Wed, 15 Jul 2009 22:01:47 -0400 In-Reply-To: <87ocrla3vw.fsf@blah.blah> (Kevin Ryde's message of "Thu, 16 Jul 2009 10:05:39 +1000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. > 2009-07-16 Kevin Ryde > * emacs-lisp/copyright.el (copyright-update): save-match-data across > y-or-n-p, for safety. Thanks, installed, Stefan From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: Chong Yidong , 3863@debbugs.gnu.org Resent-From: Chong Yidong Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 16 Jul 2009 16:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3863-submit@emacsbugs.donarmstrong.com id=B3863.12477599473171 (code B ref 3863); Thu, 16 Jul 2009 16:05:04 +0000 Received: (at 3863) by emacsbugs.donarmstrong.com; 16 Jul 2009 15:59:07 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.4 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po38.its.yale.edu (pantheon-po38.its.yale.edu [130.132.50.97]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6GFx30h003148 for <3863@emacsbugs.donarmstrong.com>; Thu, 16 Jul 2009 08:59:04 -0700 Received: from furry (dhcp128036014244.central.yale.edu [128.36.14.244]) (authenticated bits=0) by pantheon-po38.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6GFwutd003761 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 16 Jul 2009 11:58:56 -0400 Received: by furry (Postfix, from userid 1000) id 5C9E0C0BE; Thu, 16 Jul 2009 10:33:39 -0400 (EDT) From: Chong Yidong To: Kevin Ryde Cc: 3863@debbugs.gnu.org Date: Thu, 16 Jul 2009 10:33:39 -0400 Message-ID: <87bpnkk88s.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) > In recent copyright.el I noticed copyright-update using the match data > after a y-or-n-p query. Is that a good idea? > > When running it in emacs 22 I seemed to sometimes get the match data > clobbered by y-or-n-p. If so, we should change y-or-n-p to save the match data. Could you provide a reproducible test-case for the clobbering of the match data? From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: Stefan Monnier , 3863@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 16 Jul 2009 17:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3863-submit@emacsbugs.donarmstrong.com id=B3863.124776506918490 (code B ref 3863); Thu, 16 Jul 2009 17:30:04 +0000 Received: (at 3863) by emacsbugs.donarmstrong.com; 16 Jul 2009 17:24:29 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6GHOOOG018481 for <3863@emacsbugs.donarmstrong.com>; Thu, 16 Jul 2009 10:24:26 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAEv/XkrO+LUT/2dsb2JhbACBUdIahAsFhnU X-IronPort-AV: E=Sophos;i="4.42,412,1243828800"; d="scan'208";a="41740657" Received: from 206-248-181-19.dsl.teksavvy.com (HELO pastel.home) ([206.248.181.19]) by ironport2-out.teksavvy.com with ESMTP; 16 Jul 2009 13:24:15 -0400 Received: by pastel.home (Postfix, from userid 20848) id D95CB80B0; Thu, 16 Jul 2009 13:24:15 -0400 (EDT) From: Stefan Monnier To: Chong Yidong Cc: 3863@debbugs.gnu.org, Kevin Ryde Message-ID: References: <87bpnkk88s.fsf@stupidchicken.com> Date: Thu, 16 Jul 2009 13:24:15 -0400 In-Reply-To: <87bpnkk88s.fsf@stupidchicken.com> (Chong Yidong's message of "Thu, 16 Jul 2009 10:33:39 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > If so, we should change y-or-n-p to save the match data. Why? y-or-n-p will yield waiting for user input, so it's basically a point where any other code can run. It's one of the prime examples of a function which you can't expect to preserve the match-data. Stefan From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: Lennart Borgman , 3863@debbugs.gnu.org Resent-From: Lennart Borgman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 16 Jul 2009 18:50:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3863-submit@emacsbugs.donarmstrong.com id=B3863.124776977332260 (code B ref 3863); Thu, 16 Jul 2009 18:50:04 +0000 Received: (at 3863) by emacsbugs.donarmstrong.com; 16 Jul 2009 18:42:53 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-bw0-f223.google.com (mail-bw0-f223.google.com [209.85.218.223]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6GIgmib032255 for <3863@emacsbugs.donarmstrong.com>; Thu, 16 Jul 2009 11:42:50 -0700 Received: by bwz23 with SMTP id 23so323574bwz.1 for <3863@emacsbugs.donarmstrong.com>; Thu, 16 Jul 2009 11:42:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=aqi8AY/QP8FQvU82rflvp5i9jBUugZvGNrzWrmp1cRY=; b=n5wqsqITfoWSy3NFjyK9YwQ9ZIjQK0NLWsX1knkdaRiTB767grlXM018a1Jy2ec4VQ F6OSHzr4kOgYx01nuKlNRjywqXk5llet7Dq8O6KuUK0JLsEgk0Id+uJuQPQbi+vrtlgD DRvU7m4ETHs+M0Mb2x9Y1QuGURhAA5vztrtbM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=d3cuvyfEeVVQ6wPaLvm2RNOWNL+jtxctdI009QT1T4tgj5W/ER8RuJh3nyXAm2/HPk 43JhTpbGhr+7ZpIfRr9F4eBjIiqlQfpBmj9X6easPlvkKUWQsKWohsEa1/aWO9tdBP2t zBHctfDvHUV+k5QRdrf0NnMtIn+Hrm941XDCY= MIME-Version: 1.0 Received: by 10.223.117.194 with SMTP id s2mr11788faq.83.1247769762340; Thu, 16 Jul 2009 11:42:42 -0700 (PDT) In-Reply-To: References: <87bpnkk88s.fsf@stupidchicken.com> Date: Thu, 16 Jul 2009 20:42:42 +0200 Message-ID: From: Lennart Borgman To: Stefan Monnier , 3863@debbugs.gnu.org Cc: Chong Yidong , Kevin Ryde Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Jul 16, 2009 at 7:24 PM, Stefan Monnier w= rote: >> If so, we should change y-or-n-p to save the match data. > > Why? =C2=A0y-or-n-p will yield waiting for user input, so it's basically > a point where any other code can run. =C2=A0It's one of the prime example= s of > a function which you can't expect to preserve the match-data. I don't think I understand, but it sounds like this is a reason why y-or-n-p should save match-data... Is there any reason not to let y-or-n-p save match data? I mean the function needing match data possibly want yield until it has used it, or? From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: Chong Yidong , 3863@debbugs.gnu.org Resent-From: Chong Yidong Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 16 Jul 2009 19:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3863-submit@emacsbugs.donarmstrong.com id=B3863.12477705111657 (code B ref 3863); Thu, 16 Jul 2009 19:00:04 +0000 Received: (at 3863) by emacsbugs.donarmstrong.com; 16 Jul 2009 18:55:11 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.9 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po38.its.yale.edu (pantheon-po38.its.yale.edu [130.132.50.97]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6GIt60o001467 for <3863@emacsbugs.donarmstrong.com>; Thu, 16 Jul 2009 11:55:08 -0700 Received: from furry (dhcp128036014244.central.yale.edu [128.36.14.244]) (authenticated bits=0) by pantheon-po38.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6GIsxO5003699 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 16 Jul 2009 14:54:59 -0400 Received: by furry (Postfix, from userid 1000) id BE062C09B; Thu, 16 Jul 2009 14:54:59 -0400 (EDT) From: Chong Yidong To: Stefan Monnier Cc: 3863@debbugs.gnu.org, Kevin Ryde References: <87bpnkk88s.fsf@stupidchicken.com> Date: Thu, 16 Jul 2009 14:54:59 -0400 In-Reply-To: (Stefan Monnier's message of "Thu, 16 Jul 2009 13:24:15 -0400") Message-ID: <87d480cvb0.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) Stefan Monnier writes: > Why? y-or-n-p will yield waiting for user input, so it's basically > a point where any other code can run. It's one of the prime examples of > a function which you can't expect to preserve the match-data. I'm not sure what you're referring to. What other code runs during y-or-n-p (excluding timers, which are supposed to save the match data)? From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: Stefan Monnier , 3863@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 17 Jul 2009 03:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3863-submit@emacsbugs.donarmstrong.com id=B3863.124780102021973 (code B ref 3863); Fri, 17 Jul 2009 03:30:04 +0000 Received: (at 3863) by emacsbugs.donarmstrong.com; 17 Jul 2009 03:23:40 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6H3NZAX021967 for <3863@emacsbugs.donarmstrong.com>; Thu, 16 Jul 2009 20:23:37 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al8FAOuLX0rO+LUT/2dsb2JhbACBUc9AhA0FhnU X-IronPort-AV: E=Sophos;i="4.42,415,1243828800"; d="scan'208";a="41774704" Received: from 206-248-181-19.dsl.teksavvy.com (HELO ceviche.home) ([206.248.181.19]) by ironport2-out.teksavvy.com with ESMTP; 16 Jul 2009 23:23:30 -0400 Received: by ceviche.home (Postfix, from userid 20848) id D0529B41BF; Thu, 16 Jul 2009 23:23:29 -0400 (EDT) From: Stefan Monnier To: Lennart Borgman Cc: 3863@debbugs.gnu.org, Chong Yidong , Kevin Ryde Message-ID: References: <87bpnkk88s.fsf@stupidchicken.com> Date: Thu, 16 Jul 2009 23:23:29 -0400 In-Reply-To: (Lennart Borgman's message of "Thu, 16 Jul 2009 20:42:42 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I don't think I understand, but it sounds like this is a reason why > y-or-n-p should save match-data... Here we go again: All functions destroy the match-data except for a few rare exceptions, which are simple functions doing little work. > Is there any reason not to let y-or-n-p save match data? If you think y-or-n-p deserves saving the match-data then pretty much all other functions deserve that change as well. And since save-match-data is somewhat costly, it would imply a singificant performance impact. Stefan PS: Worse yet: during y-or-n-p, the buffer might be completely changed by the code run asynchronously, so the "saved" match data may not even have any meaning any more. From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: Stefan Monnier , 3863@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 17 Jul 2009 03:30:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3863-submit@emacsbugs.donarmstrong.com id=B3863.124780107822012 (code B ref 3863); Fri, 17 Jul 2009 03:30:06 +0000 Received: (at 3863) by emacsbugs.donarmstrong.com; 17 Jul 2009 03:24:38 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6H3OYwO021995 for <3863@emacsbugs.donarmstrong.com>; Thu, 16 Jul 2009 20:24:35 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al8FAOuLX0rO+LUT/2dsb2JhbACBUc9AhA0FhnU X-IronPort-AV: E=Sophos;i="4.42,415,1243828800"; d="scan'208";a="41774756" Received: from 206-248-181-19.dsl.teksavvy.com (HELO ceviche.home) ([206.248.181.19]) by ironport2-out.teksavvy.com with ESMTP; 16 Jul 2009 23:24:26 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 032FFB41BF; Thu, 16 Jul 2009 23:24:26 -0400 (EDT) From: Stefan Monnier To: Chong Yidong Cc: 3863@debbugs.gnu.org, Kevin Ryde Message-ID: References: <87bpnkk88s.fsf@stupidchicken.com> <87d480cvb0.fsf@stupidchicken.com> Date: Thu, 16 Jul 2009 23:24:25 -0400 In-Reply-To: <87d480cvb0.fsf@stupidchicken.com> (Chong Yidong's message of "Thu, 16 Jul 2009 14:54:59 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I'm not sure what you're referring to. What other code runs during > y-or-n-p (excluding timers, which are supposed to save the match data)? Timers, Stefan From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: Lennart Borgman , 3863@debbugs.gnu.org Resent-From: Lennart Borgman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 17 Jul 2009 04:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3863-submit@emacsbugs.donarmstrong.com id=B3863.124780325027566 (code B ref 3863); Fri, 17 Jul 2009 04:05:04 +0000 Received: (at 3863) by emacsbugs.donarmstrong.com; 17 Jul 2009 04:00:50 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-bw0-f223.google.com (mail-bw0-f223.google.com [209.85.218.223]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6H40jd5027551 for <3863@emacsbugs.donarmstrong.com>; Thu, 16 Jul 2009 21:00:47 -0700 Received: by bwz23 with SMTP id 23so512052bwz.1 for <3863@emacsbugs.donarmstrong.com>; Thu, 16 Jul 2009 21:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=WsJ6S13xF/6vYYQ9gTZXDHe/febQ0cH9XzGgFejbtMQ=; b=FJx9S/o5gMRY+2Z3GleBzyAAfrKxP/Rj/E1MEhRHrb1qBwCUCPQjHN4ceyh5yQdEM0 g2jKe/aV8KtMnyLcsZ6Gi4JVbO863iGH8p2Btn2WTR2ogYOu0Q8FuprYEyD13wKPD1r2 GAoRD1yRuUABEWP2xiYQWF3FACT9lEFlApWbg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=uOl7EuOUmIkS750i1j3CluzCY6gcyzFVXUG/7ENXt0+CKGby+h6qv07IOef+DRZ3fl G8W70Rl2lG1UALchx4rQnNxv7Q3cUcdVFRHETGPXSrY+wUycebqHQSWtrPojuMrNoSVC 7mHVqstcwKTzaPc/fjZxcAyH7EV20f4X+aGn4= MIME-Version: 1.0 Received: by 10.223.105.9 with SMTP id r9mr98774fao.66.1247803239454; Thu, 16 Jul 2009 21:00:39 -0700 (PDT) In-Reply-To: References: <87bpnkk88s.fsf@stupidchicken.com> Date: Fri, 17 Jul 2009 06:00:39 +0200 Message-ID: From: Lennart Borgman To: Stefan Monnier Cc: 3863@debbugs.gnu.org, Chong Yidong , Kevin Ryde Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Jul 17, 2009 at 5:23 AM, Stefan Monnier w= rote: >> I don't think I understand, but it sounds like this is a reason why >> y-or-n-p should save match-data... > > Here we go again: > > All functions destroy the match-data except for a few rare exceptions, > which are simple functions doing little work. > >> Is there any reason not to let y-or-n-p save match data? > > If you think y-or-n-p deserves saving the match-data then pretty much > all other functions deserve that change as well. =C2=A0And since > save-match-data is somewhat costly, it would imply a singificant > performance impact. Sorry, I just meant that since the functions that prompts the user can't really impact performance if we just add save-match-data to them we could do that just to get some more protection. It does not cure the problem that some functions running in timers forgets to save match data, but perhaps it catches some actually occuring problem cases. From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: martin rudalics , 3863@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 17 Jul 2009 08:05:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3863-submit@emacsbugs.donarmstrong.com id=B3863.1247817468592 (code B ref 3863); Fri, 17 Jul 2009 08:05:05 +0000 Received: (at 3863) by emacsbugs.donarmstrong.com; 17 Jul 2009 07:57:48 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.5 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n6H7vfEH000582 for <3863@emacsbugs.donarmstrong.com>; Fri, 17 Jul 2009 00:57:43 -0700 Received: (qmail invoked by alias); 17 Jul 2009 07:57:35 -0000 Received: from 62-47-36-157.adsl.highway.telekom.at (EHLO [62.47.36.157]) [62.47.36.157] by mail.gmx.net (mp070) with SMTP; 17 Jul 2009 09:57:35 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18vJqtR2tovSssS6q7ikzjOv5KVrCGNGBy+v3WmUn EXOT6/1E+SukBK Message-ID: <4A602EED.9040404@gmx.at> Date: Fri, 17 Jul 2009 09:57:33 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Stefan Monnier CC: 3863@debbugs.gnu.org References: <87bpnkk88s.fsf@stupidchicken.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.8 > If you think y-or-n-p deserves saving the match-data then pretty much > all other functions deserve that change as well. And since > save-match-data is somewhat costly, it would imply a singificant > performance impact. You're obviously right and I meanwhile also learned to share your earlier reservations wrt `looking-at-p' and `string-match-p'. However, the underlying problem deserves a profound explanation in the Elisp manual in oder to avoid such discussions in the future. So please, pretty please, write one. martin From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: Chong Yidong , 3863@debbugs.gnu.org Resent-From: Chong Yidong Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 17 Jul 2009 14:50:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3863-submit@emacsbugs.donarmstrong.com id=B3863.12478418616007 (code B ref 3863); Fri, 17 Jul 2009 14:50:04 +0000 Received: (at 3863) by emacsbugs.donarmstrong.com; 17 Jul 2009 14:44:21 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.9 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po30.its.yale.edu (pantheon-po30.its.yale.edu [130.132.50.4]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6HEiHac006002 for <3863@emacsbugs.donarmstrong.com>; Fri, 17 Jul 2009 07:44:18 -0700 Received: from furry (dhcp128036014244.central.yale.edu [128.36.14.244]) (authenticated bits=0) by pantheon-po30.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6HEi94G020792 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 17 Jul 2009 10:44:10 -0400 Received: by furry (Postfix, from userid 1000) id E66F8C09B; Thu, 16 Jul 2009 23:54:55 -0400 (EDT) From: Chong Yidong To: Stefan Monnier Cc: 3863@debbugs.gnu.org, Kevin Ryde References: <87bpnkk88s.fsf@stupidchicken.com> <87d480cvb0.fsf@stupidchicken.com> Date: Thu, 16 Jul 2009 23:54:55 -0400 In-Reply-To: (Stefan Monnier's message of "Thu, 16 Jul 2009 23:24:25 -0400") Message-ID: <873a8w2cc0.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) Stefan Monnier writes: >> I'm not sure what you're referring to. What other code runs during >> y-or-n-p (excluding timers, which are supposed to save the match data)? > > Timers, As the Lisp manual states, If a timer function calls functions that can change the match data, it should save and restore the match data. If a timer fails to do this, it's a bug, and should be fixed. From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: Stefan Monnier , 3863@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 17 Jul 2009 16:05:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3863-submit@emacsbugs.donarmstrong.com id=B3863.124784644319279 (code B ref 3863); Fri, 17 Jul 2009 16:05:07 +0000 Received: (at 3863) by emacsbugs.donarmstrong.com; 17 Jul 2009 16:00:43 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pruche.dit.umontreal.ca (pruche.dit.umontreal.ca [132.204.246.22]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6HG0c4w019270 for <3863@emacsbugs.donarmstrong.com>; Fri, 17 Jul 2009 09:00:39 -0700 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n6HG0dNI002375; Fri, 17 Jul 2009 12:00:39 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 585803A39C; Fri, 17 Jul 2009 12:00:36 -0400 (EDT) From: Stefan Monnier To: Chong Yidong Cc: 3863@debbugs.gnu.org, Kevin Ryde Message-ID: References: <87bpnkk88s.fsf@stupidchicken.com> <87d480cvb0.fsf@stupidchicken.com> <873a8w2cc0.fsf@stupidchicken.com> Date: Fri, 17 Jul 2009 12:00:36 -0400 In-Reply-To: <873a8w2cc0.fsf@stupidchicken.com> (Chong Yidong's message of "Thu, 16 Jul 2009 23:54:55 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3320=0 >>> I'm not sure what you're referring to. What other code runs during >>> y-or-n-p (excluding timers, which are supposed to save the match data)? >> >> Timers, > As the Lisp manual states, > If a timer function calls functions that can change the match data, > it should save and restore the match data. > If a timer fails to do this, it's a bug, and should be fixed. Wonderful, so we all agree there's no need to make y-or-n-p save the match-data. Stefan From unknown Sun Jun 22 11:34:13 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Reply-To: Kevin Ryde , 3863@debbugs.gnu.org Resent-From: Kevin Ryde Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 06 Aug 2009 01:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3863-submit@emacsbugs.donarmstrong.com id=B3863.124952024213408 (code B ref 3863); Thu, 06 Aug 2009 01:05:04 +0000 Received: (at 3863) by emacsbugs.donarmstrong.com; 6 Aug 2009 00:57:22 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.1 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout1.pacific.net.au (mailout1-1.pacific.net.au [61.8.2.208]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n760vK6f013404 for <3863@emacsbugs.donarmstrong.com>; Wed, 5 Aug 2009 17:57:22 -0700 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 5AA9C4F7141; Thu, 6 Aug 2009 10:57:19 +1000 (EST) Received: from blah.blah (ppp2B55.dyn.pacific.net.au [61.8.43.85]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id E70D98C2F; Thu, 6 Aug 2009 10:57:18 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MYrHf-0007s0-Oo; Thu, 06 Aug 2009 10:56:43 +1000 From: Kevin Ryde To: Chong Yidong Cc: 3863@debbugs.gnu.org References: <87bpnkk88s.fsf@stupidchicken.com> Date: Thu, 06 Aug 2009 10:56:43 +1000 In-Reply-To: <87bpnkk88s.fsf@stupidchicken.com> (Chong Yidong's message of "Thu, 16 Jul 2009 10:33:39 -0400") Message-ID: <87tz0lsqt0.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Chong Yidong writes: > > Could you > provide a reproducible test-case for the clobbering of the match data? When I struck it, which is a while ago now, it was intermittent. It could even have been some of my own input defadvice stuff, though I thought it wasn't. From unknown Sun Jun 22 11:34:13 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Kevin Ryde Subject: bug#3863 closed by Kevin Ryde (Re: bug#3863: 23.1.50; possible save-match-data in copyright.el) Message-ID: References: <87fxa27iuo.fsf@blah.blah> <87ocrla3vw.fsf@blah.blah> X-Emacs-PR-Message: they-closed 3863 X-Emacs-PR-Package: emacs Reply-To: 3863@debbugs.gnu.org Date: Fri, 02 Oct 2009 00:20:07 +0000 Content-Type: multipart/mixed; boundary="----------=_1254442807-28259-1" This is a multi-part message in MIME format... ------------=_1254442807-28259-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: #3863: 23.1.50; possible save-match-data in copyright.el It has been closed by Kevin Ryde . 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 Kevin Ryde by replying to this email. --=20 3863: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D3863 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1254442807-28259-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 3863-done) by emacsbugs.donarmstrong.com; 2 Oct 2009 00:14:37 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout1.pacific.net.au (mailout1-1.pacific.net.au [61.8.2.208]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n920EZUN027506 for <3863-done@emacsbugs.donarmstrong.com>; Thu, 1 Oct 2009 17:14:37 -0700 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 53A5D5084D4 for <3863-done@emacsbugs.donarmstrong.com>; Fri, 2 Oct 2009 10:14:34 +1000 (EST) Received: from blah.blah (ppp24D8.dyn.pacific.net.au [61.8.36.216]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id E1EF28C17 for <3863-done@emacsbugs.donarmstrong.com>; Fri, 2 Oct 2009 10:14:33 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MtVmi-0006VL-1D for 3863-done@emacsbugs.donarmstrong.com; Fri, 02 Oct 2009 10:14:08 +1000 From: Kevin Ryde To: 3863-done@debbugs.gnu.org Subject: Re: bug#3863: 23.1.50; possible save-match-data in copyright.el References: <87ocrla3vw.fsf@blah.blah> Date: Fri, 02 Oct 2009 10:14:07 +1000 In-Reply-To: (Stefan Monnier's message of "Wed, 15 Jul 2009 22:01:47 -0400") Message-ID: <87fxa27iuo.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Closing for, Stefan Monnier writes: > > installed, ------------=_1254442807-28259-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 16 Jul 2009 00:05:56 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.6 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6G05pEL004146 for ; Wed, 15 Jul 2009 17:05:52 -0700 Received: from mx10.gnu.org ([199.232.76.166]:38386) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MRETv-0001lR-0j for emacs-pretest-bug@gnu.org; Wed, 15 Jul 2009 20:05:51 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MRETt-0006GI-9T for emacs-pretest-bug@gnu.org; Wed, 15 Jul 2009 20:05:50 -0400 Received: from mailout2-10.pacific.net.au ([125.255.80.137]:57426 helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRETs-0006G4-Hz for emacs-pretest-bug@gnu.org; Wed, 15 Jul 2009 20:05:49 -0400 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 3BEEF18103A for ; Thu, 16 Jul 2009 10:05:46 +1000 (EST) Received: from blah.blah (ppp29B9.dyn.pacific.net.au [61.8.41.185]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 6F9638C1E for ; Thu, 16 Jul 2009 10:05:45 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MRETj-0002Mu-Mf for emacs-pretest-bug@gnu.org; Thu, 16 Jul 2009 10:05:39 +1000 From: Kevin Ryde To: emacs-pretest-bug@gnu.org Subject: 23.1.50; possible save-match-data in copyright.el Date: Thu, 16 Jul 2009 10:05:39 +1000 Message-ID: <87ocrla3vw.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) --=-=-= In recent copyright.el I noticed copyright-update using the match data after a y-or-n-p query. Is that a good idea? When running it in emacs 22 I seemed to sometimes get the match data clobbered by y-or-n-p. I never tracked down the circumstances, but wondered if copyright.el shouldn't rely on what an input func like y-or-n-p could do, per diff below. In GNU Emacs 23.1.50.1 (i586-pc-linux-gnu, GTK+ Version 2.16.4) of 2009-07-12 on blah.blah configured using `configure 'CFLAGS=-O -g' '--prefix=/down/emacs/b/inst' '--with-x-toolkit=gtk'' 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_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t 2009-07-16 Kevin Ryde * emacs-lisp/copyright.el (copyright-update): save-match-data across y-or-n-p, for safety. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=copyright.el.save-match-data.diff *** copyright.el 16 Jul 2009 09:44:20 +1000 1.81 --- copyright.el 16 Jul 2009 09:55:57 +1000 *************** *** 223,230 **** (< (string-to-number (match-string 3)) (string-to-number copyright-current-gpl-version)) (or noquery ! (y-or-n-p (format "Replace GPL version by %s? " ! copyright-current-gpl-version))) (progn (if (match-end 2) ;; Esperanto bilingual comment in two-column.el --- 223,231 ---- (< (string-to-number (match-string 3)) (string-to-number copyright-current-gpl-version)) (or noquery ! (save-match-data ! (y-or-n-p (format "Replace GPL version by %s? " ! copyright-current-gpl-version)))) (progn (if (match-end 2) ;; Esperanto bilingual comment in two-column.el --=-=-=-- ------------=_1254442807-28259-1--