From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: grischka Newsgroups: gmane.emacs.devel Subject: Re: display-buffer-alist simplifications Date: Thu, 04 Aug 2011 21:59:48 +0200 Message-ID: <4E3AFA34.2090903@gmx.de> 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 1312488030 27132 80.91.229.12 (4 Aug 2011 20:00:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 4 Aug 2011 20:00:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 04 22:00:26 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 1Qp45i-0001u8-Fs for ged-emacs-devel@m.gmane.org; Thu, 04 Aug 2011 22:00:26 +0200 Original-Received: from localhost ([::1]:57712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qp45i-0000Gx-4y for ged-emacs-devel@m.gmane.org; Thu, 04 Aug 2011 16:00:26 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qp45f-0000Gg-6J for emacs-devel@gnu.org; Thu, 04 Aug 2011 16:00:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qp45d-0003Ek-Tk for emacs-devel@gnu.org; Thu, 04 Aug 2011 16:00:23 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:36425) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Qp45d-0003EN-G3 for emacs-devel@gnu.org; Thu, 04 Aug 2011 16:00:21 -0400 Original-Received: (qmail invoked by alias); 04 Aug 2011 20:00:17 -0000 Original-Received: from unknown (EHLO [10.129.214.202]) [89.204.138.202] by mail.gmx.net (mp065) with SMTP; 04 Aug 2011 22:00:17 +0200 X-Authenticated: #18588216 X-Provags-ID: V01U2FsdGVkX18XjHcwJJ8XACGkCU3hOMTJQYGCzo0eE0Ww3CPOEP C0m+GrTvFWxo4G User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) Original-References: jwv62mdc3f7.fsf-monnier+emacs@gnu.org X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.23 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:142887 Archived-At: Stefan Monnier wrote: > It's also to force display-buffer (and switch-to-buffer when called > from Lisp packages) to use some other window/frame. I don't want any > other buffer ever shown in my *Completions* window (which I carefully > size and place next to my minibuffer-only frame), same for my other > strongly-dedicated windows like *compilation*. I'd actually like to have *compilation* and *grep* (alternatively) use the same one window. In that sense I always found that the 'dedicated' thing is too inflexible. Btw. it is IMO wrong to cater for an unlimited number of (anonymous) windows. Basically, you want 'display-buffer-alist' do two things at the same time: 1) associate buffers to windows, and also 2) specify these windows and their behavior Now, since there is no restriction as to what to buffers anyone might want to show, this means with your design that you have to deal with an equally possibly unlimited number of different window behavior. However that is completely unrealistic. Nobody ever wants to see as many windows behave differently from each other as there are possible buffers. So to begin with, I would maybe split that list into two lists, one to map buffers to window _names_ and another one to map these window _names_ to window behavior. Like: (setq window-parameter-list '( (window-1 (spec . val) ....) (window-2 (spec . val) ....) (window-3 (spec . val) ....) )) (setq display-buffer-alist '( ((name . "*completions*) . window-2) ((name . "*Help*) . window-3) ((name . "*grep*) . window-2) ;; for me, as above ;) ((name . ".*") . window-1) )) Such there is no need for duplications, less need for 'same/other/reuse' stuff, and it is still more powerful because now the user can really start to organize things. --- grischka