From: Eli Zaretskii <eliz@gnu.org>
To: Gregory Heytings <gregory@heytings.org>
Cc: michael_heerdegen@web.de, 51883@debbugs.gnu.org, juri@linkov.net
Subject: bug#51883: 29.0.50; Command to get accidentally deleted frames back
Date: Wed, 17 Nov 2021 15:11:36 +0200 [thread overview]
Message-ID: <83tugbyliv.fsf@gnu.org> (raw)
In-Reply-To: <a8022ede870c59258c0f@heytings.org> (message from Gregory Heytings on Tue, 16 Nov 2021 21:29:35 +0000)
> Date: Tue, 16 Nov 2021 21:29:35 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: 51883@debbugs.gnu.org, Juri Linkov <juri@linkov.net>,
> michael_heerdegen@web.de
>
> Updated patch attached, which incorporates your comments and Juri's
> suggestion.
>
> > This is unusual meaning of prefix argument. Why not use zero for the
> > last, 1 for the one before that, etc.?
>
> You mean: 0 for the least recently deleted one, and 15 for the most
> recently deleted one? So to recover the frame you just deleted by
> accident, you'd have to type C-u 15 C-x 5 u? That seems unnatural to me,
> but perhaps it's just me.
No, I mean "last" as in "the most recently deleted one". Sorry for
being unclear.
Usually, commands that use both numeric and raw prefix arg do
something very different with the raw argument, which is not the case
here.
> A minor mode is another option, indeed. My feeling is that this feature
> is something about everyone would find useful, and that the cost you
> mention is not that high. And I solved the problem of the deletion of the
> terminal frame. So I made it an opt-out minor-mode.
I'd prefer to make it opt-in. I see no reason to force on everyone a
new feature that doesn't sound like it's urgent or important enough to
justify the behavior change. Even though the memory it uses is not
large, it's still memory, and it still increases consing each time a
frame is deleted. For example, some people turn on all kinds of optional
features that pop up new frames in many situations, and who knows what
this will cause in those usage patterns. Why risk such unintended
consequences on behalf of a minor feature?
As a nice bonus, making it opt-in will also allow to make the
implementation cleaner: no need for special handling of the initial
frame etc.
> > The "however" part is "out of the blue" here; I'd drop it.
> >
>
> I see what you mean, but it's not out of the blue, it's meant to balance
> the "permanently eliminating" in "Delete FRAME, permanently eliminating it
> from use." two lines above.
> + (and (not (display-graphic-p))
> + (seq-every-p
> + (lambda (f) (not (frame-parameter f 'display)))
> + (frame-list))))
This should have a comment explaining what it does and why. (And I
hope we will be able to avoid doing that in the first place.)
Also, what happens with the daemon frame if this function is invoked
from a GUI frame?
> +Without a prefix argument, or with a non-numerical prefix argument,
This is better rephrased as
... or with just \\[universal-argument], ...
since "non-numerical prefix argument" will not necessarily be clear to
everyone quickly enough.
> + (bindings--define-key menu [undelete-last-deleted-frame]
> + '(menu-item "Undelete Frame" undelete-frame
> + :enable undelete-frame-mode
> + :help "Undelete last deleted frame"))
How about using "restore" instead of "undelete", here and everywhere
else? I think it's a tad more clear, and also easier to understand,
as it doesn't use negative tense.
> doc: /* Delete FRAME, permanently eliminating it from use.
> FRAME must be a live frame and defaults to the selected one.
>
> +The 16 most recently deleted frames can however be undeleted with
> +`undelete-frame', which see.
If "however" is because of "permanently", I'd rather we lost both. It
makes little sense to say something and then contradict ourselves 2
sentences later.
The doc string should also mention the minor mode, because without it
the added sentence is inaccurate.
Thanks.
next prev parent reply other threads:[~2021-11-17 13:11 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 23:38 bug#51883: 29.0.50; Command to get accidentally deleted frames back Michael Heerdegen
2021-11-16 7:53 ` Juri Linkov
2021-11-16 8:14 ` Lars Ingebrigtsen
2021-11-16 20:46 ` Juri Linkov
2021-11-16 8:49 ` Visuwesh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-16 20:20 ` Juri Linkov
2021-11-16 15:17 ` Gregory Heytings
2021-11-16 17:05 ` Gregory Heytings
2021-11-16 17:40 ` Eli Zaretskii
2021-11-16 21:29 ` Gregory Heytings
2021-11-17 10:02 ` Gregory Heytings
2021-11-17 13:11 ` Eli Zaretskii [this message]
2021-11-17 17:06 ` Juri Linkov
2021-11-17 17:14 ` Eli Zaretskii
2021-11-19 9:00 ` Gregory Heytings
2021-11-19 12:17 ` Eli Zaretskii
2021-11-24 0:44 ` Gregory Heytings
2021-11-27 11:36 ` Michael Heerdegen
2021-11-27 11:53 ` Gregory Heytings
2021-11-27 12:05 ` Eli Zaretskii
2021-11-27 12:12 ` Gregory Heytings
2021-11-27 12:30 ` Andreas Schwab
2021-11-27 12:34 ` Eli Zaretskii
2021-11-27 12:23 ` Michael Heerdegen
2021-11-27 12:40 ` Eli Zaretskii
2021-11-27 13:22 ` Michael Heerdegen
2021-11-27 13:26 ` Eli Zaretskii
2021-11-27 13:34 ` Michael Heerdegen
2021-11-27 13:56 ` Eli Zaretskii
2021-11-27 13:59 ` Michael Heerdegen
2021-11-27 14:02 ` Eli Zaretskii
2021-11-27 14:08 ` Michael Heerdegen
2021-11-27 14:47 ` Eli Zaretskii
2021-11-27 14:12 ` Gregory Heytings
2021-11-27 14:24 ` Michael Heerdegen
2021-11-27 14:26 ` Gregory Heytings
2021-11-27 14:33 ` Michael Heerdegen
2021-11-27 14:42 ` Gregory Heytings
2021-11-27 14:54 ` Michael Heerdegen
2021-11-27 17:19 ` Gregory Heytings
2021-11-28 15:47 ` Michael Heerdegen
2021-11-29 13:38 ` Gregory Heytings
2021-11-29 18:18 ` Michael Heerdegen
2021-11-29 19:07 ` Michael Heerdegen
2021-11-29 20:19 ` Juri Linkov
2022-01-13 8:32 ` Juri Linkov
2022-01-14 8:12 ` Juri Linkov
2022-01-16 20:59 ` Juri Linkov
2022-01-17 0:08 ` Michael Heerdegen
2022-01-17 8:24 ` Juri Linkov
2022-01-17 13:00 ` Eli Zaretskii
2022-01-17 18:41 ` Juri Linkov
2022-01-17 18:51 ` Eli Zaretskii
2022-01-18 18:30 ` Juri Linkov
2022-01-19 18:37 ` Juri Linkov
2022-01-19 20:17 ` Eli Zaretskii
2021-12-12 2:44 ` Michael Heerdegen
2022-01-10 8:13 ` Michael Heerdegen
2021-11-27 14:48 ` Eli Zaretskii
2021-11-27 12:13 ` Michael Heerdegen
2022-01-22 18:10 ` Juri Linkov
2022-01-21 17:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-22 18:08 ` Juri Linkov
2022-01-22 21:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-23 9:11 ` Juri Linkov
2022-01-23 16:01 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-23 18:12 ` Juri Linkov
2022-01-23 21:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-24 18:12 ` Juri Linkov
2022-01-24 18:32 ` Eli Zaretskii
2022-01-25 9:28 ` martin rudalics
2022-01-25 12:29 ` Eli Zaretskii
2022-01-25 15:58 ` martin rudalics
2022-01-27 17:21 ` Juri Linkov
2022-01-27 17:27 ` Eli Zaretskii
2022-01-27 17:48 ` Juri Linkov
2022-01-24 23:00 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-27 17:19 ` Juri Linkov
2022-01-30 16:39 ` Juri Linkov
2022-01-30 16:59 ` Eli Zaretskii
2022-01-30 17:17 ` Juri Linkov
2022-01-30 18:17 ` Eli Zaretskii
2022-01-30 20:49 ` Juri Linkov
2021-11-16 20:30 ` Juri Linkov
2021-11-17 4:13 ` Richard Stallman
2021-11-17 10:07 ` Gregory Heytings
2021-11-17 16:39 ` bug#51883: [External] : " Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83tugbyliv.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=51883@debbugs.gnu.org \
--cc=gregory@heytings.org \
--cc=juri@linkov.net \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.