unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* using movemail directly in .emacs
@ 2014-05-04  3:10 Hikaru Ichijyo
  2014-05-04  6:13 ` W. Greenhouse
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Hikaru Ichijyo @ 2014-05-04  3:10 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <mailman.649.1399235566.1147.help-gnu-emacs@gnu.org>]
[parent not found: <mailman.2077.1401047678.1147.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2014-06-05 22:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-04  3:10 using movemail directly in .emacs Hikaru Ichijyo
2014-05-04  6:13 ` W. Greenhouse
     [not found] ` <mailman.634.1399184068.1147.help-gnu-emacs@gnu.org>
2014-05-04 17:56   ` Hikaru Ichijyo
2014-05-04 20:32     ` Robert Thorpe
2014-05-24 12:39 ` lee
2014-05-25 19:54   ` Robert Thorpe
2014-05-26 11:40     ` lee
     [not found] <mailman.649.1399235566.1147.help-gnu-emacs@gnu.org>
2014-05-05  0:05 ` Hikaru Ichijyo
     [not found] <mailman.2077.1401047678.1147.help-gnu-emacs@gnu.org>
2014-05-26 22:41 ` Hikaru Ichijyo
2014-05-27  1:58   ` lee
2014-05-27 21:23     ` Robert Thorpe
2014-05-29  1:35       ` lee
2014-05-29 21:59         ` Robert Thorpe
2014-06-05 19:03           ` lee
2014-06-05 22:21             ` Robert Thorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).