[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] New tab-bar-detach-tab command

From: Adam Porter
Subject: Re: [PATCH] New tab-bar-detach-tab command
Date: Wed, 29 Sep 2021 02:43:25 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Matt Beshara <m@mfa.pw> writes:

> 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)))

Hi Matt,

Thanks, I should have noticed that.  I've updated my patch, which I'll
post in reply to Juri's message.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]