My old laptop will only run Firefox 2 and Iβm too lazy to attempt and build a new binary. That means its Javascript implementation is very slow, and that means that Gmail is getting too slow to use. I started to use Gnus again. Yesterday I discovered how aggravating it is to send a new mail instead of replying to one. You have to actually know email addresses! Gaaah!
Via help on the TAB key I discovered that the function in question is `message-expand-name`, which in turn run `expand-abbrev`. And via the Mail Aliases section in the Message manual I learnt about `mailabbrev`, the package that parses the `~/.mailrc` file and creates all the abbreviations. Once I started looking for it I discovered that I actually already had a `~/.mailrc` file β I must have created it ages ago. The first thing I did was delete all entries except for family and close friends. π
Now, I define an alias as follows:
alias Alex "Alex Schroeder <kensanata@gmail.com>"
When I type βalexβ TAB in a header field of a new mail, this gets expanded. Remember to use `message-mode`, not `mail-mode`! But what if I type βalβ TAB and want to be told about the existing βalexβ alias?
;; override the simple defun provided (defadvice message-expand-name (after or-complete-alias activate) "Complete alias at point if it could not be expanded." (unless ad-return-value (mail-abbrev-complete-alias)))
So now I type βalβ TAB and see the list of aliases that start with βalβ, or this gets completed to the only matching alias, βalexβ, and when I press TAB again, that is expanded into the real email address.
If only I knew how to make this a cycling expansion... π
β#Emacs β#Gnus
(Please contact me if you want to remove your comment.)
β
You can also use BBDB with Gnus, which provides email address expansion as well. I have this in my `~/.emacs.el`:
(require 'bbdb) (bbdb-initialize 'gnus 'message 'w3) (add-hook 'message-setup-hook 'bbdb-define-all-aliases)
β Andreas Rottmann 2009-08-26 13:13 UTC
---
Yes, many ages ago I was in fact one of the BBDB developpers. As Iβm slowly creeping back into Gnus territory, I dread to dive into it head-first... π
β Alex Schroeder 2009-08-26 15:50 UTC