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: display-buffer-alist simplifications Date: Sat, 23 Jul 2011 20:40:11 +0200 Message-ID: <4E2B158B.1080101@gmx.at> References: <87mxgem09k.fsf@stupidchicken.com> <4E2A7EBD.7050300@gmx.at> <87livooqt6.fsf@stupidchicken.com> 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 1311446424 10959 80.91.229.12 (23 Jul 2011 18:40:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 23 Jul 2011 18:40:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 23 20:40:20 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 1Qkh7b-000253-VU for ged-emacs-devel@m.gmane.org; Sat, 23 Jul 2011 20:40:20 +0200 Original-Received: from localhost ([::1]:56370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qkh7b-0003qp-IB for ged-emacs-devel@m.gmane.org; Sat, 23 Jul 2011 14:40:19 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qkh7Y-0003qZ-11 for emacs-devel@gnu.org; Sat, 23 Jul 2011 14:40:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qkh7W-0007Gs-W1 for emacs-devel@gnu.org; Sat, 23 Jul 2011 14:40:15 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:37630) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Qkh7W-0007Go-JF for emacs-devel@gnu.org; Sat, 23 Jul 2011 14:40:14 -0400 Original-Received: (qmail invoked by alias); 23 Jul 2011 18:40:13 -0000 Original-Received: from 62-47-59-131.adsl.highway.telekom.at (EHLO [62.47.59.131]) [62.47.59.131] by mail.gmx.net (mp028) with SMTP; 23 Jul 2011 20:40:13 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18m4X4PkPAmlc7f1f7g3wYezw53Y3eOvmWML3rEU+ BVtLTGVZVSgEXk User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <87livooqt6.fsf@stupidchicken.com> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 213.165.64.22 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:142237 Archived-At: > No. Each specifier must not affect the behavior of the other specifiers > in the list. As soon as one specifier triggers, the following > specifiers must be ignored. That is, the specifier list should be an OR > list, not some complicated combination of AND and OR. > > If you wanted the first specifier to never reuse the selected window > even if it shows the buffer, the alist should be something like > > (setq > display-buffer-alist > '(".*" > (reuse-window :buffer same :window other) > (reuse-window :window other) > > One more thing. Put the even-sizes option into the specifier, not in > its own entry, like this: > > (setq > display-buffer-alist > '(".*" > (reuse-window :buffer same :even-sizes t) > (reuse-window :window other :even-sizes t))) So you mean to choose the third proposal (3) Disallow lookup for further occurrences of the same specifier. This implies that we'd have to write (setq display-buffer-alist '(".*" (reuse-window :buffer same :even-sizes t) (reuse-window :window other :even-sizes t))) from my earlier list ;-) This has the disadvantage that Lisp users would have to set the value of every specifier like even-sizes unless it's nil. In practice, this means that you have to repeat the values of min-height and min-width for pop-up-windows and the value of pop-up-frame-alist for each and every entry that wants to use them. This can be done but it's tedious and contradicts Emacs 23 practice where things like `pop-up-frame-alist' and `special-display-frame-alist' are specified once only. The major problem with this approach, however, is an inconsistency when handling specifiers passed by the application. Currently, these specifiers are merged into the user's specifiers. Suppose I write (setq display-buffer-alist '((((regexp . ".*")) (reuse-window nil same) (reuse-window-even-sizes . t)))) (display-buffer "*scratch*" '((reuse-window other))) then the `display-buffer' call does even window sizes because it's specified in `display-buffer-alist'. What would you propose here? A similar issue occurs when merging in specifiers corresponding to Emacs 23 options. Currently, the reuse-window-even-sizes specifier is set for all buffers from the value of `even-window-heights' which is t by default. This produces a normalized specifier which is respected whenever a window is reused but not written into `display-buffer-alist'. How should I proceed here? martin