From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#16816: 24.3.50; erroneous docstring in with-temp-buffer-window Date: Fri, 21 Feb 2014 14:08:43 +0100 Message-ID: <53074FDB.4040907@gmx.at> References: <87sire4wqw.fsf@yahoo.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1392988167 19298 80.91.229.3 (21 Feb 2014 13:09:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Feb 2014 13:09:27 +0000 (UTC) Cc: 16816@debbugs.gnu.org To: Nicolas Richard Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 21 14:09:34 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WGprA-0005hA-Il for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Feb 2014 14:09:32 +0100 Original-Received: from localhost ([::1]:44525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGpr7-0001Q7-43 for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Feb 2014 08:09:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGpqt-00019S-Fc for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 08:09:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGpqh-0008ED-3X for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 08:09:15 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33208) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGpqg-0008E8-Os for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 08:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WGpqg-00038p-Es for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 08:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Feb 2014 13:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16816 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16816-submit@debbugs.gnu.org id=B16816.139298813412047 (code B ref 16816); Fri, 21 Feb 2014 13:09:02 +0000 Original-Received: (at 16816) by debbugs.gnu.org; 21 Feb 2014 13:08:54 +0000 Original-Received: from localhost ([127.0.0.1]:34389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGpqY-00038E-5C for submit@debbugs.gnu.org; Fri, 21 Feb 2014 08:08:54 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:62760) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGpqW-000380-2G for 16816@debbugs.gnu.org; Fri, 21 Feb 2014 08:08:52 -0500 Original-Received: from [62.47.35.16] ([62.47.35.16]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MfzEP-1WbOxc3GTd-00NVTJ for <16816@debbugs.gnu.org>; Fri, 21 Feb 2014 14:08:45 +0100 In-Reply-To: <87sire4wqw.fsf@yahoo.fr> X-Provags-ID: V03:K0:psN5QVLvjAMLI3tsyX0y89WAEeFhYp50IlhLNRSu3NbOyr5/Y+F c4T/dt7RK+MrmrT+ItbOsUWejiOvi54nt7AMzxw42BoeEyIiHKELFB9HlT0mgsCmtACsnTs p97hjBmg/FC36+/ZpAbfWvzvgvaf56yZaUF66KXlSkP51fnZRNtCv4Bdu7XnBaZKc7Ga6lu kPU+Mp/PWKiSgpyMfiHgg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:85974 Archived-At: > The docstring of `with-temp-buffer-window' contains : > > It does not make the buffer current for BODY. > > (2nd sentence of 2nd paragraph). > > But I think that is wrong, because : > (with-temp-buffer-window > (get-buffer-create "foo") > nil > nil > (message "curbuf: %s" > (current-buffer))) > > outputs "curbuf: foo" > > If this is a docbug, here's a suggestion : > > --- a/lisp/window.el > +++ b/lisp/window.el > @@ -149,10 +149,9 @@ BUFFER-OR-NAME must specify either a live buffer, or the name of a > buffer (if it does not exist, this macro creates it). > > This construct makes buffer BUFFER-OR-NAME empty before running BODY. > -It does not make the buffer current for BODY. > -Instead it binds `standard-output' to that buffer, so that output > -generated with `prin1' and similar functions in BODY goes into > -the buffer. > +It makes the buffer current for BODY and binds `standard-output' to that > +buffer, so that output generated with `prin1' and similar functions in > +BODY goes into the buffer. > > At the end of BODY, this marks the specified buffer unmodified and > read-only, and displays it in a window (but does not select it, or make `with-temp-buffer-window' should behave as `with-output-to-temp-buffer' in this regard (at least I hope so). So in revision 116509 I moved the evaluation of BODY out of the scope of `with-current-buffer'. If this causes problems, I will revert and use your patch. Thanks, martin