[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: [PATCH] New tab-bar-detach-tab command
From: |
Drew Adams |
Subject: |
RE: [External] : Re: [PATCH] New tab-bar-detach-tab command |
Date: |
Tue, 5 Oct 2021 17:27:57 +0000 |
> > I don't know the signature of the `clone-frame'
> > that was added to Emacs, but perhaps it could use
> > a prefix arg to provide what you're proposing:
> > clone the frame (same frame parameters) AND clone
> > the window config of the frame in the new frame.
>
> Its prefix arg is already used for something useless:
>
> (defun clone-frame (&optional frame use-default-parameters)
> "Make a new frame with the same parameters as FRAME.
> With a prefix arg (USE-DEFAULT-PARAMETERS), use
> `default-frame-alist' instead.
>
> FRAME defaults to the selected frame. The frame is created on the
> same terminal as FRAME. If the terminal is a text-only terminal then
> also select the new frame."
> (interactive "i\nP")
> (if use-default-parameters
> (make-frame-command)
> (let* ((default-frame-alist (seq-filter
> (lambda (elem)
> (not (eq (car elem) 'name)))
> (frame-parameters frame)))
> (new-frame (make-frame)))
> (unless (display-graphic-p)
> (select-frame new-frame))
> new-frame)))
>
> Why does it use the prefix arg just to call another command
> 'make-frame-command'?
That's what I did in my `clone-frame', in order to
have just `C-x 5 2' bound. IOW, I stole `C-x 5 2'
for `clone-frame', and allowed a prefix arg to
give you `make-frame-command'. Personally, I
don't use `make-frame-commands', but some who use
my `clone-frame' might.
When I say that `clone-frame's prefix arg could
be used to get the behavior you're requesting
(clone the frame & duplicate its window config),
I mean that the prefix arg could do more than one
thing - there are different kinds of prefix args.
___
We _could_ have a single command, `clone-frame',
with prefix-arg behaviors for `make-frame-command'
(i.e., less than `clone-frame') and window-config
duplication (i.e., more than `clone-frame'). And
we could use one key for all of that: `C-x 5 2'.
That likely won't happen, based on the fact that
my suggestion to give `C-x 5 2' to `clone-frame'
(with `make-frame-command' via prefix arg) was
rejected in favor of Emacs sacrificing yet
another default key binding (why?).
___
What's more: IF we think that a reasonable number
of users might prefer one or the other of those
behaviors as their _default_ (1: make a plain
frame per `default-frame-alist'; 2: make a frame
with the same frame params; 3: make a frame with
the same frame params and the same window config),
THEN we could add a user option that controls that.
Then the prefix arg would let you get the other two
behaviors instead of your chosen default behavior.
That too is the kind of thing I sometimes do, and
the kind of thing vanilla Emacs abhors...
- Re: [PATCH] New tab-bar-detach-tab command, (continued)
- Re: [PATCH] New tab-bar-detach-tab command, Juri Linkov, 2021/10/05
- Re: [PATCH] New tab-bar-detach-tab command, Adam Porter, 2021/10/05
- RE: [External] : Re: [PATCH] New tab-bar-detach-tab command, Drew Adams, 2021/10/05
- Re: [PATCH] New tab-bar-detach-tab command, Juri Linkov, 2021/10/05
- Re: [PATCH] New tab-bar-detach-tab command, Adam Porter, 2021/10/06
- Re: [PATCH] New tab-bar-detach-tab command, Juri Linkov, 2021/10/06
- Re: [PATCH] New tab-bar-detach-tab command, Juri Linkov, 2021/10/07
- RE: [External] : Re: [PATCH] New tab-bar-detach-tab command, Drew Adams, 2021/10/07
- RE: [External] : Re: [PATCH] New tab-bar-detach-tab command, Drew Adams, 2021/10/05
- Re: [External] : Re: [PATCH] New tab-bar-detach-tab command, Juri Linkov, 2021/10/05
- RE: [External] : Re: [PATCH] New tab-bar-detach-tab command,
Drew Adams <=
- Re: [PATCH] New tab-bar-detach-tab command, Juri Linkov, 2021/10/06
- RE: [External] : Re: [PATCH] New tab-bar-detach-tab command, Drew Adams, 2021/10/06
- Re: [External] : Re: [PATCH] New tab-bar-detach-tab command, Juri Linkov, 2021/10/07
- Re: [External] : Re: [PATCH] New tab-bar-detach-tab command, Eli Zaretskii, 2021/10/07
- Re: [External] : Re: [PATCH] New tab-bar-detach-tab command, Juri Linkov, 2021/10/07
- RE: [External] : Re: [PATCH] New tab-bar-detach-tab command, Drew Adams, 2021/10/07
- Re: [External] : Re: [PATCH] New tab-bar-detach-tab command, Eli Zaretskii, 2021/10/07
- RE: [External] : Re: [PATCH] New tab-bar-detach-tab command, Drew Adams, 2021/10/07
- Re: [PATCH] New tab-bar-detach-tab command, Juri Linkov, 2021/10/05
- RE: [External] : Re: [PATCH] New tab-bar-detach-tab command, Drew Adams, 2021/10/05