unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: Jameson Graef Rollins <jrollins@finestructure.net>,
	notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: add function to toggle display of all multipart/alternative parts
Date: Tue, 19 Jun 2012 06:57:17 +0000	[thread overview]
Message-ID: <87ehpbyek2.fsf@nikula.org> (raw)
In-Reply-To: <87zk80gvmb.fsf@servo.finestructure.net>

On Mon, 18 Jun 2012, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> On Fri, Jun 15 2012, Jani Nikula <jani@nikula.org> wrote:
>> Add function notmuch-show-toggle-multipart-alternative to make
>> notmuch-show-all-multipart/alternative-parts buffer local, toggle its
>> value in the buffer, and redisplay the thread with either all or
>> preferred alternative parts expanded.
>
> This is a very cool feature.  I haven't looked closely at this but can't
> this mechanism work the same as the other show-mode toggles, like crypto
> or indenting?  I wouldn't think it would require any more extra variable
> stuff than what is used for those other toggles.

I don't know how I missed those - thanks for pointing them out to
me. They seem to do the extra variable stuff at the top level, alongside
the defvar, rather than in the toggle function like I do. I should
rearrange this toggle to be in line with the others.

> Also, the *really* sweet thing would be if the toggle actually cycled
> through display of the alternatives, only displaying one at a time.
> That would be very swank.

It is easy to agree with that. At a glance, it looks like it needs a
bunch more work than the simple toggle in this patch, though. One
difficulty is choosing the parts to cycle, as we may have multiple
messages with different sets of multipart/alternative in the same show
buffer. And the cycle would be buffer local, not "message local".

I think it would be possible to have show/hide buttons for the parts,
and the buttons could add/remove the part type from a buffer local list
of alternative parts to show, and then refresh view. But that too would
affect all messages in the buffer, not just one part of one message.

In short, with my limited elisp skills and even more limited time, I
don't see a nice solution this. That doesn't say anything about the
possible existence of a nice solution, though. ;)


BR,
Jani.

  parent reply	other threads:[~2012-06-19  6:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15 15:55 [PATCH] emacs: add function to toggle display of all multipart/alternative parts Jani Nikula
2012-06-18 21:26 ` Jameson Graef Rollins
2012-06-19  6:56   ` Mark Walters
2012-08-09 20:52     ` Jameson Graef Rollins
2012-08-10  7:10       ` [PATCH v2] " Mark Walters
2012-08-10 14:53         ` Jani Nikula
2012-08-10 16:18           ` Jameson Graef Rollins
2012-08-10 16:39             ` Jani Nikula
2012-08-10 16:58               ` Mark Walters
2012-08-10 17:49                 ` Jameson Graef Rollins
2012-08-12 17:39         ` [PATCH 1/2] test: add emacs show mode test for toggling display of multipart/alternative Jameson Graef Rollins
2012-08-12 17:39           ` [PATCH 2/2] test: move all emacs show tests to emacs-show test script Jameson Graef Rollins
2012-08-31 19:44             ` David Bremner
2012-10-20  2:31           ` [PATCH 1/2] test: add emacs show mode test for toggling display of multipart/alternative Ethan Glasser-Camp
2012-10-09 22:21         ` [PATCH v2] emacs: add function to toggle display of all multipart/alternative parts Jeremy Nickurak
2012-10-19 16:36         ` Ethan Glasser-Camp
2012-06-19  6:57   ` Jani Nikula [this message]
2012-06-19 20:14 ` Jani Nikula
2012-06-19 20:25   ` Jani Nikula
2012-06-22 22:34   ` David Bremner
2012-06-24  7:10     ` Jani Nikula
2012-06-24 18:56   ` Mark Walters
2012-10-19 16:14     ` [PATCH] Add NEWS item for multipart/alternative toggle Ethan Glasser-Camp

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=87ehpbyek2.fsf@nikula.org \
    --to=jani@nikula.org \
    --cc=jrollins@finestructure.net \
    --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).