Résumé : obsolete variables
> [new:XueFuqiao:2012-12-29 06:51 UTC]
> The `special-display-regexps' and`special-display-buffer-names' are obsolete since GNU Emacs 24.3, as they can be replaced by
> appropriate entries in the `display-buffer-alist' function. -- XueFuqiao
So, I did. This may not have a grand utility, but it does make it clear when a special buffer is involved – and you can give these special frames different properties from normal frames. Here is a screenshot of a frame for a special buffer (
*Occur*) and a normal buffer (
More importantly, perhaps: special buffers are effectively in dedicated frames (you cannot dissociate the buffer and its frame).
So, what’s a “special buffer” (aka special display buffer)? Any buffer that corresponds to
‘special-display-buffer-names’. In my case,
‘special-display-regexps’ is just
"[ ]?[*][^*]+[*]", so buffers that start and end with an asterisk (
*) are displayed in special frames. Examples:
Special frames are similar to dedicated Emacs windows (windows satisfying predicate
‘display-buffer’ does not use a window or frame that is dedicated to its buffer to display a different buffer.
Treating frames the way windows are usually treated also meant modifying a few existing functions that treat dedicated windows specially. For example, I modified command
‘Buffer-menu-select’ so that it uses
‘pop-to-buffer’ (which uses a new frame, provided
‘pop-to-frames’ is non-nil) whenever a window is dedicated to its buffer (
See Library: oneonone.el
Since special frames are dedicated to their buffers, it doesn’t make much sense to delete them. An alternative to iconifying them when they are no longer needed is to make them invisible. An invisible frame is just what the name says: it is neither visible nor iconified – nothing representing it is visible.
I modified several commands to make special frames invisible instead of deleting them or iconifying them.
For example, command
‘remove-window’ is like
‘delete-window’, but it treats one-on-one windows this way: If the window is dedicated to its buffer, then its frame is made invisible. Otherwise, its frame (as well as the window) is deleted.
‘remove-window’ is the command I use to replace
‘delete-window’ interactively (even my redefined version – see Delete Frames Easily - But Not Too Easily#Redefineddelete-window):
(substitute-key-definition 'delete-window 'remove-window global-map))
C-mouse-3]) is the mouse equivalent of
‘special-display-buffer-names’ are obsolete since GNU Emacs 24.3, as they can be replaced by appropriate entries in the
‘display-buffer-alist’ function. – XueFuqiao