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: save-excursion again Date: Thu, 01 Jul 2010 02:30:06 +0200 Message-ID: References: <19483.43525.253000.115910@gargle.gargle.HOWL> <87pqzncc0y.fsf@uwakimon.sk.tsukuba.ac.jp> <87iq5fc4wj.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1277948794 7618 80.91.229.12 (1 Jul 2010 01:46:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 1 Jul 2010 01:46:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Uday S Reddy Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 01 03:46:32 2010 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.69) (envelope-from ) id 1OU8rE-0004LD-UM for ged-emacs-devel@m.gmane.org; Thu, 01 Jul 2010 03:46:29 +0200 Original-Received: from localhost ([127.0.0.1]:39813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OU8rE-00019w-B3 for ged-emacs-devel@m.gmane.org; Wed, 30 Jun 2010 21:46:28 -0400 Original-Received: from [140.186.70.92] (port=47254 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OU8r7-00019I-1L for emacs-devel@gnu.org; Wed, 30 Jun 2010 21:46:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OU8r3-00065X-E9 for emacs-devel@gnu.org; Wed, 30 Jun 2010 21:46:20 -0400 Original-Received: from smtp-04.vtx.ch ([194.38.175.93]:50158) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OU8r3-00065B-72 for emacs-devel@gnu.org; Wed, 30 Jun 2010 21:46:17 -0400 Original-Received: from ceviche.home (dyn.144-85-133-055.dsl.vtx.ch [144.85.133.55]) by smtp-04.vtx.ch (VTX Services SA) with ESMTP id 9177829AD34; Thu, 1 Jul 2010 03:46:15 +0200 (CEST) Original-Received: by ceviche.home (Postfix, from userid 20848) id 916B6660CC; Thu, 1 Jul 2010 02:30:06 +0200 (CEST) In-Reply-To: (Uday S. Reddy's message of "Sat, 26 Jun 2010 12:03:38 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:126574 Archived-At: > I think the point is that save-excursion has been saving too much. So, when > we see a save-excursion in a piece of code, we are not sure whether it was > meant to save the point and mark, or the current-buffer, or both. It seems > that the original developers were themselves unsure after a while. Yes, it's part of the tension between "DWIMish user commands" and "simple&predictable Lisp functions", where save-excursion has a kind of "DWIMish user-command" feeling to it (it does various things and you can keep using that single form for various purposes). > I took Stephen's point as saying that, if we have separate > save-current-buffer and save-region, with save-excursion strongly > discouraged, we would promote a clearer programming style. Probably. But then, for the same reasons, you'd also want to have save-point since save-region is so rarely needed. Stefan