From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Does display-buffer display the buffer or not? Date: Fri, 24 Dec 2010 10:31:58 +0100 Message-ID: <4D14688E.4090606@gmx.at> References: <87r5d7bn8s.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1293186067 5486 80.91.229.12 (24 Dec 2010 10:21:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Dec 2010 10:21:07 +0000 (UTC) Cc: Lennart Borgman , Emacs-Devel devel To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 24 11:21:03 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PW4li-0001l1-Rv for ged-emacs-devel@m.gmane.org; Fri, 24 Dec 2010 11:21:03 +0100 Original-Received: from localhost ([127.0.0.1]:44464 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PW4OQ-0007To-W3 for ged-emacs-devel@m.gmane.org; Fri, 24 Dec 2010 04:56:59 -0500 Original-Received: from [140.186.70.92] (port=42165 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PW4Bc-0004R7-5T for emacs-devel@gnu.org; Fri, 24 Dec 2010 04:43:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PW40G-00063A-VW for emacs-devel@gnu.org; Fri, 24 Dec 2010 04:32:02 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:40079 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PW40G-000634-JI for emacs-devel@gnu.org; Fri, 24 Dec 2010 04:32:00 -0500 Original-Received: (qmail invoked by alias); 24 Dec 2010 09:31:58 -0000 Original-Received: from 62-47-60-95.adsl.highway.telekom.at (EHLO [62.47.60.95]) [62.47.60.95] by mail.gmx.net (mp008) with SMTP; 24 Dec 2010 10:31:58 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+Q8PdVRVyQMAjlt8wzN4N18tIdnW0YPc+TyEBS53 yd1lYQc4W6DPZ/ User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <87r5d7bn8s.fsf@member.fsf.org> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:133933 Archived-At: > My first idea was that when you say NOT-THIS-WINDOW (t) and the current > FRAME (nil), but the current frame has only one window and is only of > minimal size, so no split can be done, then it must return nil and do > nothing. Unfortunately, testing that situation with > > (display-buffer "*info*" t nil) > > pops up a completely new frame showing *info*. Reading the docs a bit > further, there is > > ,----[ C-h f display-buffer RET ] > | [...] > | > | nil - consider windows on the selected frame (actually the > | last non-minibuffer frame) only. If, however, either > | `display-buffer-reuse-frames' or `pop-up-frames' is non-nil > | (non-nil and not graphic-only on a text-only terminal), > | consider all visible or iconified frames. > `---- > > Unfortunately, both `display-buffer-reuse-frames' and `pop-up-frames' > are nil, here. > > I do think that creating a new frame is appropriate in the situation > above, but the docs should make that clear. Currently, they don't match > the implemented behavior. The Elisp manual says If all options described above fail to produce a suitable window, `display-buffer' tries to reuse an existing window. As a last resort, it will try to display BUFFER-OR-NAME on a separate frame. In that case, the value of `pop-up-frames' is disregarded. I never investigated whether this occurs in practice and what happens, for example, on non-graphic displays. It's just a fallback method and I'm not sure whether it's worth mentioning in the doc-string. martin