|
From: | Matt Beshara |
Subject: | Re: [PATCH] New tab-bar-detach-tab command |
Date: | Wed, 29 Sep 2021 11:05:42 +1000 |
User-agent: | mu4e 1.6.3; emacs 28.0.50 |
Hi Adam (and others),I missed this functionality from web browsers as well, but the implementation you posted doesn’t work on my setup. The new tab it creates in a new frame only contains one of the multiple windows I had open in the original tab, and it gives me the message “tab-close: Attempt to delete the sole tab in a frame”. Below I’ve pasted another implementation I’ve been using for a 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 1)
(select-frame new-frame) (tab-bar-close-tab))) #+END_SRC I hope you find this useful, Matt Adam Porter <adam@alphapapa.net> writes:
Hi Juri, et al,I found myself wanting to move a tab-bar tab to a new frame displayingonly that tab (like a web browser's "detach tab" command), and Icouldn't find a command to do that, so I wrote this simple one. Itseems to work and ought to be useful, I think.It might be worth binding it to something like "C-x t D" as well,assuming the command is worth merging. :) Thanks, Adam[2. New tab-bar-detach-tab command --- text/x-diff; 0001-lisp-tab-bar.el-tab-bar-detach-tab-New-command.patch]...
[Prev in Thread] | Current Thread | [Next in Thread] |