From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#8911: bs-cycle-next deletes window in some cases. Date: Tue, 28 Jun 2011 23:27:22 -0400 Message-ID: References: <4E009EB0.1050903@gmx.at> <181538AC4C8B4765A99060E0425B9AB5@us.oracle.com> <9170F33E41584E0B8D96DD5EFC84599E@us.oracle.com> <8E864413162C4814BE8EFFD0C1FA1989@us.oracle.com> <4E06FBF8.9040205@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309318106 26511 80.91.229.12 (29 Jun 2011 03:28:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 29 Jun 2011 03:28:26 +0000 (UTC) Cc: 8911@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 29 05:28:22 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QblRs-0001dg-Pw for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Jun 2011 05:28:20 +0200 Original-Received: from localhost ([::1]:42522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QblRr-0001Iy-Oe for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jun 2011 23:28:19 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:34275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QblRc-0001Im-RU for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2011 23:28:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QblRa-0000Zw-HB for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2011 23:28:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QblRa-0000Zs-EQ for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2011 23:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QblRZ-0003L2-MB; Tue, 28 Jun 2011 23:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jun 2011 03:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8911 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8911-submit@debbugs.gnu.org id=B8911.130931805312798 (code B ref 8911); Wed, 29 Jun 2011 03:28:01 +0000 Original-Received: (at 8911) by debbugs.gnu.org; 29 Jun 2011 03:27:33 +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 1QblR7-0003KN-9R for submit@debbugs.gnu.org; Tue, 28 Jun 2011 23:27:33 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QblR5-0003KC-QG for 8911@debbugs.gnu.org; Tue, 28 Jun 2011 23:27:32 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG2bCk5MCqDH/2dsb2JhbABSp054iHjADYYwBJ4xhCs X-IronPort-AV: E=Sophos;i="4.65,441,1304308800"; d="scan'208";a="117459276" Original-Received: from 76-10-160-199.dsl.teksavvy.com (HELO pastel.home) ([76.10.160.199]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 28 Jun 2011 23:27:22 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id AC47459057; Tue, 28 Jun 2011 23:27:22 -0400 (EDT) In-Reply-To: (Juanma Barranquero's message of "Mon, 27 Jun 2011 03:53:29 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 28 Jun 2011 23:28:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47563 Archived-At: >> I'm not sure about the third (isn't it also fixed by passing a non-nil >> arg to bury-buffer?) > Well, yes, but that means "fixing" it everywhere; I mean: > emacs -Q > M-: (set-window-dedicated-p (selected-window) t) > M-x bury-buffer > and the frame is iconified. It shouldn't. As mentioned earlier, maybe the single-frame case is special, but I'd really first like to know how you get into such a state. For any other case, M-x bury-buffer RET *should* iconify the current frame if it shows a single dedicated window (with the caveat that Drew wants it to delete the frame instead). > If switch-to-buffer is changed not to fallback on pop-to-buffer, why > shouldn't it be called from elisp? Because 99% of the calls are wrong (they just want to display a specific buffer and the author did not consider what should happen if called in a minibuffer-only frame or in a dedicated window). > In the case of bs-cycle-next: > (unless (window-dedicated-p (selected-window)) > ;; We don't want the frame iconified if the only window in the frame > ;; happens to be dedicated > (bury-buffer (current-buffer))) > (switch-to-buffer next) > the current switch-to-buffer causes the unwanted-splitting behavior. > Changing it to pop-to-buffer-same-window, as its docstring suggests, > would still cause the same problem. Yes, bs-cycle-next would be one of the very rare cases where calling switch-to-buffer is the right thing to do. Stefan