I am using Emacs 26.3 with macos Catalina and I would like to type the inverted exclamation point and question mark characters. Can someone point me to a link that will get me started towards understanding how to input special characters not available on my standard MacBook Pro keyboard.


2 Answers 2


Short answer: C-u C\ spanish-prefix RET. The characters you mentioned can then be typed as

~? => ¿
~! => ¡

Long answer: read the emacs documentation starting at Language Environments, plus the description of 'spanish-prefix' in lisp/leim/quail/latin-pre.el to see what other characters that method supports, and to see what other input methods are available, such as catalan-prefix and spanish-keyboard.

  • The linked documentation plus the section that follows on Input Methods were very helpful.
    – pajato0
    Oct 21, 2019 at 7:55

I just found out this is how you do it: (setq ns-alternate-modifier nil)

I was instead using the insert-chart bound to C-x 8 which is very painful

edit: thank you all for the interest xD

I'm native spanish speaker and I really need to introduce characters like á, é, í etc... otherwise my notes make no sense! I'm also a mac book pro user, trying spacemacs + org-mode for a change. To finish contextualizing my answer, I must clarify that I use my keyboard with the following changes:

  • Key Caps Lock maps to Control
  • Key Control maps to Command
  • Key Option maps to Caps Lock
  • Key Command maps to Option

In this universe, I order to produce an á symbol I press Key Command-e a. I find this very comfortable. As soon as I started taking notes in org-mode I realized I couldn't type Key Command-e, didn't understand why.

I've found the solution and now I have a theory that attempts to explain what happens, first, the solution:

  • Go to your spacemacs config file SPC f e d and look for function dotspacemacs/user-config
  • Add (setq ns-alternate-modifier nil) to the function's body, it disables Emacs interpretation of Key Command
  • Add (setq ns-command-modifier 'meta) to the function's body, it remaps Emacs meta key to Control. I realized later that I needed this remap, as Command can't work as meta anymore, because the previous setting makes Emacs forget about that key completely
  • Reload your config with SPC f e R

Theory behind it:

Emacs was consuming key Command-e as M-e which is bound to forward-sentence the solution is then to (setq ns-alternate-modifier nil) to stop Emacs from reacting to key Command and allowing the OS to bundle Command-e + {{followingChar}} as a single keypress later on, delivering this compound keypress a single char to Emacs.

This generates a new problem: How do you call M-e now?, this is why (setq ns-command-modifier 'meta) is required. In my keyboard configuration this has the effect of making key Control meta which is incredible handy. so M-e is now Ctrl-e

Before finding this solution I was barely surviving by invoking C-x 8 ' a for a single á.

  • 1
    How you do what? Please elaborate on how this answers the question.
    – Drew
    Apr 7, 2022 at 1:45
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Apr 8, 2022 at 18:19
  • I think you need to mention that other standard macOs apps use alt to produce some non English characters and the emacs binding blocks the normal macOs behaviour. Most users here don't use macOs and so are confused by your answer
    – mmmmmm
    Apr 10, 2022 at 19:29

Your Answer

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

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