I mistyped some command sequence and ESC stopped working as a meta prefix in Aquamacs (it still functions as usual in the command-line emacs, including both Apple's system version and the command-line version that comes with Aquamacs). Afterwards, hitting ESC generates the <escape> function key. Unfortunately, I didn't notice in time for view-lossage to tell me what I did. I restarted Aquamacs in the hope of restoring functionality, but the issue persisted.

I've hunted around in the startup files I know of that have been modified recently (~/.emacs, ~/.emacs.d/{.emacs.desktop,SessionDesktop.el}, ~/Library/Preferences/Aquamacs Emacs/{.emacs.desktop,customizations.el}), but all of the relevant settings I can find seem to be correct. ESC is still listed as a prefix command in the bindings for major mode; globally, its binding is listed as ESC-prefix. meta-prefix-char is listed as 27. When started without init files, ESC works as meta prefix.

key-translation-map doesn't appear to have an entry for ESC (I didn't see anything with emaps-describe-keymap, and (lookup-key key-translation-map [27]) returns nil).

What else might I examine to determine which setting to change? Is there any other steps I should take to restore ESC as the meta prefix?

  • 1
    Have you checked the modification dates of the persistent user-configuration files and peeked inside anything that had activity on or about the date/time you experienced the change that affects new launches of the application? It has been a few years since I played with Aquamacs, but there are some user-configuration files that you should be checking to troubleshoot this issue. And, if you played with things like Karabiner, or SystemPeferences keyboard stuff, then check that too.
    – lawlist
    Commented Dec 14, 2018 at 6:07
  • 1
    Does it work if you run /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -q in the terminal to launch Aquamacs with no init files? I have had something like this happen on occasion with Aquamacs, although it has always been fine after a restart.
    – Win
    Commented Dec 15, 2018 at 2:07
  • @Win: Thanks, good tip. ESC does work with -q. Time to try taking out init files.
    – outis
    Commented Dec 15, 2018 at 22:35
  • @lawlist: there aren't many with more recent mod dates. See updated question.
    – outis
    Commented Dec 15, 2018 at 22:36
  • 1
    Maybe related: emacs.stackexchange.com/questions/14755/…. You could take a look at (lookup-key key-translation-map [27]).
    – Tobias
    Commented Dec 15, 2018 at 23:41

1 Answer 1


The culprit turned out to be a key binding. The mistyped command isn't relevant.

Disabling the init files in groups, I narrowed it down to .emacs. Searching through it for keybindings related to meta and ESC, I came across a binding for [escape C-tab]. Removing the binding and restarting Aquamacs restored functionality. I had found my culprit.

As for why the keybinding was there, I had tried to bind [M-C-tab] to #'simple-unindent; when that didn't work, I bound [escape C-tab]. That bounding held, but also caused the described behavior.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.