From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emilio Lopes Newsgroups: gmane.emacs.devel Subject: Re: with-current-buffer Date: Sun, 11 Sep 2005 21:23:03 +0200 Organization: The Church of Emacs Message-ID: References: <877jdntumk.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1126467169 1356 80.91.229.2 (11 Sep 2005 19:32:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 11 Sep 2005 19:32:49 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 11 21:32:46 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EEXYz-0000Ik-1f for ged-emacs-devel@m.gmane.org; Sun, 11 Sep 2005 21:32:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EEXYy-0008Lm-95 for ged-emacs-devel@m.gmane.org; Sun, 11 Sep 2005 15:32:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EEXYV-0008Fw-NR for emacs-devel@gnu.org; Sun, 11 Sep 2005 15:31:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EEXXZ-000864-2b for emacs-devel@gnu.org; Sun, 11 Sep 2005 15:31:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EEXXW-0007s9-6p for emacs-devel@gnu.org; Sun, 11 Sep 2005 15:30:58 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EEXSh-000122-Is for emacs-devel@gnu.org; Sun, 11 Sep 2005 15:25:59 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EEXQe-0004OL-AD for emacs-devel@gnu.org; Sun, 11 Sep 2005 21:23:52 +0200 Original-Received: from p62.246.55.135.tisdip.tiscali.de ([62.246.55.135]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Sep 2005 21:23:52 +0200 Original-Received: from eclig by p62.246.55.135.tisdip.tiscali.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Sep 2005 21:23:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 17 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p62.246.55.135.tisdip.tiscali.de User-Agent: Emacs Gnus Cancel-Lock: sha1:zX2EJPm0G/+vG0Fyh3golAyU/K4= 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:42824 Archived-At: Stefan Monnier writes: >> In both cases the insertion is done at the right spot, but in case >> 1 point in buffer "FOO" is restored after the code is executed. >> Is that intended behavior? >> I expected point to be moved permanently in both cases. > Which point? The point in buffer "FOO", of course. I expected the point to stay at point max after `with-current-buffer' exits. In the case 1 explained in the original message the code behaves as if it were wrapped with `save-excursion'. Can you reproduce it?