From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: display-buffer-alist simplifications Date: Wed, 17 Aug 2011 12:27:14 +0300 Organization: JURTA Message-ID: <87fwl0v4yu.fsf@mail.jurta.org> References: <87mxgem09k.fsf@stupidchicken.com> <87mxfnn414.fsf@stupidchicken.com> <4E3D41F2.8060801@gmx.at> <4E3FA812.3080009@gmx.at> <87zkjkb572.fsf@mail.jurta.org> <4E3FD5ED.5000206@gmx.at> <4E412E2D.90908@gmx.at> <4E422ECA.2020207@gmx.at> <4E43A253.9040404@gmx.at> <4E45330C.9060801@gmx.at> <87zkjev76f.fsf@stupidchicken.com> <4E467FD5.3000404@gmx.at> <87liuucq0d.fsf@mail.jurta.org> <4E4A8EA6.2070906@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1313573617 3468 80.91.229.12 (17 Aug 2011 09:33:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 17 Aug 2011 09:33:37 +0000 (UTC) Cc: Chong Yidong , Stefan Monnier , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 17 11:33:31 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QtcV8-0000WU-ER for ged-emacs-devel@m.gmane.org; Wed, 17 Aug 2011 11:33:30 +0200 Original-Received: from localhost ([::1]:42190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtcV7-0004bi-Uo for ged-emacs-devel@m.gmane.org; Wed, 17 Aug 2011 05:33:29 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:56135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtcV5-0004Wq-1c for emacs-devel@gnu.org; Wed, 17 Aug 2011 05:33:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QtcV4-0006YY-3k for emacs-devel@gnu.org; Wed, 17 Aug 2011 05:33:27 -0400 Original-Received: from smarty.dreamhost.com ([208.113.175.8]:54416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtcV3-0006YL-VT for emacs-devel@gnu.org; Wed, 17 Aug 2011 05:33:26 -0400 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id EF4956E8054; Wed, 17 Aug 2011 02:33:24 -0700 (PDT) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id E1149451C37A; Wed, 17 Aug 2011 02:33:20 -0700 (PDT) In-Reply-To: <4E4A8EA6.2070906@gmx.at> (martin rudalics's message of "Tue, 16 Aug 2011 17:37:10 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.113.175.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143359 Archived-At: >> Also provide a parameter to resize the reused window. > > So far we only even the size of a reused window. Adjusting the size is also necessary with `fit-window-to-buffer' (optionally) like in `dired-pop-to-buffer'. >> 3. Otherwise, taking into account min-height try to create a new window >> with the specified height at the bottom of the selected frame. > > Calling `display-buffer-pop-up-window' with root and below as only > choices, passing min-height and the specified height as arguments. In `dired-pop-to-buffer', `min-height' is specified as an argument of `fit-window-to-buffer'. It would be good instead of (fit-window-to-buffer (display-buffer-pop-up-window " *Marked Files*" '((root . below))) nil 1) to specify that as (display-buffer-pop-up-window " *Marked Files*" '((root . below) (min-height . 1) (fit-to-buffer . t))) This could avoid calling `fit-window-to-buffer' directly, because `display-buffer-pop-up-window' could interpret the parameter `fit-to-buffer' as an indication to calculate the height of the created window from the number of lines in the buffer to be displayed. >> 4. Otherwise, reuse any available window on the selected frame. >> Provide a parameter to define the order of different methods: >> largest, lru, rightmost, etc. > > `display-buffer-reuse-window' doesn't recognize these methods yet. We > would either have to get them manually and pass the windows directly or > expand the semantics of the second argument. They could share the same semantics to find the window to reuse/split.