# Improving ~/.mailrc usage

DevFeed: [Improving ~/.mailrc usage](<https://devfeed.tech/articles/improving-mailrc-usage-34351.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2009/09/improving-~/.mailrc-usage/>)

Published: 2009-09-06T23:29:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [file](<https://devfeed.tech/topics/file.md>)

Tags: [aliases](<https://devfeed.tech/tags/aliases.md>), [completion](<https://devfeed.tech/tags/completion.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [example](<https://devfeed.tech/tags/example.md>), [file](<https://devfeed.tech/tags/file.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [setup](<https://devfeed.tech/tags/setup.md>)

## AI overview

The article explains how to use ~/.mailrc as a basic address book in Emacs and configure mail-mode abbreviations and a keyboard shortcut for inserting aliases with minibuffer completion. It also describes maintaining the ~/.mailrc file.

## Source excerpt

So I've been adviced to use ~/.mailrc for keeping a basic address book in Emacs, for use within gnus for example. I had to resort to the manual to find out how to use the file aliases when I need them, that is when composing a mail. For the record, here's what I had to do: ;; mails and aliases (add-hook 'mail-mode-hook 'mail-abbrevs-setup) (global-set-key (kbd "C-c @") 'mail-abbrev-insert-alias) That means I prefer hitting C-c @, then typing the alias in the minibuffer (with completion) and there after see the full mail address in my message-mode buffer. This looks like it'll change over time, but rather than searching how to have a nice inline alias completion ( M-tab maybe, but already used by the window manager), I've tackled the problem of maintaining the ~/.mailrc file.