From unknown Sun Jun 22 11:29:44 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#5405 <5405@debbugs.gnu.org> To: bug#5405 <5405@debbugs.gnu.org> Subject: Status: select-frame losing current-buffer Reply-To: bug#5405 <5405@debbugs.gnu.org> Date: Sun, 22 Jun 2025 18:29:44 +0000 retitle 5405 select-frame losing current-buffer reassign 5405 emacs submitter 5405 Uday S Reddy severity 5405 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 17 13:27:24 2010 Received: (at submit) by debbugs.gnu.org; 17 Jan 2010 18:27:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWZqN-0002vt-Sk for submit@debbugs.gnu.org; Sun, 17 Jan 2010 13:27:24 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWZqL-0002vn-Vq for submit@debbugs.gnu.org; Sun, 17 Jan 2010 13:27:22 -0500 Received: from mail.gnu.org ([199.232.76.166]:43897 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWZqH-0000nq-Hu for submit@debbugs.gnu.org; Sun, 17 Jan 2010 13:27:17 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NWZqF-0003x0-LC for submit@debbugs.gnu.org; Sun, 17 Jan 2010 13:27:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.1.0 Received: from lists.gnu.org ([199.232.76.165]:43721) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NWZqF-0003wq-Eg for submit@debbugs.gnu.org; Sun, 17 Jan 2010 13:27:15 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWZqE-0005eU-Tj for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 13:27:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWZpr-0005Xe-Is for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 13:27:07 -0500 Received: from [199.232.76.173] (port=59006 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWZpr-0005Xa-Gg for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 13:26:51 -0500 Received: from sun61.bham.ac.uk ([147.188.128.150]:34402) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NWZpr-0003rq-2p for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 13:26:51 -0500 Received: from [147.188.128.127] (helo=bham.ac.uk) by sun61.bham.ac.uk with esmtp (Exim 4.67) (envelope-from ) id 1NWZpn-0000a4-OM for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 18:26:47 +0000 Received: from mx1.cs.bham.ac.uk ([147.188.192.53]) by bham.ac.uk with esmtp (Exim 4.43) id 1NWZpn-0003T9-EU for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 18:26:47 +0000 Received: from gromit.cs.bham.ac.uk ([147.188.193.16] helo=MARUTI.cs.bham.ac.uk) by mx1.cs.bham.ac.uk with esmtp (Exim 4.51) id 1NWZpn-0007YN-8N; Sun, 17 Jan 2010 18:26:47 +0000 Date: Sun, 17 Jan 2010 18:26:34 +0000 Message-Id: From: Uday S Reddy To: bug-gnu-emacs@gnu.org Subject: select-frame losing current-buffer X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: submit Cc: U.S.Reddy@cs.bham.ac.uk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) 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. Cheers, Uday Reddy In GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-06 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Mail Minor modes in effect: savehist-mode: t encoded-kbd-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: C-x b * s c SPC C-x . ( d e f u n SPC t e s t i n g SPC ( ) TAB C-( ( i n t e r a c t i v e ) TAB ( l e t SPC ( ( n e w - b u f f e r SPC ( g e t - b u f f e r - c r e a t e SPC " SPC t e s t i n g " ) ) ) TAB ( s e t - b u f f e r SPC n e w - b u f f e r ) TAB ( l e t SPC ( ( n e w - f r a m e SPC C-a C-k TAB ( s e l e c t - f r a m e SPC ( m a k e - f r a m e SPC n i l ) ) TAB ( i f SPC ( n o t SPC ( e u q q u a l SPC ( c u r r e n t - b u f f e r ) SPC n e w - b u f f e r ) ) TAB 9 d e ( d e b u g ) ) ) ) C-x M-x t e s t i n g q C-x b C-x b * s c SPC C-p C-p C-p C-p C-p C-p C-a C-SPC C-n C-n C-n C-n C-n C-n C-n C-x C-x C-x C-k C-x m M-x r e p o r t - e m SPC SPC Recent messages: There are unsaved changes, quit anyway? (y or n) Delete auto save file y:/tmpmail/#vm-bug-forwarding.msg#? (y or n) Mark set Auto-saving...done testing Entering debugger... Back to top level. Mark set Loading mail-utils...done Loading emacsbug...done From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 17 15:03:02 2010 Received: (at 5405) by debbugs.gnu.org; 17 Jan 2010 20:03:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWbKw-00048k-0h for submit@debbugs.gnu.org; Sun, 17 Jan 2010 15:03:02 -0500 Received: from pantheon-po39.its.yale.edu ([130.132.50.100]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWbKu-00048R-AM for 5405@debbugs.gnu.org; Sun, 17 Jan 2010 15:03:00 -0500 Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po39.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0HK2pwK025258 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 17 Jan 2010 15:02:51 -0500 Received: by furry (Postfix, from userid 1000) id 1A36FC05D; Sun, 17 Jan 2010 13:02:51 -0700 (MST) From: Chong Yidong To: Uday S Reddy Subject: Re: bug#5405: select-frame losing current-buffer References: Date: Sun, 17 Jan 2010 15:02:51 -0500 In-Reply-To: (Uday S. Reddy's message of "Sun, 17 Jan 2010 18:26:34 +0000") Message-ID: <87my0c7b4k.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 5405 Cc: 5405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Uday S Reddy 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 17 15:21:46 2010 Received: (at 5405) by debbugs.gnu.org; 17 Jan 2010 20:21:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWbd4-0004HD-6B for submit@debbugs.gnu.org; Sun, 17 Jan 2010 15:21:46 -0500 Received: from sun61.bham.ac.uk ([147.188.128.150]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWbd2-0004H6-5i for 5405@debbugs.gnu.org; Sun, 17 Jan 2010 15:21:44 -0500 Received: from [147.188.128.127] (helo=bham.ac.uk) by sun61.bham.ac.uk with esmtp (Exim 4.67) (envelope-from ) id 1NWbcw-0001aH-O1; Sun, 17 Jan 2010 20:21:38 +0000 Received: from mx1.cs.bham.ac.uk ([147.188.192.53]) by bham.ac.uk with esmtp (Exim 4.43) id 1NWbcw-0002Qa-E9; Sun, 17 Jan 2010 20:21:38 +0000 Received: from gromit.cs.bham.ac.uk ([147.188.193.16] helo=MARUTI.cs.bham.ac.uk) by mx1.cs.bham.ac.uk with esmtp (Exim 4.51) id 1NWbcw-0008K4-5T; Sun, 17 Jan 2010 20:21:38 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19283.28996.281000.798673@gargle.gargle.HOWL> Date: Sun, 17 Jan 2010 20:21:24 +0000 From: Uday S Reddy To: Chong Yidong Subject: Re: bug#5405: select-frame losing current-buffer In-Reply-To: <87my0c7b4k.fsf@stupidchicken.com> References: <87my0c7b4k.fsf@stupidchicken.com> X-Mailer: VM 8.1.0-beta under 22.3.1 (i386-mingw-nt5.1.2600) X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 5405 Cc: 5405@debbugs.gnu.org, Uday S Reddy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) Dear Chong, Thanks very much for the quick response. But I am not convinced the hidden buffer idea explains the behaviour I found. Before doing select-frame, the "hidden buffer" is the current buffer. For whatever reason, the user or the code chose it as the current buffer. I don't believe that the buffer should be forcibly dumped and the focus placed on some other random buffer that happens to be around. This behaviour was found in maintaining VM which, for some indepdent reasons, chose a buffer name with a leading space, and some serious buffer corruption resulted from it. This seems dangerous, undesirable behaviour. I have now modified VM to avoid the leading space. So the issue doesn't affect me any more. But it took me a day's labour to find the problem. I hope there won't be others who will get simiarly burned. Cheers, Uday Chong Yidong writes: > Uday S Reddy 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. > > From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 17 16:28:09 2010 Received: (at 5405) by debbugs.gnu.org; 17 Jan 2010 21:28:09 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWcfJ-0004oy-20 for submit@debbugs.gnu.org; Sun, 17 Jan 2010 16:28:09 -0500 Received: from acsinet11.oracle.com ([141.146.126.233]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWcfH-0004or-Cp for 5405@debbugs.gnu.org; Sun, 17 Jan 2010 16:28:07 -0500 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by acsinet11.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o0HLRtLw015243 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 17 Jan 2010 21:27:57 GMT Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o0HLDURO014772; Sun, 17 Jan 2010 21:27:55 GMT Received: from abhmt001.oracle.com by acsmt356.oracle.com with ESMTP id 1345722251263763588; Sun, 17 Jan 2010 13:26:28 -0800 Received: from dradamslap1 (/24.5.185.59) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 17 Jan 2010 13:26:28 -0800 From: "Drew Adams" To: "'Uday S Reddy'" , "'Chong Yidong'" References: <87my0c7b4k.fsf@stupidchicken.com> <19283.28996.281000.798673@gargle.gargle.HOWL> Subject: RE: bug#5405: select-frame losing current-buffer Date: Sun, 17 Jan 2010 13:26:40 -0800 Message-ID: <6E0FDFA6388E41B2A6373E4D21D96387@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <19283.28996.281000.798673@gargle.gargle.HOWL> Thread-Index: AcqXtS1lgqmSCaURTxaoF8TcfbVZQwAAndsw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4B5380DB.00DB:SCFMA4539814,ss=1,fgs=0 X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 5405 Cc: 5405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) > > > 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. ... > > > 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. > > Thanks very much for the quick response. But I am not convinced the > hidden buffer idea explains the behaviour I found. Before doing > select-frame, the "hidden buffer" is the current buffer. For whatever > reason, the user or the code chose it as the current buffer. I don't > believe that the buffer should be forcibly dumped and the focus placed > on some other random buffer that happens to be around. > > This behaviour was found in maintaining VM which, for some indepdent > reasons, chose a buffer name with a leading space, and some serious > buffer corruption resulted from it. This seems dangerous, undesirable > behaviour. > > I have now modified VM to avoid the leading space. So the issue > doesn't affect me any more. But it took me a day's labour to find the > problem. I hope there won't be others who will get simiarly burned. Without speaking directly to what `select-frame'/`make-frame' should do in this regard, let me say that speaking in terms of "normally expect" (Uday) and "should not ordinarily" (Yidong) simply begs the question. No such general rule can answer the question completely for this particular situation. By _default_, in many common situations, such buffers are hidden or ignored in some _particular sense_ - for example, as completion candidates. That does not mean that they must or should be ignored in all contexts, or that users should not have a way to override a default behavior that ignores them. The reason for such a general/default/common treatment is more important than the "rule" itself, as only it provides guidance. The reason is that not ignoring such buffers can distract or confuse users. Users _typically_ do not need to consider such buffers - they just get in the way. But the fact that users _can_ consider them if they want (including for completion) speaks to not casting such a generally helpful rule in concrete. IOW, the question was raised - for `select-frame'/`make-frame' in particular - and it is still raised (unanswered). The argument that such buffers must by definition be ignored is not a valid one. It begs the question to be answered - both generally, and in this particular case. Wrt `select-frame'/`make-frame': I'm not sure what the right behavior is. If, as Uday says, the "hidden" buffer was already chosen then, analogously to completion when the user explicitly types a pattern that chooses an otherwise hidden buffer, that choice should probably be respected. If the user types `foo.log' or ` *foo*' during completion, we don't refuse to give access to that buffer under the pretext that it is a hidden buffer. If a program or user has already chosen, then we should probably let it be. But there might be other considerations for this particular case, which would also need to be taken into account - dunno. Only attention to the details can help, not some general rule about a priori hiddenness. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 03:11:53 2010 Received: (at 5405) by debbugs.gnu.org; 18 Jan 2010 08:11:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWmiG-0003Y6-Ea for submit@debbugs.gnu.org; Mon, 18 Jan 2010 03:11:52 -0500 Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1NWmiD-0003Xy-Ma for 5405@debbugs.gnu.org; Mon, 18 Jan 2010 03:11:51 -0500 Received: (qmail invoked by alias); 18 Jan 2010 08:11:45 -0000 Received: from 62-47-62-48.adsl.highway.telekom.at (EHLO [62.47.62.48]) [62.47.62.48] by mail.gmx.net (mp047) with SMTP; 18 Jan 2010 09:11:45 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18nFBclVK8nxE6gQM4OBBqhkvXDB8lJJaq74L0v8K cP3YQa0AqSZwgv Message-ID: <4B5417C0.4030706@gmx.at> Date: Mon, 18 Jan 2010 09:11:44 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Uday S Reddy , 5405@debbugs.gnu.org Subject: Re: bug#5405: select-frame losing current-buffer References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.72999999999999998 X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 5405 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) > 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 10:32:38 2010 Received: (at 5405) by debbugs.gnu.org; 18 Jan 2010 15:32:39 +0000 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 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 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 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 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 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19284.32512.819000.521256@gargle.gargle.HOWL> Date: Mon, 18 Jan 2010 15:32:16 +0000 From: Uday S Reddy To: martin rudalics Subject: Re: bug#5405: select-frame losing current-buffer In-Reply-To: <4B5417C0.4030706@gmx.at> References: <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-Debbugs-Envelope-To: 5405 Cc: 5405@debbugs.gnu.org, Uday S Reddy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.2 (---) 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 > From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 18 07:54:18 2011 Received: (at control) by debbugs.gnu.org; 18 Sep 2011 11:54:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5Fww-0005XW-7g for submit@debbugs.gnu.org; Sun, 18 Sep 2011 07:54:18 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5Fwu-0005XO-K0 for control@debbugs.gnu.org; Sun, 18 Sep 2011 07:54:17 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R5Fs3-00024d-8E for control@debbugs.gnu.org; Sun, 18 Sep 2011 13:49:15 +0200 Date: Sun, 18 Sep 2011 13:45:54 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #5405 X-MailScanner-ID: 1R5Fs3-00024d-8E X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316951355.34305@B29DMwSJh80zQrC4jxjw3Q X-Spam-Status: No X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) close 5405 From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 18 08:12:03 2011 Received: (at 5405) by debbugs.gnu.org; 18 Sep 2011 12:12:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5GE6-0006iF-Ec for submit@debbugs.gnu.org; Sun, 18 Sep 2011 08:12:03 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5GE3-0006hl-05 for 5405@debbugs.gnu.org; Sun, 18 Sep 2011 08:12:00 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R5G97-0002QI-5K; Sun, 18 Sep 2011 14:06:53 +0200 From: Lars Magne Ingebrigtsen To: Uday S Reddy Subject: Re: bug#5405: select-frame losing current-buffer In-Reply-To: <19284.32512.819000.521256@gargle.gargle.HOWL> (Uday S. Reddy's message of "Mon, 18 Jan 2010 15:32:16 +0000") Date: Sun, 18 Sep 2011 13:45:51 +0200 Message-ID: References: <4B5417C0.4030706@gmx.at> <19284.32512.819000.521256@gargle.gargle.HOWL> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Jane Siberry's _Jane Siberry_: "In The Blue Light" MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1R5G97-0002QI-5K X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316952414.48551@kbL5G+1D21FULEiXXNMLRQ X-Spam-Status: No X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 5405 Cc: 5405@debbugs.gnu.org, martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Uday S Reddy writes: > So, I recommend that no special case should be made for "hidden" > buffers. I think this is a feature, and not a bug, so I'm closing this report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Sun Jun 22 11:29:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 17 Oct 2011 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator