Jeff Abrahamson on 22 May 2006 14:42:44 -0000


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

[PLUG] mutt and m4


<soapbox flavor="recent-revelation">
  I've long been annoyed that mutt doesn't have a richer hook language
  (like something that's Turing complete, for example).  In addition,
  the complexity that it does allow is hard to access, as the syntactic
  complexity increases at least as fast as the functional complexity of
  the task.

  Maybe some day we'll get a more interesting configuration language

      http://www.nongnu.org/mutt-guile/

  but in the mean time, I realized that I can get around a lot of the
  complexity by using m4 to write my config files.  The issue is that I
  want to be able to say things like, "plug is a mailing list, and mail
  to it should have the following six things set and mail from it should
  have the following four behaviors."  But that gets to be a bother for
  list after list, person after person.  I set things like signatures,
  my from address, pgp state, fcc and save folders, etc.

  With m4, it turns out to be very straight-forward to define a
  complicated looking macro (complicated only because of what mutt
  demands, not m4), and then I can say things like

      M_List(`.*phillylinux.org', `PLUG')

  and the M_List macros handles all the mutt statements I want
  associated with the list.  This has made my configuration files much
  easier to read and understand, although I do have to remember to run
  make after editing them.
</soapbox>

-- 
 Jeff

 Jeff Abrahamson  <http://jeff.purple.com/>          +1 215/837-2287
 GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B

Attachment: signature.asc
Description: Digital signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug