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: with-current-buffer Date: Mon, 11 Nov 2019 09:31:08 +0100 Message-ID: <64fa1379-950d-2d3c-1104-c8097425ebe6@easy-emacs.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="40652"; 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 09:27:07 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 1iU52R-000ANc-9g for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Nov 2019 09:27:07 +0100 Original-Received: from localhost ([::1]:49942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iU52Q-0006G8-59 for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Nov 2019 03:27:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33055) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iU52G-0006G0-9y for help-gnu-emacs@gnu.org; Mon, 11 Nov 2019 03:26:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iU52F-0005G8-9J for help-gnu-emacs@gnu.org; Mon, 11 Nov 2019 03:26:56 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.134]:58205) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iU52E-0005ED-WD for help-gnu-emacs@gnu.org; Mon, 11 Nov 2019 03:26:55 -0500 Original-Received: from [192.168.178.39] ([88.130.49.184]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mk0a0-1i1e6r0wqe-00kQA8 for ; Mon, 11 Nov 2019 09:26:49 +0100 Content-Language: en-US X-Provags-ID: V03:K1:5P6IaOtKEOKF1RpxdEu1RlYU/k2SZZ+pEpheIblF2Jc2GPKyoPV Rgxkp7vHTuoADJQ+aEVO7GQaEJWDdBlmRI8/a4txXpxNZjmKE30xL3cCktf0uYfBhUjDrDq ZWf+QwqGwucbkPRqnkf++7TzuiTJS65W/liJbIUo1+NHtKIBSJlMRLbggsBbvIDIpWzKD6H qBZeZM2P2L4jC0EATuzEQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:7RcvZDVxuqg=:fllVtltr09sJxbmSff8D4a rx0hFp8dznxk60Z8p9XNBzB7BLN2rSSO0Dz3dBa+ms8xADiQAkMKt1LgrJpU29dNMwk3w0LX6 oN9cocu9aVlqkv5jO0YoupnWKKYRzlZeMvXojfv7GnjgQZ6xDpS6Xqb45iphdEHSMhLCVMZhM XA4fMIkfefebABsXtbcb9KIHDv174CyeavR3mSwFh6y4imzBQFcfZwgzMy08KU332Wg28IBXL AIy0BHnOVFo2p7fc8Dga9nU6PHOKS3kB7qih/HH5ZuXkUOJ+mVSu5TFzdGeW2HUURm5oFqCSK RS0fsB66EYpQ5ARxP8jDs+eAnrLZxDlYJsmDS9EPkoNiLTKIyePV5YbyB6WKG7KjQWJrPCT2x l6m/DyHq/kXT5zt643K9noug+ejvidZsxeEgvl6N5/bP3ThSqc9lq7GJo14ReQrG+JKHIPIEq dGhDhrFgZc3J4P79Mt9vOBUVFqjkjM3vyeu6y0VmAF4BkK3INbUwNWRSIBrOa2lG6lsbUjxuy XmMDEWhDpnE4acFktjL9xGXTaCqTT2FzyiZxXfEtLjq68cbTGnE2N/VZjirzTPFo7qRfdz59Q Aj4mVX59Yoz5K2nFDxOgKKl4CWoD/d/qpAl/kPtKaYz5oEhdgEeeUF4GowtdiHaB7e5zRrI2o P00BvbF6TNP7TIBYaIqB4KsJxISqO50BaQvYG2LirD+4Fd7J/yaHq3HRQd81mAedSNwOCnGTj e+Rja+5kaIfMz1sb4Zzk8Mm2tZKY6How4H6uaMeOTOZRsjjNTyCMSuAr6dED96F6gfvM51nq X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.134 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:121820 Archived-At: Hi, docstring of "with-current-buffer" says: "Execute the forms in BODY with BUFFER-OR-NAME temporarily 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: (defmacro with-current-buffer (buffer-or-name &rest body)   "Execute the forms in BODY with BUFFER-OR-NAME temporarily current. BUFFER-OR-NAME must be a buffer or the name of an existing buffer. The value returned is the value of the last form in BODY.  See also `with-temp-buffer'."   (declare (indent 1) (debug t))   `(save-current-buffer      (set-buffer ,buffer-or-name)      ,@body)) A bug? Thanks, Andreas, GNU Emacs 26.3 (build 1, i686-pc-linux-gnu, GTK+ Version 3.14.5) of 2019-09-04