emacs-devel
[Top][All Lists]
Advanced

[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: Tue, 05 Oct 2021 02:17:45 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Juri Linkov <juri@linkov.net> writes:

>>> Indeed, the key doesn't need to be the first letter of the command name.
>>> For example, since 'C-x t d' was already bound to 'dired-other-tab',
>>> for 'tab-duplicate' I added 'C-x t n' with the mnemonic of "new".
>>>
>>> But a month ago a new command 'clone-frame' was added with the
>>> keybinding 'C-x 5 c'.  So now we have two similar commands with
>>> different keys: 'c' - clone frame, and 'n' - duplicate tab.
>>>
>>> Or maybe these commands are quite different?  I tried 'clone-frame',
>>> but it neither clones nor duplicates the frame - it creates
>>> a completely new window configuration on the new frame.
>>
>> I suppose a `tab-clone' command would be more concise than
>> `tab-duplicate', and it would also fit with other commands like
>> `clone-buffer' (I don't see any other commands in my Emacs with
>> "duplicate" in the name).  Then the binding could be "C-x t c".
>
> The command was named "duplicate" because web browsers
> provide the menu item "Duplicate tab".

Of course, that makes sense.  But since "clone" seems to already be a
term used in Emacs for this sort of thing, maybe we should consider
using it, instead.  For example, `clone-buffer' and `clone-process' both
"Create a twin copy of...".  That the new `clone-frame' command only
"Make[s] a new frame with the same parameters as FRAME" and doesn't
include its window configuration seems like an anomaly (maybe that
should be changed, too, for consistency?).

> Also since 'clone-frame' doesn't duplicate the frame,
> we could add a new command 'duplicate-frame' as well.

Maybe so, but I wonder if it would be better to consistently use "clone"
to mean "Create a twin copy of...", and use "duplicate" to mean
something like what the `clone-frame' command currently does,
i.e. create a copy that shares some attributes but not all.  In that
case, the current `clone-frame' command could be renamed to
`duplicate-frame', and `duplicate-tab' could be renamed to `clone-tab'.

Maybe these details are too subtle to matter, but on the other hand, it
would seem more consistent with existing Emacs jargon if if worked that
way.




reply via email to

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