<<< Date Index >>>     <<< Thread Index >>>

Re: Aliases are not working



* Salvatore Iovene <salvatore@xxxxxxxxxx> [03-03-07 09:47]:
> in my .muttrc I have a line like this:
> 
> set alias_file=~/.mail_aliases
> 
> Indeed, saving aliases works, and they are appended to that file. If
> I just save an alias (or more), and then hit 'm' to compose, and
> 'tab' to see my aliases, I can only see the ones that I just saved in
> that mutt session.
>
> If I restart mutt, that 'm'+'tab' combination shows no aliases, like
> I had none, but they're all in place in ~/.mail_aliases.
> 
> Can anyone help fix this problem?

The problem is mis-understanding.  

In TFM, 3.4. Miscellaneous Functions:

   create-alias (default: a)

   Creates a new alias based upon the current message (or prompts for a
   new one). Once editing is complete, an alias command is added to the
   file specified by the $alias_file variable for future use. Note:
   Specifying an $alias_file does not add the aliases specified
   there-in, you must also source the file.

and later, 2.0 Defining/Using aliases

   Unlike other mailers, Mutt doesn't require aliases to be defined in
   a special file. The alias command can appear anywhere in a
   configuration file, as long as this file is sourced. Consequently,
   you can have multiple alias files, or you can have all aliases
   defined in your muttrc.

   On the other hand, the create-alias function can use only one file,
   the one pointed to by the $alias_file variable (which is ~/.muttrc
   by default). This file is not special either, in the sense that Mutt
   will happily append aliases to any file, but in order for the new
   aliases to take effect you need to explicitly source this file too.

   For example:

source /usr/local/share/Mutt.aliases
source ~/.mail_aliases
set alias_file=~/.mail_aliases



These sections were found by searching TFM for "alias_file"


If these notes fail to alleviate your problem, please ask for further
explanation.

-- 
Patrick Shanahan                        Registered Linux User #207535
http://wahoo.no-ip.org                        @ http://counter.li.org
HOG # US1244711         Photo Album:  http://wahoo.no-ip.org/gallery2
        OpenSUSE Linux             http://en.opensuse.org/