9front - general discussion about 9front
 help / color / mirror / Atom feed
From: ori@eigenstate.org
To: theinicke@bss-wf.de, 9front@9front.org
Subject: Re: [9front] upas/fs plumb modify for self-made flag changes
Date: Tue, 4 Feb 2020 22:11:42 -0800	[thread overview]
Message-ID: <5A2F5259197B1545E61A0EA7602202E3@eigenstate.org> (raw)
In-Reply-To: <BDF9C8EAB8D60070E79EFC16DA02F97F@yourdomain.dom>

> Thanks for your reply and sorry for the noise related to not inlining the patch.
> 
>> This is probably the right thing to do.
> 
> Glad to hear this.
> 
>> Acme Mail both modifies messages and watches for modification
>> notifications. Have you made sure sure that it does the right
>> thing in all cases?
> 
> I have tested it; even with multiple acme Mail instances running at the same time, it did the right thing for all the cases I have tried.
> Having this in my tree for more than a week and using acme Mail as my daily driver I am fairly confident, that this does not introduce any regression.
> 

Sorry for the slow response -- I'm looking again,
and trying to decide if there's a possible bug
here, which existed before your change:

		if(mb->modflags != nil)
			mb->modflags(mb, m, f);
		m->flags = f;
		m->cstate |= Cidxstale;

In imap4modflags, we have:

		imap4cmd(imap, "uid store %lud flags (%s)", (ulong)m->imapuid, buf);
		imap4resp0(imap, mb, m);

imap4resp0 may modfiy the flags to match what's on the
server. I think we want the server to have the final word
after we set the flags, so we want to set them first:

		m->flags = f;
		m->cstate |= Cidxstale;
		m->cstate |= Cmod;
		if(mb->modflags != nil)
			mb->modflags(mb, m, f);

Does this sound right?



  reply	other threads:[~2020-02-05  6:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-01 12:24 theinicke
2020-02-02 22:18 ` [9front] " ori
2020-02-03  9:12   ` theinicke
2020-02-05  6:11     ` ori [this message]
2020-02-05 21:49       ` theinicke
2020-02-05 22:11         ` ori
2020-02-05 22:16       ` Lyndon Nerenberg
2020-02-06  0:41         ` Stanley Lieber
2020-02-06  0:41         ` Stanley Lieber

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

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

  git send-email \
    --in-reply-to=5A2F5259197B1545E61A0EA7602202E3@eigenstate.org \
    --to=ori@eigenstate.org \
    --cc=9front@9front.org \
    --cc=theinicke@bss-wf.de \
    /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.
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 NNTP newsgroup(s).