From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: display-buffer-alist simplifications Date: Sat, 16 Jul 2011 16:35:51 -0400 Message-ID: <87mxgem09k.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1310848581 4476 80.91.229.12 (16 Jul 2011 20:36:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Jul 2011 20:36:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Martin Rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 16 22:36:17 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 1QiBay-00058l-QF for ged-emacs-devel@m.gmane.org; Sat, 16 Jul 2011 22:36:16 +0200 Original-Received: from localhost ([::1]:40178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QiBax-00005H-P2 for ged-emacs-devel@m.gmane.org; Sat, 16 Jul 2011 16:36:15 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:47453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QiBag-00004r-NZ for emacs-devel@gnu.org; Sat, 16 Jul 2011 16:35:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QiBaf-0007uV-TL for emacs-devel@gnu.org; Sat, 16 Jul 2011 16:35:58 -0400 Original-Received: from vm-emlprdomr-05.its.yale.edu ([130.132.50.146]:52375) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QiBaf-0007uR-R2 for emacs-devel@gnu.org; Sat, 16 Jul 2011 16:35:57 -0400 Original-Received: from furball ([64.134.243.135]) (authenticated bits=0) by vm-emlprdomr-05.its.yale.edu (8.14.4/8.14.4) with ESMTP id p6GKZqmN014044 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 16 Jul 2011 16:35:53 -0400 X-Scanned-By: MIMEDefang 2.71 on 130.132.50.146 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.146 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:142052 Archived-At: I am concerned that `display-buffer-alist' in its current form is still too complicated, and needs more work. I realize this is coming a bit late in the day, but it's important to get it right. Here are several suggestions, and one question. - 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. - 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. - 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. - 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. WDYT?