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

Re: aliasing mailing lists



On Sat, May 20, 2006 at 01:31:03AM EDT, David Woodfall wrote:
[..]
> > 
> > Hmm.. how does it *not* work? What are the symptoms?
> 
> I get an error 'no lists defined' or similar when I try to reply to list with
> 'L'
>  
weird.. I just reinstated this in .muttrc, saved, fired up a mutt
session, viewed a message in a mailing list and hit 'L' and it worked.
And I checked that there was no other 'subscribe' command in my muttrc.

[..]

> > > will work, although I haven't managed to get this to work for aliases:
> > > 
> > > alias `for entry in $(cat ~/.mutt/mailinglists); do echo $entry | awk -F@ 
> > > '{print $1 " <"$1"@"$2">"}'; done`
> > > 
> > > This refuses to work. Any ideas?
> > 
> > I think this won't work because you need an alias command for each
> > mailing list. 
> > 
> > Assuming ~/.mutt/mailinglists contains:
> > 
> > list1@host1
> > list2@host2
> > 
> > the output of the `...` above is:
> > 
> > list1 <list1@host1> list2 <list2@host2>
> > 
> > .. so the final result in your .muttrc is:
> > 
> > alias list1 <list1@host1> list2 <list2@host2>
> > 
> > while what you want is:
> > 
> > alias list1 <list1@host1> 
> > alias list2 <list2@host2>
> 
> The alias command takes the following string as a literal alias and will not
> work with shell commands. To see this, try the script and start a new mail, 
> then
> hit tab when asked for the adress. You will see an alias like:
> 
> 1 `for ... etc
> 
> in the aliases list

.. inconsistent behavior across commands..? I had not thought of that..
but it sort of makes sense considering the command itself works
differently - just one pair of arguments.. so it probably would not
make be very useful if it could use the output of a script/command as its
target..? 

I rapidly tested your version of the alias command in mutt and it does
not do anything in my case.. doesn't even show me the `for.. ` .. when
I tab, I just get an empty line numbered '1' .. and if I select it I
get .. well an empty entry across my 'To:'

Strange that your version of mutt seems to be behaving differently. I
am running:

mutt -v
Mutt 1.5.6+20040907i (CVS)
Copyright (C) 1996-2002 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 2.4.27.060305-2 (i686) [using ncurses 5.4] [using libidn 0.5.13 
(compiled with 0.5.2)]
Compile options:
-DOMAIN
+DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE
+USE_FCNTL  -USE_FLOCK
+USE_POP  +USE_IMAP  +IMAP_EDIT_THREADS  -USE_GSS  -USE_SSL  +USE_GNUTLS  
+USE_SASL  +USE_SASL2
+HAVE_REGCOMP  -USE_GNU_REGEX
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  -CRYPT_BACKEND_GPGME  
-BUFFY_SIZE -EXACT_ADDRESS  -SUN_ATTACHMENT
+ENABLE_NLS  -LOCALES_HACK  +COMPRESSED  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET 
 +HAVE_LANGINFO_YESEXPR
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_LIBIDN  +HAVE_GETSID  +HAVE_GETADDRINFO  
+USE_HCACHE
ISPELL="ispell"
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc"
EXECSHELL="/bin/sh"
MIXMASTER="mixmaster"
To contact the developers, please mail to <mutt-dev@xxxxxxxx>.
To report a bug, please use the flea(1) utility.

Debian.Md.etc_mailname_gethostbyname
Debian.Md.gpg_status_fd
Debian.Md.muttbug
Debian.Md.use_debian_editor
Debian.asp.agent-compatible.1
mutt-cvs-header-cache.24
patch-1.3.23.1.ametzler.pgp_good_sign
patch-1.4.admcd.gnutls.59d
patch-1.5.4.fw.maildir_inode_sort
patch-1.5.4.vk.pgp_verbose_mime
patch-1.5.5.1.cd.edit_threads.9.5
patch-1.5.5.1.nt.xtitles.3.ab.1
patch-1.5.6.cb.current_shortcut.2
patch-1.5.6.dw.maildir-mtime.1
patch-1.5.6.rr.compressed.1
patch-1.5.6.tt.compat.1
patch.helmersson.incomplete-mbyte.2

Thanks,

cga