all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: [Feature request] I suggest delete-frame command can prompt user for confirmation
Date: Mon, 15 Nov 2021 02:15:17 +0100	[thread overview]
Message-ID: <878rxqte1m.fsf@web.de> (raw)
In-Reply-To: PAXPR08MB6640511C086629A6DF2D2245A3979@PAXPR08MB6640.eurprd08.prod.outlook.com

"Christopher M. Miles" <numbchild@gmail.com> writes:

> #+begin_src emacs-lisp
> (defun my/delete-frame-confirm (origin-func &optional args)
>   "Ask user to confirm whether really delete frame.
> To avoid accidentally [C-x 5 0] delete frame which confused with keybinding [C-x 5 o]."
>   (if (yes-or-no-p "Are you sure to delete current frame? ")
>       (apply origin-func args)
>     (message "I don't want to delete frame accidently!")))
>
> (advice-add 'delete-frame :around #'my/delete-frame-confirm)
> #+end_src
>
> What do you think?

I think it would be annoying and soon you would as often accidentally
say "yes" as you accidentally close frames now.  At least I can say that
it would not work for me.

Wouldn't it be much more useful to be able to restore a killed frame?

Michael.




  reply	other threads:[~2021-11-15  1:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-14  2:59 [Feature request] I suggest delete-frame command can prompt user for confirmation Christopher M. Miles
2021-11-15  1:15 ` Michael Heerdegen [this message]
2021-11-15  3:04   ` Michael Heerdegen
2021-11-15  3:39     ` [External] : " Drew Adams
2021-11-15  5:24     ` Lars Ingebrigtsen
2021-11-15 16:00       ` Vote for a Emacs built-in command to undo/restore killed frame Christopher M. Miles
2021-11-15 23:43       ` [Feature request] I suggest delete-frame command can prompt user for confirmation Michael Heerdegen
2021-11-17 10:06         ` Christopher M. Miles
2021-11-15 15:52     ` [SOLVED] " Christopher M. Miles

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=878rxqte1m.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /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.