From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 27 07:33:05 2016 Received: (at submit) by debbugs.gnu.org; 27 Jul 2016 11:33:05 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 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 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 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 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 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) 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) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Wed, 27 Jul 2016 20:32:40 +0900 (JST) X-X-Sender: calancha@calancha-pc To: bug-gnu-emacs@gnu.org Subject: 25.1.50; ibuffer-do-view-1 fails to visit in new frame Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 27 13:06:35 2016 Received: (at 24086) by debbugs.gnu.org; 27 Jul 2016 17:06:35 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 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 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 Date: Wed, 27 Jul 2016 20:06:12 +0300 Message-Id: <83eg6froxn.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-reply-to: (message from Tino Calancha on Wed, 27 Jul 2016 20:32:40 +0900 (JST)) Subject: Re: bug#24086: 25.1.50; ibuffer-do-view-1 fails to visit in new frame References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 24086 Cc: 24086@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.3 (------) > 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 28 09:52:16 2016 Received: (at 24086) by debbugs.gnu.org; 28 Jul 2016 13:52:16 +0000 Received: from localhost ([127.0.0.1]:48960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSljU-0006Z0-DI for submit@debbugs.gnu.org; Thu, 28 Jul 2016 09:52:16 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:33287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSljS-0006Yo-Sc for 24086@debbugs.gnu.org; Thu, 28 Jul 2016 09:52:15 -0400 Received: by mail-pa0-f54.google.com with SMTP id ks6so21422086pab.0 for <24086@debbugs.gnu.org>; Thu, 28 Jul 2016 06:52:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=Gk51unEGT147Iv8cJCNftLpVvfXQEUaw+Tytn9kq0Lw=; b=GFzl+keHkuXI9xfysqaCkQJQX5NPthyvNa3TA9BeuXJm9XgMwem0BGrQI1NLJY74LF ETJMKOUgAd3sUOJ8qIc1b8aTVKZhsD7nugAG3ZBUqIf4UMsz54Ud/mb11U32J8s3p2SB un9bg0xRJSEUdXTerWz/psjVqa70/O1Jr+Ck+41ldcbTJm9mRxsliVyrtu2EDGphNnX6 QaQJWuqW/DurhbYOyKSAhs521D+ZP09mrI7OBRyvWBaet8nRhWZpzyH/GlPydvpAJWGS Uy7o/yOly8O4zu+JExM0FBg2XhHBQx8CxUcWm+I9pHnq5OVNyw8Iqw/795SKjh+mgi8L Xj7g== 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:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=Gk51unEGT147Iv8cJCNftLpVvfXQEUaw+Tytn9kq0Lw=; b=aY8Vczj+DuKQYefiyi1i0RBis6K2+vlg7MRvU6TTL/pU0WCvmkiLVq8VmQFeG6PSLT KtfNawG5l8d5qoOEvqszUkGp2xSeeY59BKRTokCmO6jrS6pr3XdAYwbUvvSYwoGjwiOE 0Luggxf+d7LLI51U1gNS3M3yUB/eyCKR+U1YH4o2sqgWyA27kSidM7mJDqpOed+Whc17 g5enMIA5MaLftxpQ1KVdn7CVh8SHPTMr+WiJKgJALpgDwA0BiGyJZRpzCRWorA1++3wa S1YZRkttZELw7Iet2RrIzqBcKHHGEX5fz96G5LcLxkCIVzI/h7XRpgj9F8IxVQTT4l91 Ov/g== X-Gm-Message-State: AEkoouuhjZAzqEsMkFq8XsWTVe+dHsNOhhO2YtYRTOy+Q4IHUTYw+xXn4sj2Be1g6wswjA== X-Received: by 10.66.181.16 with SMTP id ds16mr59671941pac.102.1469713928867; Thu, 28 Jul 2016 06:52:08 -0700 (PDT) Received: from calancha-pc ([210.160.37.23]) by smtp.gmail.com with ESMTPSA id wa9sm17399601pac.35.2016.07.28.06.52.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jul 2016 06:52:08 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Thu, 28 Jul 2016 22:52:05 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Eli Zaretskii Subject: Re: bug#24086: 25.1.50; ibuffer-do-view-1 fails to visit in new frame In-Reply-To: <83eg6froxn.fsf@gnu.org> Message-ID: References: <83eg6froxn.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24086 Cc: 24086@debbugs.gnu.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Wed, 27 Jul 2016, Eli Zaretskii wrote: >> 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. Exactly. I wrote that sentence thinking on 'ibuffer-do-view-other-frame'; i realize the bug while calling this command. > Does the change have to be this complicated? AFAICT, the error is > just in the wrong logic of combining the conditions. Right? Well, maybe someone more skillful could come with something fancier :-) The reason why my patch looks bigger that one could expect is because: 1) I understand better the logic written in my patch: it reads more explicit what the logic is doing, IMO. 2) It is also fixing the expected behaviour of 'ibuffer-do-view-other-frame'. The orig version of 'ibuffer-do-view-1', once 'unless' condition evaluates nil, pops to the first marked buffer in the selected window (regardless of the value of TYPE). Then, the rest of marked buffers are visited in a new frame if TYPE equals to 'other-frame. That's wrong: if TYPE equals 'other-frame, all marked buffers should be visited in a new frame. Otherwise, if you have just one marked buffer, and you call 'ibuffer-do-view-other-frame' (bound to H), Emacs visit this buffer in the same frame. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 13 11:59:45 2016 Received: (at 24086) by debbugs.gnu.org; 13 Sep 2016 15:59:45 +0000 Received: from localhost ([127.0.0.1]:58854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjq7Z-0004wf-AL for submit@debbugs.gnu.org; Tue, 13 Sep 2016 11:59:45 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:35532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjq7U-0004wP-6T for 24086@debbugs.gnu.org; Tue, 13 Sep 2016 11:59:40 -0400 Received: by mail-pf0-f169.google.com with SMTP id z123so10851960pfz.2 for <24086@debbugs.gnu.org>; Tue, 13 Sep 2016 08:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=iUQxEwcdsHIiudKZmijQY4rONYwfgG6SLXuJQou2KxI=; b=Lucu7hGvrWsTMXdcT6IG6Sce4h9JUmGmaRe5WQUHdKvuWCvfjL6v2ZvAW9BWO69wcY ft7zpnoW94yCPfVLWXIqj8SHZeY4nnDrjb1r1EZom6KZFIpuAsb98r4dCwj8arvPJWB9 z3ZsqZB3wmCpGb6TkGgcoYnEWWrbrZEX9X7064tlWiJWXQuUSqp8jIoSwkNJ5R/mL3A0 EGARQJ0jXqkRzheuPR682ckF7+t56Kw7Ap7OdiIzESuJy2fhh5aREw/Vl0FWCEGX8Pqt DA/JmFfk0X4OuQX3ovW+joacnfKD4/4ihBFe6sTumHqKV67n0Pl/U1bIKBSPkk12Wpd6 mrpA== 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:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=iUQxEwcdsHIiudKZmijQY4rONYwfgG6SLXuJQou2KxI=; b=gDZKnWSDT+PPxxdS8IFCGY/ltJPlZb/MAjdU6+FpyqJGcpbibdtEJcGwmMY1ZYOKNk OAbjAjQvhdRjik0SOhbQ7llTwI49Klm/oP4i/u5XY3hGZeBW8vuiTvo0pu1/hw6QPQ59 rvCmsd6GlKl5TiLsLmXyalIVmEqZu5PqbSM3+v91zrsoFg/HnwIsANUTMx9i+UPZ6Nd1 pHx5aASgfKoNOl4QFG+pKeh+w6siW0JP83GuUiyit9rCjg3SDJJWeh0c72Higt8y9tIP 4Qogu2NbPb9lPLie+RKA9lY43A0YnfjKogdzRNWF/T+WE+KdQlhpk3KpfXOpzTvblPGv Th4w== X-Gm-Message-State: AE9vXwPlhK/onCKvsSguoZzp79uKxDn1Dzx0RL5Cx4BPjdrB5urqdjlFk83muV60nSc8Wg== X-Received: by 10.98.60.68 with SMTP id j65mr2589896pfa.55.1473782370337; Tue, 13 Sep 2016 08:59:30 -0700 (PDT) Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id c11sm32083763pfk.78.2016.09.13.08.59.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Sep 2016 08:59:29 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Wed, 14 Sep 2016 00:59:27 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Tino Calancha Subject: Re: bug#24086: 25.1.50; ibuffer-do-view-1 fails to visit in new frame In-Reply-To: Message-ID: References: <83eg6froxn.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 24086 Cc: Eli Zaretskii , 24086@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) On Thu, 28 Jul 2016, Tino Calancha wrote: > > > On Wed, 27 Jul 2016, Eli Zaretskii wrote: > >>> 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. > Exactly. I wrote that sentence thinking on 'ibuffer-do-view-other-frame'; i > realize the bug while calling this command. > >> Does the change have to be this complicated? AFAICT, the error is >> just in the wrong logic of combining the conditions. Right? > Well, maybe someone more skillful could come with > something fancier :-) > > The orig version of 'ibuffer-do-view-1', once 'unless' condition > evaluates nil, pops to the first marked buffer in the selected window > (regardless of the value of TYPE). Then, the rest of marked buffers > are visited in a new frame if TYPE equals to 'other-frame. > > That's wrong: if TYPE equals 'other-frame, all marked buffers > should be visited in a new frame. > Otherwise, if you have just one marked buffer, and you call > 'ibuffer-do-view-other-frame' (bound to H), Emacs visit this buffer > in the same frame. >From previous patch, I have renamed the local var 'confirm' to 'abort'; i have dropped an empty line and fixed the indentation. If there are no further objections i will push this patch to master in a few days. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From 314762928c53abc439c7bc0616bd024a829a8319 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Wed, 14 Sep 2016 00:53:02 +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 | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 8e24629..a180512 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1143,17 +1143,21 @@ 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)) + abort) (when (null marked-bufs) (setq marked-bufs (list (ibuffer-current-buffer t)))) - (unless (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)) + (when (and (eq type 'other-frame) + (not ibuffer-expert) + (> (length marked-bufs) 3)) + (setq abort + (not (y-or-n-p (format "Really create a new frame for %s buffers? " + (length marked-bufs)))))) + (unless abort + (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.9.3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.21.5) of 2016-09-13 Repository revision: 3988ceaa1cfa2022443906750cbb30127a1e161f From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 23 02:24:27 2016 Received: (at 24086) by debbugs.gnu.org; 23 Sep 2016 06:24:27 +0000 Received: from localhost ([127.0.0.1]:32968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnJuN-0003et-Kc for submit@debbugs.gnu.org; Fri, 23 Sep 2016 02:24:27 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:36054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnJuL-0003ee-Ry for 24086@debbugs.gnu.org; Fri, 23 Sep 2016 02:24:26 -0400 Received: by mail-pf0-f181.google.com with SMTP id q2so38634376pfj.3 for <24086@debbugs.gnu.org>; Thu, 22 Sep 2016 23:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=+nfwAHXTqLEX7xGblG822Mx7T9UL4VKrMDi7ZSeCqDQ=; b=aZs4G4kpBrkQCot0tLnnAPxCB5fWwYsEMGfeQr8zHYhUyrgyXUf6xI4u+ZMu8mFMqp yqDq+Yz7PGaYpKZzfbI1v5Lli0zJPPQ76loa6uz+2prldP1yfEn+v7wgEL2UROjwyfd1 rn4Nca4aRw/xmUAocsWzE7nMtaJ20rjsqut799E6nMf+8ky4hTF4v59C0Mih40nCD3WK vGIMTjXhFPd4/A+IkIwT7thBA3N5nYIbVfZe4zRiYNzU73Lxh6L3N2IR3atNrJo+rDEn RA4TuuMUerPww8p0TbE/vwvagj2s521DPkuoLdgq1dgJu4fBIVCxIILLvjDv9d6/3Nqg 3aCg== 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:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=+nfwAHXTqLEX7xGblG822Mx7T9UL4VKrMDi7ZSeCqDQ=; b=LudCyKlWsEAI2VmUDMvdTkXXTHxz9oNsMbmOKad1DYIKY5fc5tRi1TbdrUbCl3Uiyy J7PmB8iwM7a6DexMEtbdC6VuFVWxWdA9lKpFr0yELO7RrbCnlN9GuZ7c9i5L2GSXtnUl y2IFHiP/TBjP1mFMdS9yzLxTfgwSGzzSg1l9kqVTpxYXKE5ul45GE5R5O+FBxOMqQzLx pu0T3DJcgolyNGJA+oZxTeljfVPbPXcexNr4iz4edMrVrM7Kdss3bY9TkdZ1VqpyVQ7q fdoa+9cPzJ46nTUAdmpBZ3kteFhCxTamBGSuzuu5/uNp9+NoMRvfQfoGTdCiAcY+GMCT SDcg== X-Gm-Message-State: AE9vXwMCtbQUOabbS85NLD4sQUznnNC12S30NHq8XFVbf0Tnyss/yAiz3GiqohCEID5SqQ== X-Received: by 10.98.223.218 with SMTP id d87mr10036071pfl.48.1474611860196; Thu, 22 Sep 2016 23:24:20 -0700 (PDT) Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id y1sm8259617pfd.90.2016.09.22.23.24.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Sep 2016 23:24:19 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 23 Sep 2016 15:24:17 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Tino Calancha Subject: Re: bug#24086: 25.1.50; ibuffer-do-view-1 fails to visit in new frame In-Reply-To: Message-ID: References: <83eg6froxn.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24086 Cc: Eli Zaretskii , 24086@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Wed, 14 Sep 2016, Tino Calancha wrote: > If there are no further objections i will push this patch to master in > a few days. I have pushed to master the following much simple patch: >From 87925f1125acf95439e4563f9a30864cadf7cafb Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Fri, 23 Sep 2016 15:16:15 +0900 Subject: [PATCH] ibuffer-do-view-other-frame: Display each buffer in a new frame * lisp/ibuffer.el (ibuffer-do-view-1): When TYPE equals 'other-frame, then display each buffer in a new frame (Bug#24086). --- lisp/ibuffer.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 0336f1d..e965535 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1143,17 +1143,17 @@ 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))) - (when (null marked-bufs) - (setq marked-bufs (list (ibuffer-current-buffer t)))) + (let ((marked-bufs (or (ibuffer-get-marked-buffers) + (list (ibuffer-current-buffer t))))) (unless (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)) + (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.9.3 Repository revision: 0041ce81897ef837d04674b634720645379f3b18 From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 23 02:26:46 2016 Received: (at 24086-done) by debbugs.gnu.org; 23 Sep 2016 06:26:46 +0000 Received: from localhost ([127.0.0.1]:32972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnJwc-0003iQ-0S for submit@debbugs.gnu.org; Fri, 23 Sep 2016 02:26:46 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:36494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnJwa-0003iB-9L for 24086-done@debbugs.gnu.org; Fri, 23 Sep 2016 02:26:44 -0400 Received: by mail-pf0-f169.google.com with SMTP id q2so38656114pfj.3 for <24086-done@debbugs.gnu.org>; Thu, 22 Sep 2016 23:26:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:subject:in-reply-to:message-id:references:user-agent :mime-version; bh=ap3+m/TCAnJ4WME1YfOeJ1t1MfvFvdhloefzLLNbePg=; b=yWgZv+aZDyQtzIawlq0kx5lwWx+7ziXsABMkF3413ID+JtXNmwp7cy9M+hHioXTwrI oo82Gv9RiFRwXDrBPK9CWA7e2np56ny6f2uGfGWYOkJrUN1r9VFg8dI66l+SX1UVH1HD oQmDn6pl1skS+cp1NIWYQOSEih09Rjhh6rUlhBXIqYL3Us91aIkpi2m6aMv52ijdviOV p2Y7XOZt8yqe+aKkv8AT1cC0/iNFee+OaelQl9vaiy4ox3kBrD4nqsyYAPDRpVKgpByC sAyNqOvIV/EsZij0/v4QaBicpWMnQu7LIW2NUfwN78/gptj8d1hn7IL+GIpQoQlKu4Wd Yi4w== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=ap3+m/TCAnJ4WME1YfOeJ1t1MfvFvdhloefzLLNbePg=; b=XWJzttKnUVllWX5D5twypuU7p3NYjS+jJIc9LJlrIeKRl0uijD+pYlzR+vRZe6hf8w YkSKHCO4DaV7PN3gCBPycAnYagLPnXJtpLkfo+9lJSWc3mrjG2DkOpegHl/uSgoloqNu uLkfZ5xadqKIkW86bY8NE/5boPWC/915Su/LouhN7lVXYck16aAR64zzGLQIOtlKhQno mNTiKnkwrQgQMi5dc3t/s75UIBDDMSXfeM+ezFXAp6eloyophv5MFSwe6/kuiK2qRNKS XDS9Zrge3pGF1O9XLf+bdIgSf8v0OnHuw8U5aTeLcBfZTuQ2D3y8NLSVzddMD5+v1S/0 QG7w== X-Gm-Message-State: AE9vXwMef5nMbZy5aEvG8gWYm0IskzBj0fktE+291GlHx6Z1bKgZAJunkXplqWwiWiwt4w== X-Received: by 10.98.193.193 with SMTP id i184mr9795593pfg.69.1474611998668; Thu, 22 Sep 2016 23:26:38 -0700 (PDT) Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id fm6sm8315943pab.37.2016.09.22.23.26.37 for <24086-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Sep 2016 23:26:38 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 23 Sep 2016 15:26:36 +0900 (JST) X-X-Sender: calancha@calancha-pc To: 24086-done@debbugs.gnu.org Subject: Re: bug#24086: 25.1.50; ibuffer-do-view-1 fails to visit in new frame In-Reply-To: Message-ID: References: <83eg6froxn.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24086-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Fixed in master branch as commit: 87925f11 On Fri, 23 Sep 2016, Tino Calancha wrote: > On Wed, 14 Sep 2016, Tino Calancha wrote: > >> If there are no further objections i will push this patch to master in >> a few days. > > I have pushed to master the following much simple patch: > > > From 87925f1125acf95439e4563f9a30864cadf7cafb Mon Sep 17 00:00:00 2001 > From: Tino Calancha > Date: Fri, 23 Sep 2016 15:16:15 +0900 > Subject: [PATCH] ibuffer-do-view-other-frame: Display each buffer in a new > frame > > * lisp/ibuffer.el (ibuffer-do-view-1): > When TYPE equals 'other-frame, then display each buffer > in a new frame (Bug#24086). > --- > lisp/ibuffer.el | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el > index 0336f1d..e965535 100644 > --- a/lisp/ibuffer.el > +++ b/lisp/ibuffer.el > @@ -1143,17 +1143,17 @@ 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))) > - (when (null marked-bufs) > - (setq marked-bufs (list (ibuffer-current-buffer t)))) > + (let ((marked-bufs (or (ibuffer-get-marked-buffers) > + (list (ibuffer-current-buffer t))))) > (unless (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)) > + (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.9.3 > > > Repository revision: 0041ce81897ef837d04674b634720645379f3b18 > From unknown Mon Aug 18 20:15:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 21 Oct 2016 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