unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: "Andreas Kusalananda Kähäri" <andreas.kahari@abc.se>
To: David Bremner <bremner@unb.ca>,
	"notmuch@notmuchmail.org" <notmuch@notmuchmail.org>
Subject: Re: Tagging messages sometimes causes them to be marked as old
Date: Fri, 1 Sep 2023 14:56:52 +0200	[thread overview]
Message-ID: <ZPHflNDJtQshNBlH@harpo.local> (raw)
In-Reply-To: <ZPHcF5gh/muL58Y8@harpo.local>

On Fri, Sep 01, 2023 at 02:42:01PM +0200, Kusalananda Kähäri wrote:
> On Fri, Sep 01, 2023 at 12:16:58PM +0000, David Bremner wrote:
> > Andreas Kusalananda Kähäri <andreas.kahari@abc.se> writes:
> > 
> > > What's so special about the new tags that I'm adding that makes the
> > > unread messages move from "new" to "cur"?  I can *see* them getting
> > > moved when I run the tagging.  Why is notmuch moving them?  The "unread"
> > > tag never changes.
> > >
> > > 	$ ls "$notmuch_dbdir"/abc/INBOX/new
> > > 	1693487404_0.62384.harpo.local,U=352958,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,
> > > 	1693488604_2.29495.harpo.local,U=352962,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,
> > > 	1693488604_4.29495.harpo.local,U=352964,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,
> > > 	1693488604_5.29495.harpo.local,U=352965,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,
> > 
> > Apparently this is intended behaviour (from test/T340-maildir-sync.sh)
> > 
> >     test_begin_subtest "Message in new with maildir info is moved to cur on any tag change"
> >     add_message [filename]='message-with-info-to-be-moved-to-cur:2,' [dir]=new
> >     notmuch tag +anytag id:$gen_msg_id
> >     output=$(cd "$MAIL_DIR"; ls */message-with-info-to-be-moved-to-cur*)
> >     test_expect_equal "$output" "cur/message-with-info-to-be-moved-to-cur:2,"
> > 
> > That behaviour is about 10 years old. It seems to be based on the idea
> > that files in new/ should not have maildir info. According to the
> > standard [1] (such as it is)
> > 
> >         When you move a file from new to cur, you have to change its
> >         name from uniq to uniq:info. Make sure to preserve the uniq
> >         string, so that separate messages can't bump into each other.
> > 
> > So in a sense notmuch is "fixing" the maildir. Whether that intervention
> > is needed notmuch to work correctly, I'm not sure.
> > 
> > I'd be a bit nervous about changing such an established behaviour of
> > notmuch, but I guess can't completely rule it out without knowing what
> > would break.
> > 
> > Maybe you can convince whatever puts files in new/ not to add :2, ?
> > 
> > [1]: http://cr.yp.to/proto/maildir.html
> 
> Thanks for the explanation.  It's offlineimap that puts the files in
> "new" and it seems to add them with the ":2," suffix.
> 
> I don't think I can change this behaviour in offlineimap.
> 

Sorry, but I just found this: 

	https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=789625;msg=2

It appear someone else has already had this problem and that one might
possibly want to fix it in offlineimap.  Mutt is not at fault here, but
I still think notmuch is a bit pedantic when it moves the files.

I will contact the package maintainer of offlineimap on my system
(OpenBSD) and see if this is something that can be fixed there with the
simple patch includud in the abovementioned bug report.

Thanks!


-- 
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden

.\r

      reply	other threads:[~2023-09-01 12:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31  9:17 Tagging messages sometimes causes them to be marked as old Andreas Kusalananda Kähäri
2023-08-31 13:24 ` David Bremner
2023-08-31 14:08   ` Andreas Kusalananda Kähäri
2023-09-01  0:39     ` David Bremner
2023-09-01 12:16     ` David Bremner
2023-09-01 12:41       ` Andreas Kusalananda Kähäri
2023-09-01 12:56         ` Andreas Kusalananda Kähäri [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZPHflNDJtQshNBlH@harpo.local \
    --to=andreas.kahari@abc.se \
    --cc=bremner@unb.ca \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).