GNU bug report logs - #45625
ESC ESC ESC deletes other windows

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sun, 3 Jan 2021 14:41:01 UTC

Severity: wishlist

Tags: notabug

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45625 in the body.
You can then email your comments to 45625 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to rms <at> gnu.org, bug-gnu-emacs <at> gnu.org:
bug#45625; Package emacs. (Sun, 03 Jan 2021 14:41:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to rms <at> gnu.org, bug-gnu-emacs <at> gnu.org. (Sun, 03 Jan 2021 14:41:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: C-p (previous-line) now wipes out windows, if misaimed
Date: Sun, 03 Jan 2021 22:03:25 +0800
Just the other day I noticed windows disappearing. It turns out that
"ESC ESC ESC" has been made even more super powered, by adding "or go
back to just one window (by deleting all but the selected window)" to
the many things it does.

Well it turns out ESC is also ^[.
And p is next to [ on many keyboards.
So ^p is next to ^[.
And ^p is/was the main way to do previous-line (go up).
So if your fingers aren't aimed correctly, then holding down CTRL+P will
not send the cursor marching up the screen, but will instead wipe out
your other windows!

Try it. Hold down ^[.

All your other windows will go away.

(When you finally release your finger, in the minibuffer you might see
"ESC-" or "ESC ESC-" or nothing at all, depending if you hit e.g., 31,
32, or 33 mis-aimed ^P's.)

Conclusion: keyboard-escape-quit should not also delete other windows.
There is already C-x 1 (delete-other-windows) for that!

Yes, one could just say "Start using the arrow keys instead of ^p for
crying out loud." But for older users it is too late for that.

emacs-version "27.1"




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45625; Package emacs. (Sun, 03 Jan 2021 17:06:02 GMT) Full text and rfc822 format available.

Message #8 received at 45625 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 45625 <at> debbugs.gnu.org, Richard Stallman <rms <at> gnu.org>
Subject: Re: bug#45625: C-p (previous-line) now wipes out windows, if misaimed
Date: Sun, 3 Jan 2021 18:04:45 +0100
Am So., 3. Jan. 2021 um 15:41 Uhr schrieb 積丹尼 Dan Jacobson
<jidanni <at> jidanni.org>:
>
> Just the other day I noticed windows disappearing. It turns out that
> "ESC ESC ESC" has been made even more super powered, by adding "or go
> back to just one window (by deleting all but the selected window)" to
> the many things it does.

This functionality has been present since keyboard-escape-quit was
introduced in 1994 (commit c66587feff67603818ea49fe4b7bfafe77a93e89,
Emacs 19.29).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45625; Package emacs. (Mon, 04 Jan 2021 03:29:01 GMT) Full text and rfc822 format available.

Message #11 received at 45625 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 45625 <at> debbugs.gnu.org, Richard Stallman <rms <at> gnu.org>
Subject: Re: bug#45625: C-p (previous-line) now wipes out windows, if misaimed
Date: Mon, 04 Jan 2021 11:28:32 +0800
>>>>> "PS" == Philipp Stephani <p.stephani2 <at> gmail.com> writes:

PS> This functionality has been present since keyboard-escape-quit was
PS> introduced in 1994 (commit c66587feff67603818ea49fe4b7bfafe77a93e89,
PS> Emacs 19.29).

OK, then maybe it is now that I own a wider monitor that now fits left
and right windows, that I am noticing it.

Anyway, some users, like me, still use ^p^p^p... so it is too dangerous.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45625; Package emacs. (Mon, 04 Jan 2021 05:17:02 GMT) Full text and rfc822 format available.

Message #14 received at 45625 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 45625 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#45625: C-p (previous-line) now wipes out windows, if misaimed
Date: Mon, 04 Jan 2021 00:16:15 -0500
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > Just the other day I noticed windows disappearing. It turns out that
  > > "ESC ESC ESC" has been made even more super powered, by adding "or go
  > > back to just one window (by deleting all but the selected window)" to
  > > the many things it does.

  > This functionality has been present since keyboard-escape-quit was
  > introduced in 1994 (commit c66587feff67603818ea49fe4b7bfafe77a93e89,
  > Emacs 19.29).

The reason we did this is that some beginners made two windows and
didn't understand why the screen was split.  They also did not
understand how to get "out" of that "mode".  So we set up ESC ESC ESC
to "get you out of anything" in Emacs, including the split screen.

Jidanni, we could add an option to tell ESC ESC ESC not to mess with
the window layout, for users who do know the C-x 1 command.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45625; Package emacs. (Mon, 04 Jan 2021 05:28:01 GMT) Full text and rfc822 format available.

Message #17 received at 45625 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Richard Stallman <rms <at> gnu.org>
Cc: Philipp Stephani <p.stephani2 <at> gmail.com>, 45625 <at> debbugs.gnu.org
Subject: Re: bug#45625: C-p (previous-line) now wipes out windows, if misaimed
Date: Mon, 04 Jan 2021 13:27:14 +0800
>>>>> "RMS" == Richard Stallman <rms <at> gnu.org> writes:
RMS> Jidanni, we could add an option to tell ESC ESC ESC not to mess with
RMS> the window layout, for users who do know the C-x 1 command.

It's a deal! Please do.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45625; Package emacs. (Mon, 04 Jan 2021 07:09:02 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Jose A. Ortega Ruiz" <jao <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#45625: C-p (previous-line) now wipes out windows, if misaimed
Date: Mon, 04 Jan 2021 06:32:18 +0000
On Mon, Jan 04 2021, Richard Stallman wrote:

[...]

> Jidanni, we could add an option to tell ESC ESC ESC not to mess with
> the window layout, for users who do know the C-x 1 command.

FWIW, i would certainly make use or that option (the triple C-[ scenario
has happened to me many times, and i learned about winner-undo just to
be able to revert quickly its effects).





Changed bug title to 'ESC ESC ESC deletes other windows' from 'C-p (previous-line) now wipes out windows, if misaimed' Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 04 Jan 2021 10:20:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45625; Package emacs. (Tue, 05 Jan 2021 06:38:01 GMT) Full text and rfc822 format available.

Message #25 received at 45625 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: "Jose A. Ortega Ruiz" <jao <at> gnu.org>
Cc: 45625 <at> debbugs.gnu.org
Subject: Re: bug#45625: C-p (previous-line) now wipes out windows, if misaimed
Date: Tue, 05 Jan 2021 01:37:36 -0500
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > Jidanni, we could add an option to tell ESC ESC ESC not to mess with
  > > the window layout, for users who do know the C-x 1 command.

  > FWIW, i would certainly make use or that option (the triple C-[ scenario
  > has happened to me many times, and i learned about winner-undo just to
  > be able to revert quickly its effects).

Want to write a patch to create the option, with the default
being the current behavior?

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45625; Package emacs. (Tue, 05 Jan 2021 17:09:02 GMT) Full text and rfc822 format available.

Message #28 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Jose A. Ortega Ruiz" <jao <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#45625: C-p (previous-line) now wipes out windows, if misaimed
Date: Tue, 05 Jan 2021 17:04:06 +0000
On Tue, Jan 05 2021, Richard Stallman wrote:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > > Jidanni, we could add an option to tell ESC ESC ESC not to mess with
>   > > the window layout, for users who do know the C-x 1 command.
>
>   > FWIW, i would certainly make use or that option (the triple C-[ scenario
>   > has happened to me many times, and i learned about winner-undo just to
>   > be able to revert quickly its effects).
>
> Want to write a patch to create the option, with the default
> being the current behavior?

i just took a look, and there is already a variable,
buffer-quit-function, to set up a function to call instead of
delete-other-windows.  i suspect it was introduced with something like
addressing this problem in mind (i think it's not used anywhere else).

for instance, just setting

    (setq buffer-quit-function (lambda () t))

fixes the issue for me.

jao
-- 
I have lived in this world just long enough to look carefully the
second time into things that I am most certain of the first
time. -Josh Billings, columnist and humorist (21 Apr 1818-1885)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45625; Package emacs. (Sun, 10 Jan 2021 15:22:02 GMT) Full text and rfc822 format available.

Message #31 received at 45625 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Jose A. Ortega Ruiz" <jao <at> gnu.org>
Cc: 45625 <at> debbugs.gnu.org
Subject: Re: bug#45625: ESC ESC ESC deletes other windows
Date: Sun, 10 Jan 2021 16:21:47 +0100
"Jose A. Ortega Ruiz" <jao <at> gnu.org> writes:

> i just took a look, and there is already a variable,
> buffer-quit-function, to set up a function to call instead of
> delete-other-windows.  i suspect it was introduced with something like
> addressing this problem in mind (i think it's not used anywhere else).
>
> for instance, just setting
>
>     (setq buffer-quit-function (lambda () t))
>
> fixes the issue for me.

OK, then there doesn't seem to be anything to do here, and I'm closing
this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) notabug. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 10 Jan 2021 15:23:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 45625 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 10 Jan 2021 15:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45625; Package emacs. (Mon, 11 Jan 2021 11:26:01 GMT) Full text and rfc822 format available.

Message #38 received at 45625 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: 45625 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#45625 ESC ESC ESC
Date: Mon, 11 Jan 2021 19:24:51 +0800
> for instance, just setting
>
>     (setq buffer-quit-function (lambda () t))
>
> fixes the issue for me.

LI> OK, then there doesn't seem to be anything to do here, and I'm closing
LI> this bug report.

But the ESC ESC ESC documentation should mention this.

Else the next user will just file the same report!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 08 Feb 2021 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.