From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Newsgroups: gmane.emacs.help Subject: Re: with-current-buffer Date: Mon, 11 Nov 2019 11:58:43 +0100 Message-ID: <51efbc77-10e6-47c9-2a2e-12be42e65da9@easy-emacs.de> References: <64fa1379-950d-2d3c-1104-c8097425ebe6@easy-emacs.de> <20191111090459.GB15847@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="161344"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 11 11:56:40 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iU7N9-000frI-D0 for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Nov 2019 11:56:39 +0100 Original-Received: from localhost ([::1]:50936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iU7N8-0001LD-4t for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Nov 2019 05:56:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53547) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iU7Mx-0001Ku-OJ for help-gnu-emacs@gnu.org; Mon, 11 Nov 2019 05:56:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iU7Mw-0001GU-ON for help-gnu-emacs@gnu.org; Mon, 11 Nov 2019 05:56:27 -0500 Original-Received: from mout.kundenserver.de ([217.72.192.74]:57149) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iU7L0-0000lF-CW for help-gnu-emacs@gnu.org; Mon, 11 Nov 2019 05:56:26 -0500 Original-Received: from [192.168.178.39] ([88.130.49.184]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MTREY-1iKEt21f7U-00Tpim for ; Mon, 11 Nov 2019 11:54:24 +0100 In-Reply-To: <20191111090459.GB15847@tuxteam.de> Content-Language: en-US X-Provags-ID: V03:K1:30tNvAAdyP/qkL1yDzFiOxUmpE4VKx8LSGHrAcGI6Ar6lTHrhPa D9h4jWO2mxlUDxBhaqH0/wxoT+SHU9RdBxByXmCk9DXN6CCy1J/4u6BitPfLVp2JDjoYStb VfifH46aV4t1KvdbWIc8CuOTqshmkWEkyFd0ogw1ucMvsIEkXrsPLhFfxpRK6b4ZwVb18GT buVbQ+Tay/j4PHmh90fPQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:LlbvFhzf3fA=:iVSMm1xJlaWksLcHNJ9zfE siRriUNkiY0qNQ3SKg3m5O8l6aBJQKRr7K/wvMTJM/0o9s8YCu9+1/TJU4dyufbEIqWneOB7T qE5/vGIAxvVn7CIGWl1oc9PNSoKHbKq50d7N/qc+bUoarbS5W0wvCUPqoOU0yVQmyj7TnoagF Sd7yqaL+HxLCLPqI3K9o39CJrItsWAY9lAVj7uS4JyvMNfKCBZhKRUWGnDaKEeAX8G5ARbwOa L8nWwMDjWm1NCnwV9FGvNEpWuLLlcrvMBuu+UF6BI51JxHNuYAQHm1d6qVKzWR50weZq4NgP0 1prYPSK39+cWYzynyl3Od5TqaC5R1TT4G7t4UoILb3eIlueTMTXCoCtlzGP3uuA2Qzid47AHc I8609bvYGx6jn4fGhwj3tX8hWgpAp0IemuZdd/1V8MFdblabahv/axB36arD7bMV1fJnW3dK/ kjGHR/zEaiIjI8zJuSy3Soqsrwf/kZmnzxyWLwppXF0HsGZztwTVQtGnOFht33cxlL7MJl2Hm PLyTGmtPEMnFu3wH7yzfkwJNx6CaFNj7mPGYoaRHPO7cYB5YsfQOo/5Xo2BCs3MrQDwhzE8zM Rd6WCBKGFk8BOPUbakrAhQdfweYeQSX13iMhAX3YISC7Qtycqn8a4QBdV0zqZbo8Rjzd+Xhut of07T8NKTi1hSGmME/5TcyXQbJz6cfcVN8Wco2imMjjZYpkW6/ZD2tb3Rg5cyqsfBeSX70Rsu ukecZCzpe60CIbBHYJAVMfB09kUSXKqS2jUQwYY7d27owpohZ8o5+99JbBAxwCJrokNiOrfI X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.74 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121822 Archived-At: On 11.11.19 10:04, tomas@tuxteam.de wrote: > On Mon, Nov 11, 2019 at 09:31:08AM +0100, Andreas Röhler wrote: >> Hi, >> >> docstring of "with-current-buffer" says: >> >> "Execute the forms in BODY with BUFFER-OR-NAME current." >> >> However, seems the old buffer isn't stored, buffer-or-name specified >> here remain current. >> >> Also don't see inside the macro which way the old buffer should be restored: > This is the job of save-current-buffer, no? > > Cheers > -- tomás Hi Tomás, thanks. So I have to write something like (save-current-buffer         (with-current-buffer buffer Expected a behavior like with-temp-buffer. As the wording "temporarily" seems to indicate. Cheers, Andreas