From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: with-current-buffer "cleanup" bug Date: Sat, 14 Nov 2009 13:07:29 -0500 Message-ID: References: <87d43lm7ev.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258222071 4914 80.91.229.12 (14 Nov 2009 18:07:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Nov 2009 18:07:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 14 19:07:44 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N9N2F-0003Il-QB for ged-emacs-devel@m.gmane.org; Sat, 14 Nov 2009 19:07:44 +0100 Original-Received: from localhost ([127.0.0.1]:33695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9N2F-0001Yd-El for ged-emacs-devel@m.gmane.org; Sat, 14 Nov 2009 13:07:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N9N29-0001YN-7I for emacs-devel@gnu.org; Sat, 14 Nov 2009 13:07:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N9N23-0001Vh-Tl for emacs-devel@gnu.org; Sat, 14 Nov 2009 13:07:36 -0500 Original-Received: from [199.232.76.173] (port=44979 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9N23-0001Va-MQ for emacs-devel@gnu.org; Sat, 14 Nov 2009 13:07:31 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:32996 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N9N23-0002sp-2x for emacs-devel@gnu.org; Sat, 14 Nov 2009 13:07:31 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArcEAJOA/kpMCqHJ/2dsb2JhbACBTdFOhDwEiT4 X-IronPort-AV: E=Sophos;i="4.44,742,1249272000"; d="scan'208";a="49422606" Original-Received: from 76-10-161-201.dsl.teksavvy.com (HELO pastel.home) ([76.10.161.201]) by ironport2-out.pppoe.ca with ESMTP; 14 Nov 2009 13:07:29 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 7C055F2149; Sat, 14 Nov 2009 13:07:29 -0500 (EST) In-Reply-To: <87d43lm7ev.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 14 Nov 2009 10:51:20 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116986 Archived-At: > If you're wholesale changing `save-excursion + set-buffer' to > `with-current-buffer', this is wrong. The change may be wrong, but the original code is wrong too. Which is why I'm happily applying the change: when it uncovers a bug, the right fix is almost always to use some other code because the problem can appear even with the original code. > The `with-current-buffer' macro > does not save point (or mark), so this can lead to code behavior change. > You need to fix this, or we're likely see a long slow trickle of related > bugs in the coming weeks and months. Yes, I'm waiting for those bugs indeed, Stefan