From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: display-buffer-alist simplifications Date: Mon, 18 Jul 2011 11:15:24 -0400 Message-ID: References: <87mxgem09k.fsf@stupidchicken.com> <4E22AE2B.5040806@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1311002156 16130 80.91.229.12 (18 Jul 2011 15:15:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Jul 2011 15:15:56 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 18 17:15:52 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 1QipXz-0000jJ-6w for ged-emacs-devel@m.gmane.org; Mon, 18 Jul 2011 17:15:51 +0200 Original-Received: from localhost ([::1]:47733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QipXx-0005r5-G5 for ged-emacs-devel@m.gmane.org; Mon, 18 Jul 2011 11:15:49 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QipXc-0005qJ-D6 for emacs-devel@gnu.org; Mon, 18 Jul 2011 11:15:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QipXa-0005nY-R1 for emacs-devel@gnu.org; Mon, 18 Jul 2011 11:15:28 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:24784 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QipXa-0005nG-BL for emacs-devel@gnu.org; Mon, 18 Jul 2011 11:15:26 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAI9NJE5MCqt8/2dsb2JhbABUp3J4iHzCSYY8BJ8nhDA X-IronPort-AV: E=Sophos;i="4.67,222,1309752000"; d="scan'208";a="126522546" Original-Received: from 76-10-171-124.dsl.teksavvy.com (HELO ceviche.home) ([76.10.171.124]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 18 Jul 2011 11:15:24 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 1B7026660D; Mon, 18 Jul 2011 11:15:24 -0400 (EDT) In-Reply-To: <4E22AE2B.5040806@gmx.at> (martin rudalics's message of "Sun, 17 Jul 2011 11:40:59 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:142111 Archived-At: >> it produces a lot of separate entries like >> (((name . "*acl-listener*")) >> fun-with-args >> (fun-with-args special-display-popup-frame #1#)) >> (((name . "*scheme*")) >> fun-with-args >> (fun-with-args special-display-popup-frame #1#)) >> (((name . "*allegro*")) >> fun-with-args >> (fun-with-args special-display-popup-frame #1#)) >> (((name . "*cmu*")) >> fun-with-args >> (fun-with-args special-display-popup-frame #1#)) >> >> I think it would be better to group them together like I do above. > and I think he's right. So I'd rather keep the list approach here (but > can be easily convinced of the contrary ;-) ). We can combine them with a "a\\|b\\|c" regexp. >> - 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. > Stefan earlier suggested something similar last year. I can do that > easily but it somehow precludes that we add other string- or symbol-like > types later (not that I can give or even think of an example). I don't even know why you added the `label' case, so I don't think we should worry about adding more types. More generally, I have the impression it's a bit overengineered. I can't find any comment anywhere that explains/justifies the complexity. Could you explain it here to help us refine the design (or to add the explanation to the code)? AFAIK, the only feature I know to be needed compared to what was provided in Emacs-23 is a parameter `where' to display-buffer which generalizes the `same-frame' parameter by turning it into a value of the `where' and allowing other values such as `same-window' or `near-minibuffer'. Stefan