From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tino Calancha 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:32:40 +0900 (JST) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: ger.gmane.org 1469619272 9468 80.91.229.3 (27 Jul 2016 11:34:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2016 11:34:32 +0000 (UTC) To: 24086@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 27 13:34:16 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 1bSN6N-0002De-Ud for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jul 2016 13:34:16 +0200 Original-Received: from localhost ([::1]:45706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSN6M-00075R-Mo for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jul 2016 07:34:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSN6G-00075M-Ix for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2016 07:34:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSN6A-0000Nj-Gb for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2016 07:34:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSN6A-0000NT-DE for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2016 07:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bSN6A-0008UA-6l for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2016 07:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jul 2016 11:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146961918532544 (code B ref -1); Wed, 27 Jul 2016 11:34:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Jul 2016 11:33:05 +0000 Original-Received: from localhost ([127.0.0.1]:38784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSN5F-0008Sp-0B for submit@debbugs.gnu.org; Wed, 27 Jul 2016 07:33:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSN5D-0008SM-Ih for submit@debbugs.gnu.org; Wed, 27 Jul 2016 07:33:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSN54-0008P2-60 for submit@debbugs.gnu.org; Wed, 27 Jul 2016 07:32:58 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSN54-0008OW-2e for submit@debbugs.gnu.org; Wed, 27 Jul 2016 07:32:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSN4y-0006Pg-Md for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2016 07:32:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSN4u-0008M0-Vu for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2016 07:32:48 -0400 Original-Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]:33990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSN4u-0008LT-OF for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2016 07:32:44 -0400 Original-Received: by mail-pa0-x241.google.com with SMTP id hh10so1646751pac.1 for ; Wed, 27 Jul 2016 04:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:subject:message-id:user-agent:mime-version; bh=hj904PiMJdzl0IW2oqzxAiH3s/C3nH0ag+TVOCskUNw=; b=eiukTJEaToyPQfLQ9gvhf6i4JebxB4YKvQ6+nwg3Nsr0RukOIP8RH0aEOnyxd/tKhO 31CA2cf133l54yJ0yDi+uhDTHmmmRMEGuseUEsra9aSnE1bt21hIhg63KaGo5lzoEOU1 LjK3jUEcAsBQOYXSh+AourpmtDisQLyWjPei2iqMpAuwfBPKvhhR29sAQkCsirYPz2b9 Ntxm9KdhnOpzUSSN2bHuS+itjyDLrZE8nkS8WWCffg5ZZWlUZK/3izp9fNaUFb/vYRRk KM/Bql9lykzy5leO7rxXwg9oBhZ0Kqhl99wesHdC489e5jWPgjo7L5tWztFSldqme8bQ SpLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:subject:message-id:user-agent :mime-version; bh=hj904PiMJdzl0IW2oqzxAiH3s/C3nH0ag+TVOCskUNw=; b=ba3LUp/4C4y7cUcOZbBQAqrxmb61GwSF5VbZj7NSRx4j6m63rNNsj08Yq4CBgnhR1Q AMAEoxY0IicRoWiNsLxG3PZACH8B/rvg4XTdEGqYQmTgn2LEttCDj7irzn8SfMsPZoZN i35EK/yh8tPYDCmRTAxHXvd7ZlPg2aX0FCpKGrYV4se7wti0at5RGFucihnLOgG182Ex etRH16kGUxNP1oD3tMB3OsqEmFB00+r6GZA8y3qufGIeeu8D3wZUf2YKaE4wS+HMcVxt Vv/I3Xfw9inGx7fA10WH3PsETzII3yU/BPgHTxz5rvwly3ocsIr399FsfDbms/8aJFI3 6XNQ== X-Gm-Message-State: AEkoouuP0UrXiRztQCPZt3q1RcoUr4ATAU1Uj8aJcsbPAHoVNjI5sn0tqu0PDUgu9nlCGA== X-Received: by 10.66.74.133 with SMTP id t5mr49377118pav.114.1469619163541; Wed, 27 Jul 2016 04:32:43 -0700 (PDT) Original-Received: from calancha-pc ([210.160.37.26]) by smtp.gmail.com with ESMTPSA id q1sm8573295pfd.48.2016.07.27.04.32.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jul 2016 04:32:43 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc User-Agent: Alpine 2.20 (DEB 67 2015-01-07) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:121580 Archived-At: When the argument TYPE is 'other-frame, it should visit the buffer in a new frame. emacs -Q --eval="(progn (require 'ibuffer) (setq ibuffer-expert t) (ibuffer))" H M-: (length (frame-list)) RET => 1 In GNU Emacs 25.1.50.3 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6) of 2016-07-27 built on calancha-pc Repository revision: e0d425976e3a83585db9a586687897fe1ac6455f Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Debian GNU/Linux testing (stretch) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From eb3bc5f0c65788677eb0150533a33dcc14e30d95 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Wed, 27 Jul 2016 20:23:56 +0900 Subject: [PATCH] Ibuffer: View buffer in other frame * lisp/ibuffer.el (ibuffer-do-view-1): Use another frame when TYPE equals 'other-frame (Bug#24086). --- lisp/ibuffer.el | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 8e24629..2816aee 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1143,17 +1143,22 @@ ibuffer-do-view-horizontally (ibuffer-do-view-1 (if other-frame 'other-frame 'horizontally))) (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))))) -- 2.8.1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;