From: Austin Clements <amdragon@MIT.EDU>
To: Mark Walters <markwalters1009@gmail.com>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH v4 0/5] Use invisibility to toggle display of all parts including multipart
Date: Tue, 18 Dec 2012 12:10:21 -0500 [thread overview]
Message-ID: <20121218171021.GL6187@mit.edu> (raw)
In-Reply-To: <87ip7zu4es.fsf@qmul.ac.uk>
Quoth Mark Walters on Dec 18 at 8:54 am:
> On Mon, 17 Dec 2012, Mark Walters <markwalters1009@gmail.com> wrote:
> > This is version 4 of this series (previous version at
> > id:1355559338-14313-1-git-send-email-markwalters1009@gmail.com).
> >
> > The only change should be a bugfix which, for reasons I don't
> > understand, only causes a problem on emacs 24. The problem is that the
> > part invisibility code looks for a part button at the start of the
> > region. This gets confused if there is a part with no part button
> > (this is the case for the first part if it is text/plain) and the part
> > starts with a button (as can happen if the message starts with the
> > reply as in the first test in test/emacs-show).
> >
> > This checks that the button is a part button before creating the part
> > overlay.
>
> I don't think the above is very clear so I will try to explain it more
> fully.
>
> The invisibility overlay for a part needs to be `linked' to the part
> header button so that the part header button can toggle the overlay
> visibility. The overlay is created and linked to this button after the
> whole part has been inserted (including any notmuch-wash stuff).
>
> I could have made insert-part-header return the button it made and pass
> it back up the call chain to the the create-overlays function but
> instead I chose to make create-overlays just take the button at the
> start of the part.
>
> Now if the first part is text/plain then notmuch does not insert a
> [text/plain] button so the code checks for this case by making sure the
> part does start with a button, and if not it does not create the part
> overlay (there is no button to toggle it so no point in an overlay).
>
> However, if the first part is text/plain and notmuch wash happens to
> make a button at the very start of the part then the create-overlays
> function did still create an overlay *and* link it to the button. This
> linking overwrote some of the things notmuch wash had attached to its
> button (eg the button :overlay property) and that caused things to
> break.
>
> I still do not know why emacs 23 and emacs 24 behave differently, but
> regardless the change from v3 is a clear bugfix: we just make sure it is
> a notmuch-show-insert-part-header button not a notmuch-wash button
> before we do the overlay creation/linking to the button. This version
> does that by looking for a :base-label property of the button which
> insert-part-header buttons have but notmuch-wash buttons do
> not. (Obviously there are other ways this check could be done)
Now I understand. LGTM. Do you want to go ahead and push this or
would you rather get my wash/show cleanup in and push your reworked
version of the series?
prev parent reply other threads:[~2012-12-18 17:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 21:54 [PATCH v4 0/5] Use invisibility to toggle display of all parts including multipart Mark Walters
2012-12-17 21:54 ` [PATCH v4 1/5] emacs: show: modify insert-part-header to save the button text Mark Walters
2012-12-17 21:54 ` [PATCH v4 2/5] emacs: show: add overlays for each part Mark Walters
2012-12-17 21:54 ` [PATCH v4 3/5] emacs: show: add invisibility button action Mark Walters
2012-12-17 21:54 ` [PATCH v4 4/5] emacs: wash: fix fake-diff part to include msg parameter Mark Walters
2012-12-17 21:54 ` [PATCH v4 5/5] emacs: show: set default show-all-multipart/alternatives to nil Mark Walters
2012-12-18 8:54 ` [PATCH v4 0/5] Use invisibility to toggle display of all parts including multipart Mark Walters
2012-12-18 17:10 ` Austin Clements [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=20121218171021.GL6187@mit.edu \
--to=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).