unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jameson Graef Rollins <jrollins@finestructure.net>
To: Mark Walters <markwalters1009@gmail.com>,
	notmuch@notmuchmail.org, amdragon@MIT.EDU
Subject: Re: [PATCH] emacs: show: lazy part bugfix
Date: Sun, 01 Sep 2013 09:18:35 -0700	[thread overview]
Message-ID: <871u58a52c.fsf@servo.finestructure.net> (raw)
In-Reply-To: <1377246875-7784-1-git-send-email-markwalters1009@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]

On Fri, Aug 23 2013, Mark Walters <markwalters1009@gmail.com> wrote:
> The lazy part handling had a subtle bug. Notmuch stores the part
> information as a text property with the displayed part so attachment
> handling (saving viewing etc work).
>
> Now, some mime parts have subparts and to avoid overwriting the
> sub-part data notmuch checks and if part data is already recorded it
> does not overwrite it.
>
> Now with lazy part handling this could fail: there is already part
> data stored. In the common case it works as the part type information
> was stored when the lazy-part button was inserted. However, this fails
> if the lazy part has sub-parts: notmuch had no idea these existed
> until the lazy part insertion.
>
> We fix this by removing any existing part-information from the
> relevant region before doing the lazy insertion.
> ---
> This was shown up by Istvan's patch in id:m3r4dtgz9k.fsf@zsu.kismala.com and 
> the bug found by Jamie in id:87fvu4fl25.fsf@servo.finestructure.net
>
> I think this is essentially the right patch: I am not certain about
> the +1 in the removing the property. It seems to be needed but maybe
> something with front/back sticky would be better.
>
> Also this definitely needs more testing before going into master: this
> code is definitely fragile.

Hey, Mark.  I have just tested this patch and it seems to be fixing the
issue I was seeing.  With Istvan's patch the once hidden parts are now
exposed with buttons, and with this patch the buttons now work as
expected.

I can't really speak to the correctness of this patch, but it does seem
to be working, and doesn't seem to have any adverse side effects that I
can see.

As a reminder, this patch and Istvan's do fix an actual bug in notmuch,
so both should be pushed unless anyone see's anything wrong with either
of them.

Thanks so much for the fixes, guys.

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2013-09-01 16:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23  8:34 [PATCH] emacs: show: lazy part bugfix Mark Walters
2013-09-01 16:18 ` Jameson Graef Rollins [this message]
2013-09-04  7:30 ` [PATCH v2] " Mark Walters
2013-09-04 14:56   ` Austin Clements
2013-09-04 15:50     ` Jameson Graef Rollins
2013-09-04 16:16       ` Austin Clements
2013-09-05 18:46         ` Mark Walters
2013-09-06 23:28           ` [PATCH] emacs: show: lazy part handling bugfix Mark Walters
2013-09-09 13:56             ` Austin Clements
2013-09-10 11:14             ` David Bremner

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=871u58a52c.fsf@servo.finestructure.net \
    --to=jrollins@finestructure.net \
    --cc=amdragon@MIT.EDU \
    --cc=markwalters1009@gmail.com \
    --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).