all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
To: abdo.haji.ali@gmail.com
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: How to prevent ESC from closing frames
Date: Fri, 29 Aug 2014 10:47:04 +0700	[thread overview]
Message-ID: <CAP_d_8VBCainE49uTY3UeqEG3kGpLzbG5SMfCdp9jjQmiArNzg@mail.gmail.com> (raw)
In-Reply-To: <f10cdcff-be06-4653-9d78-9e20fbd67d54@googlegroups.com>

On Thu, Aug 28, 2014 at 2:13 PM,  <abdo.haji.ali@gmail.com> wrote:
>
> Yes, emacs -Q has the same behaviour
>
> I wasn't very clear though. The frames close when pressing ESC three times in a row.
> It's a habit of mine that is proving to be very inconvenient

You use the term “frame” but actually mean Emacs windows, that’s why
some other replies misunderstand you.


C-h k ESC ESC ESC

```
ESC ESC ESC (translated from <escape> <escape> <escape>) runs the
command keyboard-escape-quit, which is an interactive compiled Lisp
function in `simple.el'.

It is bound to M-ESC ESC.

(keyboard-escape-quit)

Exit the current "mode" (in a generalized sense of the word).
This command can exit an interactive command such as `query-replace',
can clear out a prefix argument or a region,
can get out of the minibuffer or other recursive edit,
cancel the use of the current buffer (for special-purpose buffers),
**or go back to just one window (by deleting all but the selected window).**
```


I have looked at the source of this function and it does not check any
variables that could be used to control its features. So, no, you
can’t, at least not directly.

What you can do is to instead pick up the habit of pressing C-g to
cancel whatever you are doing, C-M-c to get out of recursive edit, and
the key you usually use to kill buffers for special-purpose buffers
too.

Or you can copy the source of keyboard-escape-quit, rename it to your
own name, delete the alternative that deals with deleting windows, and
bind your version to ESC ESC ESC.



  parent reply	other threads:[~2014-08-29  3:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27  7:52 How to prevent ESC from closing frames abdo.haji.ali
2014-08-27 15:25 ` Dale Snell
     [not found] ` <mailman.7613.1409153217.1147.help-gnu-emacs@gnu.org>
2014-08-28  7:13   ` abdo.haji.ali
2014-08-28 15:14     ` sokobania
2014-08-28 20:37       ` Chris F.A. Johnson
2014-08-28 18:03     ` Dale Snell
2014-08-29  3:47     ` Yuri Khan [this message]
     [not found]     ` <mailman.7805.1409284030.1147.help-gnu-emacs@gnu.org>
2014-08-29  9:09       ` sokobania.01

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=CAP_d_8VBCainE49uTY3UeqEG3kGpLzbG5SMfCdp9jjQmiArNzg@mail.gmail.com \
    --to=yuri.v.khan@gmail.com \
    --cc=abdo.haji.ali@gmail.com \
    --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.