Writing Accented Characters In Emacs

In this article, we’re going to take a look at how you can use accented characters when composing documents in Emacs.

What Do You Need To Do This?

You can enable support for many of these characters by changing your input method in Emacs. However, that’s outside the scope of what we’re doing here.

In this example, we want to keep English as our input method but simply insert tildes and other accent marks over characters in our documents.

This would be of use to anyone who uses Emacs to compose documents, particularly those who might need support for accented characters in writing Latinate, Greek, or other languages.

Even when writing in English, you may need to use these characters to write words that require certain accented characters. For example, if you need to write piƱa colada, simply writing pina with no tilde over the “n” will not suffice. In Emacs, we like to do things once and do them write.

How To Insert Accent Mark

To accomplish this, we’re going to use the insert-char function. This is a good function to know because it will help you insert other Unicode characters (like emojis, and other special characters) into your document.

As a bonus, if you’re using a package like “vertico” as a completion framework, you’ll be presented with a list from which to make your selections.

Here are the basic steps. In the following example we’ll use an accented “n” with a tilde as the special character we’re trying to write:

  1. Highlight “n” in buffer
  2. M-x insert-char
  3. Select “NON-SPACING TILDE”

That’s it! You know how you can easily add accented marking to characters in your Emacs document.

Be the first to comment

Leave a Reply

Your email address will not be published.


*