Subject: bug#6280: 24.0.50; (elisp) Dedicated Windows

From: martin rudalics <[email-masked]>
Date: Fri, 28 May 2010 11:19:24 +0200

>> Should users really control the dedicatedness of individual windows?
 >
 > Questions that start "Should users really control" are anti-GNU/Emacs. (Only
 > half-kidding.) Users are not losers.

Emacs is free software.  I don't intend to control each and every aspect
of it.

 > FYI, here is what the OP on help-gnu-emacs said, before his technical request:
 >
 > OP> I swear, if emacs "steals" a window to reuse for
 > OP> something else again, I'm going to swing an axe at it.

I doubt that would help much.

 > IMO, users should be able to make windows dedicated.
 > And they are able to, AFAICT.
 >
 > BTW, why do you specify "individual" windows here? Did you mean something
 > special by that?

ECB dedicates windows to compiler output, system messages, file lists,
tags, bookmarks ...  These are windows grouped around an undedicated
edit area and ECB takes care or assigning buffers to the dedicated
windows.  ECB doesn't support dedicating "individual" windows within the
editor area.

 > The OP wants to dedicate all windows for buffers in a certain
 > mode.

Suppose you are in a help buffer and want to follow a cross reference to
an Elisp source code buffer.  IIRC this usually calls `pop-to-buffer'.
Now should this action allow `display-buffer' to "steal" a window showing
another Elisp buffer?

 > * To dedicate all windows, can't you just
 >   set `special-display-regexps' to include ".*"?
 > * To dedicate all windows for buffers in a mode, can't you just
 >   add ".*" to `special-display-regexps' on the mode hook and
 >   make the var buffer-local?
 >
 > Those both seem to work OK. If you customize `emacs-lisp-mode-hook' to add this
 > function, doesn't it DTRT for you?
 >
 > (lambda ()
 >   (make-local-variable 'special-display-regexps)
 >   (add-to-list 'special-display-regexps ".*"))

I completely fail to understand how `special-display-regexps' would
enter here and how it could be used for the OP's purposes.  Also, making
`special-display-regexps' buffer-local doesn't make sense to me.  At the
time `display-buffer' is called _any_ buffer may be current.

Maybe Stefan can tell us more.  I suppose he's the only one using
(weakly) dedicated windows in some organized way.

martin