help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using movemail directly in .emacs


From: Hikaru Ichijyo
Subject: using movemail directly in .emacs
Date: 04 May 2014 03:10:13 GMT
User-agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.14.2 (x86_64))

This is a newbie Emacs question.  If the answers are obvious or the 
intent misguided, let me know.

I'd like to start handling my email in Emacs, probably in VM.  But I 
have seen that all Emacs mailreaders like to move the spool file into 
the home directory before operating, because none of them can do locking 
on a mailbox in place while the system mailer daemon is trying to append 
new messages.  (This is not as outrageous of an expectation as it 
sounds.  Mutt, Pine/Alpine, and KMail can all do this, and they all 
provide code examples for ways it could be done.)

I'd like to keep my inbox in the system spool where other email programs 
expect it, so I can freely go back and forth between various email 
programs while I'm in the process of getting myself moved over to an 
Emacs way of thinking.  I realize it is possible to setup Alpine and 
Mutt to work the other way -- to read their inbox from the home 
directory, in effect, making them work with Emacs way of doing things.  
I'd rather do the opposite:

The Lisp program movemail, bundled with Emacs, seems to have the ability 
to do mailbox locking so that RMAIL can safely move mailboxes into the 
home directory.  (I think VM uses it also.)

Would it be possible to directly call movemail from the .emacs file and 
make it do the following?  This is what I want to do:

- When Emacs launches, I want my .emacs file to run movemail, and put my 
system spool inbox into my home directory in a place that VM expects it.

- It can be safely assumed that so long as Emacs is running, I'm not 
going to run Alpine or Mutt or anything similar -- if Emacs is 
available, I'll use Emacs for mail, and it won't matter that my inbox is 
in my home directory at that time.

- When Emacs shuts down, I'd like to use its shutdown hooks to append 
any newly received messages in the system spool to the inbox in my home 
directory, and then use movemail to put the whole home directory inbox 
back into /var/spool/mail before Emacs quits itself.

Is any of this impossible or misguided?  I'd just strongly prefer my 
mailbox in the system spool area where most UNIX tools expect it to be.

-- 
He that would make his own liberty secure must guard even his enemy from
oppression; for if he violates this duty, he establishes a precedent
that will reach to himself.
                                        --Thomas Paine


reply via email to

[Prev in Thread] Current Thread [Next in Thread]