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: Sun, 17 Jul 2011 11:41:46 +0200 Message-ID: <4E22AE5A.4020507@gmx.at> References: <87mxgem09k.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1310895947 19540 80.91.229.12 (17 Jul 2011 09:45:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 17 Jul 2011 09:45:47 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 17 11:45:39 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 1QiNus-0005bw-I5 for ged-emacs-devel@m.gmane.org; Sun, 17 Jul 2011 11:45:38 +0200 Original-Received: from localhost ([::1]:43855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QiNur-0005ka-An for ged-emacs-devel@m.gmane.org; Sun, 17 Jul 2011 05:45:37 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QiNrH-0004wM-JT for emacs-devel@gnu.org; Sun, 17 Jul 2011 05:41:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QiNrF-0005kw-VK for emacs-devel@gnu.org; Sun, 17 Jul 2011 05:41:55 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:36487) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QiNrF-0005ks-FY for emacs-devel@gnu.org; Sun, 17 Jul 2011 05:41:53 -0400 Original-Received: (qmail invoked by alias); 17 Jul 2011 09:41:51 -0000 Original-Received: from 62-47-46-64.adsl.highway.telekom.at (EHLO [62.47.46.64]) [62.47.46.64] by mail.gmx.net (mp024) with SMTP; 17 Jul 2011 11:41:51 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/6YfwlCjX6ARhTdg1kuE0BVPEdlU2T2+Ahpelc9x DSrwBZ2cFp6lKh User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: 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:142066 Archived-At: >> - Instead of allowing the car of each `display-buffer-alist' element to >> be a _list_ of matchers, let it just be a matcher. This is >> semantically cleaner, and more consistent with other facilities in >> Emacs, e.g. font-lock-keywords. Any caller desiring multiple >> matching conditions can just add multiple alist elements. > > Well, perhaps. No biggie IMHO. I just took this over from `special-display-regexps', `same-window-buffer-names' and friends. So I'd like to have an opinion from people with some practice in customizing these options. >> - Instead of buffer matchers that are cons cells like (name . NAME), >> (regexp . REGEXP), and (label . LABEL), just use strings or symbols. >> Strings are to be treated as regexps (if an exact match is desired, >> the caller uses regexp-quote); symbols are treated as label matchers. > > Yes, though the `name' case is perhaps common and it's a bit of a PITA > having to go through `regexp-quote'. This was an attempt to unify things like `special-display-regexps` and `special-display-buffer-names' into one option. Can we say, in retrospect, that having kept these two options distinct was not TRT? >> - Some of the display specifiers seem to allow contradictory meanings, >> e.g. >> >> (reuse-window same nil other) >> >> means to reuse the selected window, provided the window is not on the >> selected frame. What does this mean? And what happens if it's >> impossible for Emacs to meet the requirements of the specifier? This >> is not explained in the docstring. > > Yes! Hmmm... As I tried to explain there are two types of contradictions. Some of them are dynamic and some of them are static (and, if such a specifier is used as argument, can be even detected at compile time). So I do have to rewrite the doc-string. >> - I don't like the fact that different specifiers are set up in a way >> that the meaning of each specifier depends on the presence of other >> specifiers. For example, in the spec list >> >> ((reuse-window same nil nil) (reuse-window-even-sizes . t)) >> >> the second element only has a meaning if the first element is >> present---they are not independent. It would be cleaner to use a >> plist, like this: >> >> (reuse-window :window same :reuse-window-even-sizes t) >> >> where ALL the behaviors are grouped together. > > YES!!! OK. I'll look into this. martin