From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24086: 25.1.50; ibuffer-do-view-1 fails to visit in new frame Date: Wed, 27 Jul 2016 20:06:12 +0300 Message-ID: <83eg6froxn.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1469639262 4560 80.91.229.3 (27 Jul 2016 17:07:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2016 17:07:42 +0000 (UTC) Cc: 24086@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 27 19:07:23 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bSSIh-0005mA-Eu for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jul 2016 19:07:19 +0200 Original-Received: from localhost ([::1]:47844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSSIf-0005yq-NP for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jul 2016 13:07:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSSIU-0005wa-RE for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2016 13:07:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSSIQ-0000HV-CW for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2016 13:07:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSSIQ-0000HR-8Z for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2016 13:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bSSIQ-0008HI-4R for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2016 13:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jul 2016 17:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24086-submit@debbugs.gnu.org id=B24086.146963919531780 (code B ref 24086); Wed, 27 Jul 2016 17:07:02 +0000 Original-Received: (at 24086) by debbugs.gnu.org; 27 Jul 2016 17:06:35 +0000 Original-Received: from localhost ([127.0.0.1]:39413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSSHy-0008GV-KD for submit@debbugs.gnu.org; Wed, 27 Jul 2016 13:06:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSSHx-0008GJ-8h for 24086@debbugs.gnu.org; Wed, 27 Jul 2016 13:06:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSSHn-00005e-S9 for 24086@debbugs.gnu.org; Wed, 27 Jul 2016 13:06:28 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSSHn-00005O-P7; Wed, 27 Jul 2016 13:06:23 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3103 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bSSHl-0000CU-Ul; Wed, 27 Jul 2016 13:06:22 -0400 In-reply-to: (message from Tino Calancha on Wed, 27 Jul 2016 20:32:40 +0900 (JST)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:121596 Archived-At: > From: Tino Calancha > Date: Wed, 27 Jul 2016 20:32:40 +0900 (JST) > > When the argument TYPE is 'other-frame, it should visit > the buffer in a new frame. Not unconditionally, though. There are clearly some conditions in the code under which the above should not happen. > emacs -Q --eval="(progn (require 'ibuffer) (setq ibuffer-expert t) (ibuffer))" Invoking this command, I get an error: Wrong type argument: window-live-p, nil > (defun ibuffer-do-view-1 (type) > - (let ((marked-bufs (ibuffer-get-marked-buffers))) > + (let ((marked-bufs (ibuffer-get-marked-buffers)) > + (confirm t)) > (when (null marked-bufs) > (setq marked-bufs (list (ibuffer-current-buffer t)))) > - (unless (and (eq type 'other-frame) > + (when (and (eq type 'other-frame) > (not ibuffer-expert) > - (> (length marked-bufs) 3) > - (not (y-or-n-p (format "Really create a new frame for %s > buffers? " > - (length marked-bufs))))) > - (set-buffer-modified-p nil) > - (delete-other-windows) > - (switch-to-buffer (pop marked-bufs)) > + (> (length marked-bufs) 3)) > + (setq confirm > + (y-or-n-p (format "Really create a new frame for %s buffers? > " > + (length marked-bufs))))) > + > + (when confirm > + (unless (eq type 'other-frame) > + (set-buffer-modified-p nil) > + (delete-other-windows) > + (switch-to-buffer (pop marked-bufs))) > (let ((height (/ (1- (if (eq type 'horizontally) (frame-width) > (frame-height))) > (1+ (length marked-bufs))))) Does the change have to be this complicated? AFAICT, the error is just in the wrong logic of combining the conditions. Right? Thanks.