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: with-current-buffer Date: Sun, 11 Sep 2005 17:00:53 +0200 Organization: The Church of Emacs Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1126453016 29418 80.91.229.2 (11 Sep 2005 15:36:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 11 Sep 2005 15:36:56 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 11 17:36:55 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EETri-0000LD-Tb for ged-emacs-devel@m.gmane.org; Sun, 11 Sep 2005 17:35:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EETri-0006q8-AS for ged-emacs-devel@m.gmane.org; Sun, 11 Sep 2005 11:35:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EETn1-0005BU-TZ for emacs-devel@gnu.org; Sun, 11 Sep 2005 11:30:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EETmr-00055b-4k for emacs-devel@gnu.org; Sun, 11 Sep 2005 11:30:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EETmq-00054u-Ba for emacs-devel@gnu.org; Sun, 11 Sep 2005 11:30:32 -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 1EETm1-0003Ml-82 for emacs-devel@gnu.org; Sun, 11 Sep 2005 11:29:41 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EETkG-0005MN-D1 for emacs-devel@gnu.org; Sun, 11 Sep 2005 17:27:52 +0200 Original-Received: from p62.246.58.78.tisdip.tiscali.de ([62.246.58.78]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Sep 2005 17:27:52 +0200 Original-Received: from eclig by p62.246.58.78.tisdip.tiscali.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Sep 2005 17:27:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 25 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p62.246.58.78.tisdip.tiscali.de User-Agent: Emacs Gnus Cancel-Lock: sha1:AcU3wVOW9zyQhEry3TE+yFDOwfs= 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:42821 Archived-At: Start Emacs (latest CVS on GNU/Linux) with ./src/emacs --no-init-file --no-site-file Display a buffer, let's say "FOO", with some content. Move point to its beginning. Insert the following code in the "*scratch*" buffer: (with-current-buffer "FOO" (goto-char (point-max)) (insert "bar")) Now execute the code above in these two different situations: 1- The buffer "FOO" is visible along with the "*scratch*" buffer. 2- The buffer "FOO" is not visible. 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 the point to be moved permanently in both cases.