Why doesn’t Emacs expand my aliases when sending mail?
See The Emacs Manual in The Emacs Manual.
Normally, Emacs expands aliases when you send the message. To expand them before this, use M-x expand-mail-aliases.
Emacs normally only reads the
.mailrcfile once per session, when you start to compose your first mail message. If you edit the file after this, you can use M-x build-mail-aliases to make Emacs reread it.If you like, you can expand mail aliases as abbrevs, as soon as you type them in. To enable this feature, execute the following:
emacs-lisp(add-hook 'mail-mode-hook 'mail-abbrevs-setup)Note that the aliases are expanded automatically only after you type a word-separator character (e.g., RET or ,). You can force their expansion by moving point to the end of the alias and typing C-x a e (M-x expand-abbrev).