From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uday S Reddy Newsgroups: gmane.emacs.bugs Subject: bug#5405: select-frame losing current-buffer Date: Mon, 18 Jan 2010 15:32:16 +0000 Message-ID: <19284.32512.819000.521256@gargle.gargle.HOWL> References: <4B5417C0.4030706@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1263829180 25566 80.91.229.12 (18 Jan 2010 15:39:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jan 2010 15:39:40 +0000 (UTC) Cc: 5405@debbugs.gnu.org, Uday S Reddy To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 18 16:39:31 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NWthT-0004aG-6p for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jan 2010 16:39:31 +0100 Original-Received: from localhost ([127.0.0.1]:41942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWthT-0002S0-QB for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jan 2010 10:39:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWthO-0002Ra-DE for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2010 10:39:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWthK-0002R0-RL for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2010 10:39:26 -0500 Original-Received: from [199.232.76.173] (port=54619 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWthK-0002Qx-LF for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2010 10:39:22 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59973) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NWthK-0005YW-9n for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2010 10:39:22 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NWtbC-0000cf-A5; Mon, 18 Jan 2010 10:33:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Uday S Reddy Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jan 2010 15:33:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5405 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5405-submit@debbugs.gnu.org id=B5405.12638287592380 (code B ref 5405); Mon, 18 Jan 2010 15:33:02 +0000 Original-Received: (at 5405) by debbugs.gnu.org; 18 Jan 2010 15:32:39 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWtan-0000cL-Rs for submit@debbugs.gnu.org; Mon, 18 Jan 2010 10:32:38 -0500 Original-Received: from sun60.bham.ac.uk ([147.188.128.137]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWtal-0000cC-Te for 5405@debbugs.gnu.org; Mon, 18 Jan 2010 10:32:36 -0500 Original-Received: from [147.188.128.127] (helo=bham.ac.uk) by sun60.bham.ac.uk with esmtp (Exim 4.67) (envelope-from ) id 1NWtaT-0002c3-PS; Mon, 18 Jan 2010 15:32:17 +0000 Original-Received: from mx1.cs.bham.ac.uk ([147.188.192.53]) by bham.ac.uk with esmtp (Exim 4.43) id 1NWtaT-0006bH-FW; Mon, 18 Jan 2010 15:32:17 +0000 Original-Received: from acws-0068.cs.bham.ac.uk ([147.188.194.56]) by mx1.cs.bham.ac.uk with esmtp (Exim 4.51) id 1NWtaT-00065S-Lv; Mon, 18 Jan 2010 15:32:17 +0000 In-Reply-To: <4B5417C0.4030706@gmx.at> X-Mailer: VM 8.1.1-devo under 22.2.1 (i386-mingw-nt5.1.2600) X-Spam-Score: -3.3 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -3.2 (---) Resent-Date: Mon, 18 Jan 2010 10:33:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34450 Archived-At: I didn't understand this message entirely, but I can confirm that the problem arises in interactive use as well. If you have the focus on a non-hidden buffer and create a new-frame, then this buffer is displayed in the new frame. If it is a "hidden" buffer then it is ignored and some other buffer is displayed in the new frame. This can be confusing and perhaps annoying to the users, but it is probably not a serious problem during interactive use. Buf if the same problem occurs inside application code, then it can be more dangerous because the code might errorneously assume that the correct buffer is in place and modify it. The fact that it is a *special case* means that it might go unnoticed during testing and faulty application code gets delivered. So, I recommend that no special case should be made for "hidden" buffers. As Drew has argued cogently, the case for the special case is weak. Cheers, Uday martin rudalics writes: > > 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 >