Re: Threading with IMAP folders
- To: mutt-users@xxxxxxxx
- Subject: Re: Threading with IMAP folders
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Sat, 25 Oct 2008 09:38:02 -0500
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=rV9ubrk0Jixm55z5KpleUUJQNhs=; b=O616 UlhAAWdhsx29exc7KgvZzxzhZ63c334dE6ewUBkJ/h+kFIQdbYZ72FbPIIuceKur 8tpqrUlCFM29VZ5axWJrsJXbFYI6BXrCWxVnAB+Oy9jGe3A+dzuS8DF63yBPPhvv caT/KIN9lKD4P7cljjICiPJEMWJFDchiiGmiKmg=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=YN3thb99Z82gCAbSHiIZnf/viSKTImXqSlzM4daOReF/ESq5zk0aiKCXnEem3kuNTcmf3DBel1fx9qDHVvjelRWC+PI3cqgE7Qg9zB+xlvf0lZZUo+YH1XVyS83XgnfAn7DAlrBlCNWIhpQNqRVvIqNCwWTunoz59q8lb+T712I=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <20081025141329.GA7139@xxxxxxxxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <20081024232513.GA28930@xxxxxxxxxxxxx> <20081025140606.GH72745@xxxxxxxxxxxxx> <20081025141329.GA7139@xxxxxxxxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.18 (2008-10-20)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday, October 25 at 03:13 PM, quoth Matt Harrison:
>> What do your folder hooks look like? It sounds like they're just
>> not matching the folder name/path.
>
>That is almost exactly what I was using, here is my folder-hooks:
>
>folder-hook . set sort=threads
>folder-hook . set sort_aux=date-sent
>folder-hook "!" set sort=date-received
>folder-hook "sent-mail" set sort=reverse-date
>
>However this wasn't working for IMAP.
No? Hmmmm...
Ahhhh, I have a guess as to what's happening. I bet it's that third
line. It seems possible to me that the folder-hook isn't treating that
"!" as a shortcut for $spoolfile, but is instead treating it as a
negation of whatever regex follows it. Note that the manual describes
folder-hook like so:
folder-hook [!]regexp command
When mutt enters a folder which matches regexp (or, when
regexp is preceded by an exclamation mark, does NOT match
regexp), the given command is executed.
So what could be happening is that mutt thinks the regex for that
third folder hook is either an empty string OR is the string "set". In
either case, it will match on all folders that do NOT match that
regex, and in either case, that will essentially match all your
folders. An empty regex shouldn't match anything, so the inverse would
be to match everything. And unless you use the word "set" in your
mailbox names, the same would be true for the other way of
interpreting it. In any case, if $spoolfile is the same as $folder,
then you probably want to use an = instead of a !, and that might just
solve your problem.
My bet would be that "!" was intended as a shortcut to be used when
changing folders (e.g. "c!"), and its implications as far as hooks go
weren't considered.
>This also doesn't apply the thread sorting when using these local dot
>seperated folders, so I tried something else. Moving my layout to something
>like:
>
>~/Maildir
>~/Maildir/lists/Mutt-Users
>
>Lets me use those folder-hooks for thread sorting without problems.
REALLY! Now that is weird. That seems like there's a bug lurking in
there somewhere.
But here's my advice: rather than modifying your mail layout to debug
this, modify your folder-hooks. Play around with them until you have
patterns that match what you want them to match and don't match what
you don't want them to match. Start with a minimum set, and go from
there.
And also, just for your own sanity, you might want to consider
adopting the habit of quoting your hook arguments. Personally, I find
folder-hook 'foo' 'set this=that'
...to be much more resistant to problems than
folder-hook foo set this=that
... because it's far too easy to accidentally put something in your
regex ("foo") that affects how the rest of the line is interpreted.
~Kyle
- --
Every gun that is made, every warship launched, every rocket fired
signifies, in the final sense, a theft from those who hunger and are
not fed, those who are cold and are not clothed.
-- Dwight D. Eisenhower
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iEYEARECAAYFAkkDL0oACgkQBkIOoMqOI1470ACfXWNn7nF1IqFGNLamg5yDecv7
C/IAoMdctk1ABlpmE709QkIumm8s17Sm
=Yt2d
-----END PGP SIGNATURE-----