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

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

Re: using movemail directly in .emacs


From: Hikaru Ichijyo
Subject: Re: using movemail directly in .emacs
Date: 05 May 2014 00:05:17 GMT
User-agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.14.2 (x86_64))

Robert Thorpe <rt@robertthorpeconsulting.com> wrote:

> I think it's possible to do what you want.  It'll be quite a fragile 
> setup though.
> 
> Movemail isn't a Lisp program, it's a C program.  There are two 
> versions of it, the simple one the ships with Emacs and a more 
> complete one that's part of the GNU Mailutils package.
> 
> You run it like this:
> movemail -p mbox://var/spool/mail/smith ~/to.mbox
> The "-p" switch preserves the contents of the the mailbox you're taking
> the mail from.  You can run it from .emacs using something like
> "shell-command".  Check out the Mailutils manual at gnu.org.

What I was really wondering (as an Emacs newbie) was what would be the 
most "correct" way to run it from within the .emacs file, using Emacs' 
startup and shutdown hooks?  Since I'm just doing local file access and 
no IMAP or anything like that, I'd like to run the shipped version, 
which is at /usr/libexec/emacs/24.3/x86_64-pc-linux-gnu/movemail on my 
system.  Is there some special syntax that Emacs uses for running 
programs that are inside its tree like this, or do you use the whole 
path?  What does it look like in the .emacs to run something like this 
on startup and shutdown?

-- 
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]