GNU bug report logs -
#5405
select-frame losing current-buffer
Previous Next
Full log
View this message in rfc822 format
Uday S Reddy <u.s.reddy <at> cs.bham.ac.uk> writes:
> The documentation of make-frame says that current-buffer continues to
> selected in the new frame. The documentation of select-frame doesn't
> say anything about the matter, but one would normally expect that the
> current-buffer should still remain the same. However, the following
> example shows that select-frame loses the current-buffer:
>
> (defun testing ()
> (interactive)
> (let ((new-buffer (get-buffer-create " testing")))
> (set-buffer new-buffer)
> (select-frame (make-frame nil))
> (if (not (equal (current-buffer) new-buffer))
> (debug))))
>
> I presume that the space at the beginning of the buffer name is
> a partial cause of this misbehaviour.
This is deliberate behavior dating back about a decade (frame.c:392).
Buffers whose names start with a space are considered "hidden buffers"
that should not ordinarily be displayed (e.g. they don't show up in
M-x list-buffers either). I'll update the documentation to mention
this.
This bug report was last modified 13 years and 252 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.