mail filter in python?

Christopher Browne cbbrowne at news.hex.net
Wed Feb 9 20:19:31 EST 2000


Centuries ago, Nostradamus foresaw a time when Jari Aalto+mail.emacs would say:
>* Mon 2000-02-07 Cameron Laird <claird at starbase.neosoft.com> mail.misc
>| ,
>| Skip Montanaro  <skip at mojam.com> wrote:
>| >
>| >    Cameron> In any case, I agree with Mr. Wouters: use procmail, and just
>| >    Cameron> invoke your Python work as an external process.
>| >
>| >Worth noting that the procmail tips page at 
>| >
>| >    http://www.procmail.org/jari/pm-tips.html
>| >
>| >mentions Lua as a possible replacement for the procmail language (see the
>| >end of question 3.5).  That item was presumably added about two years ago,
>| >so I tend to think it's either very hard to do or didn't generate enough
>| >steam in the procmail community.  If such a thing was possible with Lua, it
>| >would likely be possible with Python as well.  Anyone for "pluggable
>| >brains"?
>
>Correct. I don't know how procmail integrates to the current
>language, but I have feeling that it it pretty tight bound to the
>current implementation. 

I'd go along with the "write a .procmailrc generator" idea; that has
the lowest impact, and other merits.

>There were a discussion in the Emacs list about replacing the
>obscure and 'distant-to-anynone' language Emacs-Lisp with some other
>pluggable language like Perl (An there is/was already a prototype
>about this), but the general reaction was that Emasc was too bound to
>lisp already.
>
>      "Perlmacs -- Perl as Emacs extension language"
>        http://www.perl.com/CPAN/authors/id/JTOBEY/
>
>XEmacs team may get serious with pluggable language modules at some
>time, since the core is more modular than in Emacs.

The intent with GNU Emacs is to replace Elisp with Scheme
(specifically Guile).

There has been talk about having XEmacs move to using Common Lisp; see
<http://www.xemacs.org/Architecting-XEmacs/lisp-engine.html>

<http://www-pu.informatik.uni-tuebingen.de/users/sperber/xemacs/\
next-generation/language.html> also discusses this.

The conclusions are not strongly conclusive on the XEmacs side of
things...

I don't think you're likely to get agreement on a move to Perl, or to
Python, for that matter, as those that wrote Emacs happen to *like*
Lisp, and, despite there being some strong parallels between Perl and
Common Lisp, the CL community appears not to be terribly enthralled
with Perl.  

I expect that there are not quite so strong opinions against Python,
but I doubt it would get a clear "yes."

>| I'm sending a copy of this to Jari Aalto, who might be
>| able to help.  My purely personal speculation is, the
>| latter:  "it ... didn't generate enough steam in the
>| procmail community."  I'll grossly generalize that the
>| mailing-agent communities tend to regard C as the
>| natural language for all implementations, and see little
>| advantage to such distractions as higher-level scripting.
>| Lua is very simple to interface, unless some catastrophic
>| surprise turned up specifically with the procmail work.
>
>I checked the lua and seemed quite interesting, if there is
>a way to hook it into procmail I'd be interested too. 
>Philip? [the current procmail maintainer]
>
>| Yes, of course Python is also quite simple to interface.

Note that Cooledit <http://cooledit.org/> integrates Python as its
scripting tool; that may make it more suitable as an option for those
that would like to do "powerful text editing using Python."
-- 
Necessity  is the  mother  of  invention. Insanity  is  the mother  of
straitjackets.
cbbrowne at hex.net- <http://www.ntlug.org/~cbbrowne/scripting.html>



More information about the Python-list mailing list