* Alexander Skwar ([EMAIL PROTECTED]) [010829 15:18]:
> So sprach ?Alexander 'Digital Projects' Skwar? am 2001-08-25 um 11:30:50 +0200 :
> > I'd like to assign a macro to a key, which allows me to easily store all
> > the messages of a folder in another folder.
> > 
> > I normally archive all the messages I get.  To do so for this list, I'd
> > tag all the messages in the current folder (which only contains messages
> > from this list), clear the old flag of all the messages and save all the
> > messages in "=Old/ML-MUTT.bz2".  The current folder is named ML-MUTT.
> > 
> > What I can't seem to figure out, is how I can get the name of the
> > current folder.  If I had this, I'd write in my muttrc:
> > 
> > macro   index   \Co
> > 
><tag-pattern>.<enter><tag-prefix><clear-flag>o<tag-prefix><save-message>=Old/NAME_OF_CURRENT_FOLDER.bz2<enter>
> > 
> > How can I get the name of the current folder so that I can assign it in
> > a macro?
> 
> Is this really impossible to do?

You could hack it by setting the value of record or mbox based on
folder-hook and then referencing that value in your macro. Be careful
that you don't need the value before you clobber it with this hack,
though (i.e. use mbox if you're not using move, or record if you're not
using copy).

It would basically look like this:

# THIS IS A DIRTY, DIRTY HACK. PROCEED WITH CAUTION
set copy=no
folder-hook mutt-user 'set record==Old/mutt-user'
macro   index   \Co 
<tag-pattern>.<enter><tag-prefix><clear-flag>o<tag-prefix><save-message><.bz2<enter>

I also don't know about how the '<' might need to be quoted in the macro
statement. This is totally untested, and just off the top of my head
(and I'm no expert). As always, YMMV.


-- 
Vineet                                   http://www.anti-dmca.org
Unauthorized use of this .sig may constitute violation of US law.
echo Qba\'g gernq ba zr\!             |tr 'a-zA-Z' 'n-za-mN-ZA-M'

PGP signature

Reply via email to