Mark as read and archive: macro works only in index

2017-11-10 Thread Pétùr

Hi,

I am using this macro to mark an email as read and archive it. The
mark as read is important because sometimes I don't open the email
before archiving.

macro index,pager a ":set confirmappend=no
delete=yes\nN=Archives\n:set
confirmappend=yes delete=yes\n"

The macro works but only in the index. It does not work in pager
(shortcut "a" not recognize).

How can I have this macro work also in pager?

Pétùr


Re: Need some help with send-hook and folder-hook, their order in muttrc

2017-11-10 Thread Chris Green
On Tue, Nov 07, 2017 at 09:32:09PM +, David Woodfall wrote:
> > On Tue, Nov 07, 2017 at 08:49:06AM -0800, Ian Zimmerman wrote:
> > > On 2017-11-07 10:17, Chris Green wrote:
> > > 
> > > > I'd like to make it so that when I'm in a particular folder (which
> > > > will probably be called 'cl') my From: address will also be
> > > > c...@isbd.net.
> > > >
> > > > So I need to add something like:-
> > > >
> > > > folder-hook cl 'my_hdr From: Chris Green '
> > > >
> > > > However I'm a little unclear what else I need,
> > > 
> > > If you use my_hdr in folder hooks at all, you probably need something
> > > like this line, from my own .muttrc:
> > > 
> > > folder-hook . "unmy_hdr to from reply-to bcc newsgroups x-loosely-listed"
> > > 
> > > >From my experience, you'll never be able to keep track of them
> > > individually and add the return-to-default hook for each header 
> > > separately.
> > > 
> > OK, it seems to get rather messy.
> > 
> > I think it may be easier to have a macro which
> > 
> >Changes my_hdr
> >Sends the message
> >Changes my_hdr back
> > 
> > -- 
> > Chris Green
> 
> What I do is have a hooks file which runs other hooks files depending
> on the folder:
> 
Ah, now that's clever, it might well do exactly what I need in a way
that I can understand, thanks.


> My .mutt/hooks:
> 
> folder-hook 'imaps://domain/.*' source ~/.mutt/default
> folder-hook =lists/* source ~/.mutt/listhook
> 
> My .mutt/default
> 
> my_hdr From: David Woodfall 
> set sort=threads
> 
> My .mutt/listhook:
> 
> set collapse-all
> set sort=threads
> my_hdr From: David Woodfall 
> 
Thanks for that, it looks very close to the sort of thing I want to do.

-- 
Chris Green