emacs-devel
[Top][All Lists]
Advanced

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

Re: The window-pub branch


From: grischka
Subject: Re: The window-pub branch
Date: Thu, 18 Nov 2010 22:29:38 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

martin rudalics wrote:
So why do you think it's gone?  You can define

(defun display-buffer-in-other-window-on-same-frame (buffer specifiers)
  (display-buffer
   "*scratch*"
   '(same-frame (reuse-buffer-window . nil) (not-this-window . t))))

and put this into `display-buffer-names' or `display-buffer-regexps' or
write

(display-buffer "*scratch*" 'display-buffer-in-other-window-on-same-frame)

I don't want display "*scratch*".  I want
   (setq display-buffer-regexps '(((".*") my-display-buffer)))
;-)

 > Also, is it possible to route any other functions that effect to
 > displaying a buffer (such as switch-to-buffer) through display-buffer
 > exclusively?

With the exception of `switch-to-buffer' all these route now through
`display-buffer'.  I could add an option to have `switch-to-buffer'
> route through `display-buffer' as well.

One exception is still an exception.  Why do you need it?

Also, what method does your code use to display "*compilation*"?
It doesn't seem to like my-display-buffer.

`set-window-buffer' can't be rewritten, for obvious reasons.

Why not? You could rename the current low-level one to
"set-window-buffer-internal".


 > Also, is it possible to have same logic to "un-display" (hide) a
 > buffer, such that delete-buffer and bury-buffer are routed through
 > that, also exclusively? And then to have a hook too, such as
 > "hide-buffer-function"?

Hiding a buffer is done by `replace-buffer-in-windows' which is called
by `kill-buffer' (I suppose you mean that by "delete-buffer").  I don't
understand the semantics of `bury-buffer' well enough.  What would you
want to put on that hook?

Obviously some code to replace a buffer in its window(s) rsp. delete
the window(s).

 > And yes, that would be to bypass all the interesting logic you just
 > designed and to replace it with something completely different. ;)

IIUC only your first issue fits into this remark.  The routing issue you
raised goes into the opposite direction, I presume.

No, same direction.  Obviously only what is routed through the same
function can be catched by a single hook in that function.

And the "hiding"
logic was redesigned (confer `switch-to-prev-buffer') but it's only
loosely connected to buffer display proper.

IMO strongly symmetrically related.

So, is it possible to hook 'switch-to-prev-buffer' in order to catch
buffer "undisplay", with no exception?

Also, while we're at it: I think I want hooks for "select-window",
"set-window-buffer" and finally "split-window", too.


martin





reply via email to

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