bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#5405: select-frame losing current-buffer


From: Chong Yidong
Subject: bug#5405: select-frame losing current-buffer
Date: Sun, 17 Jan 2010 15:02:51 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

Uday S Reddy <u.s.reddy@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.






reply via email to

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