From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Beshara Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] New tab-bar-detach-tab command Date: Wed, 29 Sep 2021 11:05:42 +1000 Message-ID: <87r1d8p4l5.fsf@mfa.pw> References: <87h7e4ikkz.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36764"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.3; emacs 28.0.50 Cc: emacs-devel@gnu.org To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 29 04:22:38 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mVPEz-0009L5-Hv for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Sep 2021 04:22:38 +0200 Original-Received: from localhost ([::1]:41160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVPEy-0000g3-40 for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Sep 2021 22:22:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVO8q-0008Q8-6Y for emacs-devel@gnu.org; Tue, 28 Sep 2021 21:12:12 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:51495) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVO8o-0006mT-B7 for emacs-devel@gnu.org; Tue, 28 Sep 2021 21:12:11 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0DF1F5C0178; Tue, 28 Sep 2021 21:12:07 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 28 Sep 2021 21:12:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mfa.pw; h= references:from:to:cc:subject:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; s=fm3; bh= MijQNMPvOe4EGWLBzc1saFYn/QtUf3a38rqZ/tolUTk=; b=PNT/gkUpK3GtwoUl AL+71Xs9mv1jiYZPBhoaUa/968Kh1IRFmbrd67fig8u+aY8dBaju9+fGPWpFTfNj CyWLXC24A9KlqDKOaHlb9uwJD0YdNKQ8DsO2g2jemEHJEOwDNJD+tISaK5OT++3A lN4N6q9L+bDe0U9eKyFszrhqQhHvv37ndqFdmMbrP4/liZyRn1+zj4yVhNDIdDow V3orKWv5GMmODF25lLMcLRTDp1HttHMWxP1OUdhZg1ESjgDFFbw6A4aLGSXUr7Oj L6b/sq84NYmzoR2g0o7wBUqwCa+s378kx8VCzl9LTA8gyi5XODwrmT+y3d10pa/3 oy+Srw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=MijQNMPvOe4EGWLBzc1saFYn/QtUf3a38rqZ/tolU Tk=; b=B4qK173dnJh30iA18Njra7vCxiWm0eCaQFBBhp7WJKyC4Z51QavK4KFCF RY4QsywjaTDC5OQKaO2xeAmWV9iSDTuYPFPFwM3S75KrJEUVNeKiL0K51v77nWe8 copo42uUp2Wkf654K+PmdZsWz496ZpWbt17zzo68OtAyV7QzhQXrDYnekWZXnbFm 40g7Xn4HRV0ItLkNNQgR5eT0vlnhZSMr46Sg2An6ooLUPVr0xcqqBQmFi0uJN1AE O7tKn10eAG1LAEqUwa8VbmYCcWQZqPhjKP18pUXn2BaOIoSqNb+27V40rduLCV59 ustXnl1n3iZwEQ0E4RCpoWZoyqqyg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekuddggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdludehmdenucfjughrpehffgfhvffuffgjkfggtgfgsehtqhertddt reejnecuhfhrohhmpeforghtthcuuegvshhhrghrrgcuoehmsehmfhgrrdhpfieqnecugg ftrfgrthhtvghrnhepveevleeuhfduiedtjefgiedvgeeufeevveeiuedvffdufeeuhffh iedvteeileelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepmhesmhhfrgdrphif X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Sep 2021 21:12:05 -0400 (EDT) In-reply-to: <87h7e4ikkz.fsf@alphapapa.net> Received-SPF: pass client-ip=66.111.4.28; envelope-from=m@mfa.pw; helo=out4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 28 Sep 2021 22:21:41 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275754 Archived-At: Hi Adam (and others), I missed this functionality from web browsers as well, but the=20 implementation you posted doesn=E2=80=99t work on my setup. The new tab=20 it creates in a new frame only contains one of the multiple=20 windows I had open in the original tab, and it gives me the=20 message =E2=80=9Ctab-close: Attempt to delete the sole tab in a frame=E2=80= =9D.=20 Below I=E2=80=99ve pasted another implementation I=E2=80=99ve been using fo= r a=20 little while which I get better results with. #+BEGIN_SRC emacs-lisp (defun tab-bar-move-tab-to-new-frame () (interactive) (let* ((from-frame (selected-frame)) (from-tabs (funcall tab-bar-tabs-function from-frame)) (from-index (1+ (tab-bar--current-tab-index from-tabs))) (new-frame (make-frame))) (tab-bar-move-tab-to-frame nil from-frame from-index new-frame=20 1) (select-frame new-frame) (tab-bar-close-tab))) #+END_SRC I hope you find this useful, Matt Adam Porter writes: > Hi Juri, et al, > > I found myself wanting to move a tab-bar tab to a new frame=20 > displaying > only that tab (like a web browser's "detach tab" command), and I > couldn't find a command to do that, so I wrote this simple one.=20 > It > seems to work and ought to be useful, I think. > > It might be worth binding it to something like "C-x t D" as=20 > well, > assuming the command is worth merging. :) > > Thanks, > Adam > > [2. New tab-bar-detach-tab command --- text/x-diff;=20 > 0001-lisp-tab-bar.el-tab-bar-detach-tab-New-command.patch]...