Re: Multi-boot and Mutt

2012-07-29 Thread Jack M
  2.  Is it possible to write a single .muttrc that I can copy to
  the three home directories that can determine the folder path
  based on the current OS?  That is, the common mail folder is called
  /Volumes/Common/Mail in OS X, D:/Common/Mail in Windows, and
  /Common/Mail in Linux.  Or do I just have to have three separate
  .muttrc files and manually coordinate them?  (I've never actually used
  the Windows version of Mutt, so I'm guessing at the path format.)
 
 Sure.  I've never used win32 mutt either, but presumably you can use it
 as part of a full mingw32/cygwin environment to get scripting tools.
 
 Behold this command:
 source ~/bin/muttrc.sh |

One can also use backtics in a muttrc to surround a snippet of shell
script, thereby avoiding the need for keeping another shell script file
laying round (in three places, no less):

source `some-conditional-here`

--Jack


Re: Multi-boot and Mutt

2012-07-29 Thread Nathan Stratton Treadway
On Sat, Jul 28, 2012 at 22:10:04 -0600, Daryl Lee wrote:
 2.  Is it possible to write a single .muttrc that I can copy to the
 three home directories that can determine the folder path based on
 the current OS?  That is, the common mail folder is called
 /Volumes/Common/Mail in OS X, D:/Common/Mail in Windows, and
 /Common/Mail in Linux.  Or do I just have to have three separate
 .muttrc files and manually coordinate them?  (I've never actually used
 the Windows version of Mutt, so I'm guessing at the path format.)

Another approach might be to have three short stub .muttrc files in
the home directories, each of which would do a few lines of OS-specific
config, and then use the source command to include a file stored on
your /Common partition containing all your common configuration.  (That
would avoid the need to copy a file to back to each of the home
directories each time you wanted to change some aspect of the common
configuration.)

Nathan


Re: Multi-boot and Mutt

2012-07-29 Thread Kyle Wheeler

On Sunday, July 29 at 03:03 AM, quoth Jack M:
One can also use backtics in a muttrc to surround a snippet of shell 
script, thereby avoiding the need for keeping another shell script 
file laying round (in three places, no less):


source `some-conditional-here`


You can do even better than that; the power of inline backticks is 
significant. For example:


set from=`[ $HOST == 'unix' ]  echo -n unix || echo /n win32`@here.com

I use the same muttrc on a variety of OS's (MacOSX and Linux, mostly, 
but also various BSDs and Solaris), and use exactly this kind of trick 
to get them all working right.


~Kyle
--
Arguing with a fool proves there are two.
 -- Doris M. Smith


Multi-boot and Mutt

2012-07-28 Thread Daryl Lee
I used Mutt for several years when I first became a Linux user in 1999, and am 
considering returning to it if it gives me a shot at an objective I've been 
trying to achieve.

For a variety of reasons, none of which are germane to this topic, I have 
arranged for my primary work computer (a Macbook Pro) to triple-boot into Mac 
OS X (Lion), Windows 7, and Linux (Ubuntu 12.04).  I want to be able to both 
read new mail and all my archived email from any of those OSes, since I need to 
communicate whatever environment I happen to be working in at the moment.  I 
tried to make Thunderbird do that, since it seems to allow for such behavior, 
but there were constant issues with file permissions and data reliability.  It 
occurred to me recently that Mutt might be the answer.  So here are the 
questions I can think of:

1.  I don't expect this to be easy--but is there some reason it's just plain 
impossible?

2.  Is it possible to write a single .muttrc that I can copy to the three home 
directories that can determine the folder path based on the current OS?  That 
is, the common mail folder is called /Volumes/Common/Mail in OS X, 
D:/Common/Mail in Windows, and /Common/Mail in Linux.  Or do I just have to 
have three separate .muttrc files and manually coordinate them?  (I've never 
actually used the Windows version of Mutt, so I'm guessing at the path format.)

3.  Does anyone have any advice for someone whose Mutt skills are rusty at best?

--
Daryl Lee
If logic tells you that life is a meaningless accident, don't give up on life.  
Give up on logic.   -- Shira Milgrom



Re: Multi-boot and Mutt

2012-07-28 Thread David Champion
* On 28 Jul 2012, Daryl Lee wrote:
 For a variety of reasons, none of which are germane to this topic,
 I have arranged for my primary work computer (a Macbook Pro) to
 triple-boot into Mac OS X (Lion), Windows 7, and Linux (Ubuntu 12.04).
 I want to be able to both read new mail and all my archived email from
 any of those OSes, since I need to communicate whatever environment I
 happen to be working in at the moment.  I tried to make Thunderbird
 do that, since it seems to allow for such behavior, but there were
 constant issues with file permissions and data reliability.  It
 occurred to me recently that Mutt might be the answer.  So here are
 the questions I can think of:

 1.  I don't expect this to be easy--but is there some reason it's just
 plain impossible?

Seems possible to me.  Obviously, unless you use IMAP exclusively, you
need a filestore that is shared among all three OSes, and the only
common r/w filesystem I know of for those three OSes is FAT32.  You may
find problems with mail storage on FAT32, especially if using Maildir.
You may need to use UNIXv7 (mbox) instead to get around filesystem
limitations.

There's another approach you could take that might seem totally nuts,
but would avoid a lot of issues: put a stripped-down Linux VM on a
shared FAT32 filesystem, use that VM for mutt (or whatever), and launch
it from whatever OS you're running.

 2.  Is it possible to write a single .muttrc that I can copy to
 the three home directories that can determine the folder path
 based on the current OS?  That is, the common mail folder is called
 /Volumes/Common/Mail in OS X, D:/Common/Mail in Windows, and
 /Common/Mail in Linux.  Or do I just have to have three separate
 .muttrc files and manually coordinate them?  (I've never actually used
 the Windows version of Mutt, so I'm guessing at the path format.)

Sure.  I've never used win32 mutt either, but presumably you can use it
as part of a full mingw32/cygwin environment to get scripting tools.

Behold this command:
source ~/bin/muttrc.sh |

That runs ~/bin/muttrc.sh, and interprets its output as muttrc commands.
You can write a muttrc that emits your standard configuration, then runs
that source command at the end to fill it out with variations based on
current OS.

-- 
David Champion • d...@uchicago.edu • IT Services • University of Chicago