Michael C. Toren on 22 Jan 2005 16:57:00 -0000


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

Re: [PLUG] mutt close-hook advice


On Sat, Jan 22, 2005 at 07:45:56AM -0500, Jeff Abrahamson wrote:
> > > > mbox-hook +ML.plug "+lists/ML.plug-`date +%Y-%m`"

[..]

> I think you have missed something.  From the mutt manual:

[..]

> So you should get a move every time you leave the ML.plug mbox

The problem I believe is not that the hook isn't being called each time,
but rather that when it's called it has the wrong arguments.  The hook
line in the ~/.muttrc file evaluates the output of the `date` command
at startup rather than each time the hook is executed.  I had a similar
problem when I started adding the X-Moon: header.  I first tried this:

	my_hdr X-Moon: `pom`

but noticed that the value of the header wasn't changing over time.  I
played around for a while, and ended up with the following, similar to
the solution Sean mentioned:

	send-hook . 'my_hdr X-Moon: `pom`'

As good as the mutt configuration syntax is, it could be improved.

-mct

-- 
perl -e'$u="\4\5\6";sub H{8*($_[1]%79)+($_[0]%8)}sub G{vec$u,H(@_),1}sub S{vec
($n,H(@_),1)=$_[2]}$_=q^{P`clear`;for$iX){PG($iY)?"O":" "forX8);P"\n"}for$iX){
forX8){$c=scalar grep{G@$_}[$i-1Y-1Z-1YZ-1Y+1ZY-1ZY+1Z+1Y-1Z+1YZ+1Y+1];S$iY,G(
$iY)?$c=~/[23]/?1:0:$c==3?1:0}}$u=$n;select$M,$C,$T,.2;redo}^;s/Z/],[\$i/g;s/Y
/,\$_/xg;s/X/(0..7/g;s/P/print+/g;eval' #     Michael C. Toren <mct@toren.net>
___________________________________________________________________________
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