[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: display-buffer-alist simplifications

From: grischka
Subject: Re: display-buffer-alist simplifications
Date: Thu, 04 Aug 2011 21:59:48 +0200
User-agent: Thunderbird (Windows/20100228)

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]