Paul, that's just brilliant, thank you :) folder-hooks were always somehow overlooked by me but now I see the potential :)
Thanks once again! -- Alex On 12/6/18, Paul Hoffman <nkui...@nkuitse.com> wrote: > On Thu, Dec 06, 2018 at 05:16:09PM +0200, Alex Sa wrote: >> Is it possible to set up a macro that would behave differently >> dependent on the current folder? > > Yes, using a folder hook to bind a key (or key sequence) to different > actions based on the folder. For example: > > # In most folders, pressing L limits to new messages > folder-hook . "macro index L '<limit>~N<Enter>'" > > # In [Gmail]/All Mail, pressing L limits to unread messages > folder-hook '^\[Gmail\]\/All Mail$' "macro index L '<limit>~U<Enter>'" > > Or, if you just want to limit what's shown when you enter a folder, this > might work: > > # By default, show all messages > folder-hook . "<limit>.<Enter>" > > # In [Gmail]/All Mail, show only unread messages > folder-hook '^\[Gmail\]\/All Mail$' "<limit>~U<Enter>" > > Does that help? I may have misunderstood what you're trying to do. > > Paul. > > -- > Paul Hoffman <nkui...@nkuitse.com> > -- -- Alex