hi all, 
        attached is a patch which adds boolean option $subj, which (when set)
causes old (unread) messages to stay in new/ so that they can be properly
treated as new messages without parsing the content of each file in cur/
subdirecory, ...

        feel free to apply a/o include the patch somewhere....

thanx,
martin

P.S. sorry for unnecessary crossposting but www.mutt.org doesn't precisely say
where and how to contribute the new code :-(


-- 
2CC0 4AF6 92DA 5CBF 5F09  7BCB 6202 7024 6E06 0223
--- init.h.orig Mon Oct 22 23:42:41 2001
+++ init.h      Mon Oct 22 23:47:07 2001
@@ -907,6 +907,19 @@
   ** order to make Mutt treat all unread messages as new only, you can
   ** unset this variable.
   */
+  { "maildir_keep_old",                DT_BOOL, R_BOTH, OPTMAILDIRKEEPOLD, 0 },
+  /*
+  ** .pp
+  ** Controls whether or not Mutt moves the old (unread) messages to cur/
+  ** maildir subfolder.  By default, Mutt will
+  ** move old messages to cur/ subdirectory, though many maildir-aware 
+  ** programs are then unable to treat them as new without parsing the content
+  ** of cur/ subdirectory.
+  ** If you set this option to true, the old message will be kept in new/ 
+  ** subdirectory and marked with O flag (See mark_old option) until they are
+  ** really read. This
+  ** option is valid only for maildir-style mailboxes.
+  */
   { "markers",         DT_BOOL, R_PAGER, OPTMARKERS, 1 },
   /*
   ** .pp
--- mh.c.orig   Mon Oct  1 11:57:41 2001
+++ mh.c        Mon Oct 22 23:30:24 2001
@@ -1112,8 +1112,8 @@
     maildir_flags (suffix, sizeof (suffix), h);
     
     snprintf (partpath, sizeof (partpath), "%s/%s%s",
-             (h->read || h->old) ? "cur" : "new",
-             newpath, suffix);
+             (h->read || (h->old && !option (OPTMAILDIRKEEPOLD)) ? 
+              "cur" : "new", newpath, suffix);
     snprintf (fullpath, sizeof (fullpath), "%s/%s", ctx->path, partpath);
     snprintf (oldpath, sizeof (oldpath), "%s/%s", ctx->path, h->path);
     
--- mutt.h.orig Mon Oct 22 23:42:41 2001
+++ mutt.h      Mon Oct 22 23:30:24 2001
@@ -358,6 +358,7 @@
   OPTMAILDIRTRASH,
   OPTMARKERS,
   OPTMARKOLD,
+  OPTMAILDIRKEEPOLD,
   OPTMENUSCROLL,       /* scroll menu instead of implicit next-page */
   OPTMETAKEY,          /* interpret ALT-x as ESC-x */
   OPTMETOO,

Reply via email to