On 11:44 21 Mar 2002, Steve Talley <[EMAIL PROTECTED]> wrote: | David T-G wrote: | > ...and then Steve Talley said... | > > If mutt has the ability to allow the user to edit a message, and | > > then automatically save it to the mail folder, and delete the | > > orignal, why shouldn't it be able to do the same with an arbitrary | > > shell script? | > | > It can -- just as you've defined it within your macro :-)
Hmm. I was thinging along the same lines as Steve, but then: if my index is ordered, I'd expect the the edited message to show up in the right spot in the index anyway regardless of being "a fresh message". So Steve, do you order your index on some message feature (eg Date:) or just physical mail folder order? | > Seriously, though, what's wrong with the macro? Once it's defined | > it's taken care of and you never have to look back at it. Is the | > idea of using a macro somehow distasteful, or something else? I | > really don't get it, so sell me on the idea. | | The problem I see is that it can get a bit ugly. Yep. | Suppose my default $editor is something ridiculously long, like: | vi -o2 -e -b '+/^subject' '+s/^subject/SuBJeCt/i' '+/^$/' | | Then I have to reset it in every macro: | | macro index F :set editor="sleep 1; mailformat -m -t -s -c -q -i"<return>e:set |editor="vi -o2 -e -b +/^subject +s/^subject/SuBJeCt/i +/^$/"<return> | macro index G :set editor="sleep 1; grep -v blah"<return>e:set editor="vi -o2 -e |-b +/^subject +s/^subject/SuBJeCt/i +/^$/"<return> Stuff in in an envvar. Like $EDITOR, which it probably is anyway. Then: macro index F :set editor="sleep 1; mailformat -m -t -s -c -q -i"<return>e:set editor="$EDITOR"<return> | And yes, I could probably change it to: | | macro index F :set editor="sleep 1; mailformat -m -t -s -c -q |-i"<return>e:source ~/.mutt/reseteditor<return> | macro index G :set editor="sleep 1; grep -v blah"<return>e:source |~/.mutt/reseteditor<return> | ... | | but that's just as ugly. Maybe a fresh mutt command: :pushvar editor='.......'<return>;e:popvar editor Just ideas, -- Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/ Nothing is impossible for the man who doesn't have to do it.