>>>> "jpw" == John Paul Wallington
<jpw(a)shootybangbang.com> writes:
jpw> Adrian Aichner <adrian.aichner(a)teradyne.com> wrote:
> (setq ibuffer-use-other-window t)
>
> causes this on
> M-x ibuffer
> with *scratch* being the only window in the frame.
>
> Signaling: (error "Won't change only window")
> enlarge-window(1)
> ibuffer-shrink-to-fit()
> ibuffer-update(nil)
> ibuffer(nil)
> call-interactively(ibuffer)
jpw> I can't reproduce it. If I do xemacs -vanilla then evaluate
jpw> (setq ibuffer-use-other-window t) then M-x ibuffer, everything is
jpw> hunky-dory.
Hi John Paul, this does it for me in vanilla emacs-version "21.4
(patch 6) \"Common Lisp (Windows [1])\" XEmacs Lucid"
(global-set-key '[(control ?x) (control ?b)] 'ibuffer)
(setq debug-on-error t)
(setq ibuffer-default-shrink-to-minimum-size t)
(setq ibuffer-use-other-window t)
(dotimes (row (- (frame-height) (length
(delete-if
(lambda (buffer)
(string-match "^ " (buffer-name buffer)))
(buffer-list)))))
(get-buffer-create (format "tmp-%d" row)))
;eval the above and you'll get:
;Signaling: (error "Won't change only window")
; enlarge-window(1)
; ibuffer-shrink-to-fit()
; ibuffer-update(nil)
; ibuffer(nil)
; call-interactively(ibuffer)
jpw> Hmm. Maybe it helps to change the test at the start of
jpw> ibuffer-shrink-to-fit to use ibuffer-window-list, like so?
jpw> (when (> (length (ibuffer-window-list)) 1) ...
Hmmh, the following from emacs-version "21.4 (patch 6) \"Common Lisp
(Windows [1])\" XEmacs Lucid" looks interesting (and scary):
`scroll-pos-visible-bug-p' (buffer: *Hyper Apropos*, mode: Hyper-Apropos)
Variable:
value: nil
A flag, set when this version of GNU Emacs has a buggy version of the
function `pos-visible-in-window-p' that returns `nil' when given
`(point-max)'
and `(point-max)' is on the last line of the window. Currently, this flag is
set for all versions of Epoch 4 and for Lucid GNU Emacs 19.8.
--
Adrian Aichner
mailto:adrianï¼ xemacs.org
http://www.xemacs.org/