GNU bug report logs -
#8911
bs-cycle-next deletes window in some cases.
Previous Next
Full log
View this message in rfc822 format
> Presumably you mean all is needed is that, plus an entry in
> `display-buffer-alist'.
If the user wants to change the default behavior, yes.
> But I don't see a way to say "OK, abort, this
> window is strongly dedicated so the buffer shouldn't be shown
> anywhere, just throw an error to the user". Care to show how to say
> that?
I'm not sure whether we want to do that. If so, there are two ways.
Either, in `bs-cycle-next' write something like:
(if (and (window-dedicated-p) (not (eq (window-buffer) next)))
(error "Selected window is dedicated to its buffer")
(display-buffer-same-window next))
which gives the user no choice wrt what to do when the selected window
is dedicated or write
(defun reuse-same-window-unless-dedicated (buffer &rest args)
"..."
(if (and (window-dedicated-p) (not (eq (window-buffer) next)))
(error "Selected window is dedicated to its buffer")
(display-buffer-same-window buffer)))
(display-buffer
next '((fun-with-args reuse-same-window-unless-dedicated)) 'bs-cycle-next)
and allow the user to specify her own deviant behavior when the selected
window is dedicated.
martin
This bug report was last modified 13 years and 325 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.