From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hikaru Ichijyo Newsgroups: gmane.emacs.help Subject: Re: using movemail directly in .emacs Date: 05 May 2014 00:05:17 GMT Organization: UN Spacy Message-ID: <5366d5bd$0$64352$c3e8da3$aae71a0a@news.astraweb.com> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1399414092 457 80.91.229.3 (6 May 2014 22:08:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 May 2014 22:08:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 07 00:08:07 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WhnT0-0004TT-Of for geh-help-gnu-emacs@m.gmane.org; Wed, 07 May 2014 00:04:02 +0200 Original-Received: from localhost ([::1]:54980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wh6UC-0002k8-7e for geh-help-gnu-emacs@m.gmane.org; Sun, 04 May 2014 20:10:24 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!news.astraweb.com!border6.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.14.2 (x86_64)) Original-Lines: 30 Original-NNTP-Posting-Host: 90bd30b8.news.astraweb.com Original-X-Trace: DXC=i1Coa7?FMjITE2gdJ]P=SGL?0kYOcDh@J]8Ia1o0S\cNnVPLie1YL`DFeK=h[\Ra]Do=EIjJ5b; WC3K:9^o4aV8AC3^ZD3SSZ_@=bh:m List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97567 Archived-At: Robert Thorpe 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