On Thu, Nov 27, 2003 at 04:27:31PM +0000, Chris Green wrote: > On Thu, Nov 27, 2003 at 10:13:31AM -0600, Michael Herman wrote: > > On Thu, Nov 27, 2003 at 09:50:16AM +0000, Chris Green wrote: > > >Is there any way one can have 'user' variables in a .muttrc file? > > > > > >It would be nice to be able, for example, to set a variable to contain > > >a list of all the mailing lists one is subscribed to and then to use > > >it in 'lists', 'subscribe' and 'mailboxes' commands. At present I > > >can't see any easy way to avoid repeating the list (OK, I could put > > >them in a file and use `cat listsfile` but this does seem a bit > > >clumsy). > > > > > > > How different is it to keep them in a file vs. a variable in the muttrc? I > > used to have my mailboxes list created on the fly using a shell script which > > was executed from within my muttrc. Why do you say "used to?" What do you do now? > Wouldn't this be the same thing (more > > or > > less)? Well, if you keep them in a variable in your Muttrc, then you can presumably do some fancy variable evaluation from right within your muttrc. Unfortunately, Mutt's abilities in this area are severely limited, anyway. (That, in a nutshell, is the primary reason for my From:-setting script, as well as my mailinglist-managing script.) > It's not hugely different except that one needs the list three times, > for mailboxes, for lists and for subscribe. I currently repeat the > same command in `` for each case, it would be neater not to have to > repeat the command each time. Not a big issue but it feels like most > of the (programming) hooks are there already. Well, yeah ... the muttrc language isn't intrinsically terribly powerful, as you've figured out. Fortunately, you can call external scripts/programs to do most of the real work. - Dave -- Uncle Cosmo, why do they call this a word processor? It's simple, Skyler. You've seen what food processors do to food, right? Please visit this link: http://rotter.net/israel
Attachment:
pgpoN786PmBlH.pgp
Description: PGP signature