GNU bug report logs - #5405
select-frame losing current-buffer

Previous Next

Package: emacs;

Reported by: Uday S Reddy <u.s.reddy <at> cs.bham.ac.uk>

Date: Sun, 17 Jan 2010 18:28:01 UTC

Severity: normal

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Uday S Reddy <u.s.reddy <at> cs.bham.ac.uk>, 5405 <at> debbugs.gnu.org
Subject: bug#5405: select-frame losing current-buffer
Date: Mon, 18 Jan 2010 09:11:44 +0100
> The documentation of make-frame says that current-buffer continues to
> selected in the new frame.

The documentation also says that

  The previously selected frame remains selected.  However, the
  window system may select the new frame for its own reasons, for
  instance if the frame appears under the mouse pointer and your
  setup is for focus to follow the pointer.

so the current buffer may change (as described below) in some cases.

> 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.

The documentation of `select-frame' says

  Subsequent editing commands apply to its selected window.

which inherently means that that frame's selected window becomes the
selected window.  Selecting a window WINDOW means to assure that

  If WINDOW is not already selected, make WINDOW's buffer current
  and make WINDOW the frame's selected window.

Which doesn't mean that the documentation can't be improved ;-)

> I presume that the space at the beginning of the buffer name is
> a partial cause of this misbehaviour.

It's not related.

martin




This bug report was last modified 13 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.