Re: How to let mutt always mark mbox as new if it contains new
On 11May2009 08:25, Derek Martin <invalid@xxxxxxxxxxxxxx> wrote:
| On Mon, May 11, 2009 at 09:03:39AM -0400, Patrick Shanahan wrote:
| > The individual messages are still "flagged" as net but the mbox
| > container files is not. You have lost nothing except a notice that
| > the "container" is not "new".
|
| This is exactly what the OP was complaining about, and I completely
| agree with him. It's highly inconvenient, if you have a lot of mbox
| folders with unread e-mail in them, to go back and figure out which
| ones you care about. NO OTHER MAILER HAS THIS PROBLEM, as far as I
| know... Mutt behaves as the OP (and I, and lots of other people)
| expect if maildir is used, but there are valid reasons not to use
| maildir, and mutt's behavior should be consistent regardless of
| selected mailbox format.
|
| This probably should not be very difficult to fix, at least part way;
| you could either use the header cache, or add a flag to the structure
| representing a visited mbox mailbox, to mark a folder containing
| unread mail as needing to be visited.
Best thing would be for mutt, on exiting the folder, to update the mtime to
be greater than the atime after the close if there are "N" state messages.
A quick call to utimes() is probably enough.
| That doesn't solve it for mailboxes which Mutt hasn't visited yet
| (i.e. after starting up if you're using the flag, or when there is no
| header cache if you're using that).
But mutt already gets that half right with the mtime/atime check.
| It strikes me that you'd need to
| make Mutt threaded in order to parse unvisited mailboxes in the
| background; but I don't know how other mailers handle checking for
| unread mail on start-up. I just know that every mailer I've ever used
| other than Mutt gets it right.
No need. For unvisited mboxen the behaviour is already ok. It is that
mutt's sync of the folder on exit sets mtime==atime that causes the
trouble. For some people that's what they want ("I've visited it so
don't bug me until something _extra_ arrives") but for the OP and
yourself mutt should have a mode to update the atime post close if there
are outstanding messages in "N" state.
Comments?
--
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/
Do unto others ... then split. - Mary Anne Stasium