From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: `save-excursion' defeated by `set-buffer' Date: Thu, 24 Dec 2009 10:03:55 +0100 Organization: Organization?!? Message-ID: <87skb0iw04.fsf@lola.goethe.zz> References: <87aaxdqwqv.fsf@regnitz.physics.niu.edu> <876380nvnt.fsf@lola.goethe.zz> <87hbrijbyg.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1261647114 9610 80.91.229.12 (24 Dec 2009 09:31:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Dec 2009 09:31:54 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 24 10:31:47 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 1NNk1J-0001HX-Iz for ged-emacs-devel@m.gmane.org; Thu, 24 Dec 2009 10:30:09 +0100 Original-Received: from localhost ([127.0.0.1]:48719 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNk0N-0006c9-Mp for ged-emacs-devel@m.gmane.org; Thu, 24 Dec 2009 04:29:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NNjcV-00079I-Ds for emacs-devel@gnu.org; Thu, 24 Dec 2009 04:04:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NNjcQ-000773-87 for emacs-devel@gnu.org; Thu, 24 Dec 2009 04:04:30 -0500 Original-Received: from [199.232.76.173] (port=39658 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNjcP-00076z-R8 for emacs-devel@gnu.org; Thu, 24 Dec 2009 04:04:26 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:32775) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NNjcP-0000jw-CK for emacs-devel@gnu.org; Thu, 24 Dec 2009 04:04:25 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NNjcJ-00006x-3I for emacs-devel@gnu.org; Thu, 24 Dec 2009 10:04:19 +0100 Original-Received: from p5b2c276f.dip.t-dialin.net ([91.44.39.111]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Dec 2009 10:04:19 +0100 Original-Received: from dak by p5b2c276f.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Dec 2009 10:04:19 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 20 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p5b2c276f.dip.t-dialin.net X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) Cancel-Lock: sha1:VUlBH19I/vcNBgXCPvp94N9jWQ8= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:118809 Archived-At: Stefan Monnier writes: >>> Irrelevant: neither example uses (save-excursion (set-buffer ..) ...). >> Don't be disingenuous. with-temp-buffer uses with-current-buffer, which >> is basically (save-current-buffer (set-buffer ... > > save-current-buffer != save-excursion > > This warning is specificaly aimed at reminding people that the two are > different, so you clearly need to see this warning a few more times > before you start to understand what it's about. And you clearly need to reread my post to understand what it's about. If you macroexpand with-temp-buffer and save-current-buffer, my argument still holds: the warning is wrong, and the macro-expanded code explicitly uses all those commands which you claim are equivalent in this situation, with different results. -- David Kastrup