On Tue, May 16, 2000 at 11:53:43PM -0400, David T-G wrote:
> Kristin --
> 
> Chris Green is probably your user-level guy for mutt and IMAP; he's been
> putting it through its paces.
> 
Well I can't keep quiet in that case can I?  :-)

> The best answer that I've seen to the "multiple personality" problem is
> to create a master muttrc that sets your basic defaults and then create
> little muttrc files that set persona-specific settings.  You can make a
> couple of simple macros to call these guys.
> 
Yes, that's probably the easiest way to do that, it doesn't
necessarily address the need to browse a mixture of different IMAP
servers and local folders though.  (See bottom of this message)

> I can't think of how you could browse all three IMAP servers at the same
> time with the 'c'hange-folder command; the best I can think of is the
> persona files above and browsing any single IMAP server based on who you
> are at the moment.
> 
Well you could if you were prepared to type in the full IMAP folder
name/address each time but that would get a bit tedious.

What I have done is define a couple of macros that implement special
change-folder and save-message commands which start the browser at the
'root' of the particular hierarchy I want to browse.  The ordinary 'c'
command will browse from wherever you left off so you only need the
special commands when you want to move from one IMAP server to another
(or back to your local files).

I have currently used macros which are ',' plus a letter for my new
change-folder macros as ',' is unshifted and easy to reach but of
course any spare key can be used.

The basic 'go and browse an IMAP folder' macro is:-

    macro index ,c "c?c^U{x-1.net}INBOX^M"

I'm not sure how you need to enter the ^U and ^M, I have entered real
control characters in my muttrc which works OK, there are other ways
of entering them in a muttrc file too.

To get the browser back to the 'top' of my local mail hierarchy I
have:-

    macro index \\c "c?c^U/home/chris/Mail^M"


These macros only allow you to 'change-folder' to and from an IMAP
server, if you want to get into the browser from other commands when
referring to the IMAP server then you need to add more macros, for
example I have:-

    macro index ,s "s?c^U{x-1.net}INBOX.^M"

which allows me to enter the browser to save a message to the remote
IMAP server.  You could also add a similar macro for the copy-message
command.


Finally, if you want to switch personalities completely you need to
set a few mutt variables, I have a short file as follows which I can
source if I want to 'become' my remote IMAP personality:-

    source ~/.mutt/muttrc
    my_hdr  From: [EMAIL PROTECTED]
    set folder={x-1.net:50143}
    set imap_user=cgreen
    set imap_pass=<PASSWORD>
    set record={x-1.net:50143}outbox
    set spoolfile={x-1.net:50143}inbox

I invoke this with:-
    mutt -F /home/chris/.mutt/x-1

which is why the first line gets all my basic mutt settings from my
main muttrc file.  One could of course just source the above file from
within mutt to change personalities.  This *doesn't* affect where the
browser is rooted though, so if you change personality 'on the fly'
and then use the browser it will be pointing at your 'old' personality
unless you use one of my macros above.

Hope this helps some, feel free to E-Mail me directly for more
clarification etc.

-- 
Chris Green ([EMAIL PROTECTED])
  Home: [EMAIL PROTECTED]           Work: [EMAIL PROTECTED]
  WWW: http://www.isbd.co.uk/

Reply via email to