[PATCH] emacs: add function to toggle display of all multipart/alternative parts
Jameson Graef Rollins
jrollins at finestructure.net
Thu Aug 9 13:52:47 PDT 2012
On Mon, Jun 18 2012, Mark Walters <markwalters1009 at gmail.com> wrote:
> I agree with this cycling approach but I think it needs to be per
> message rather than per buffer. I attach a rather hacky attempt at this
> below: on minimal testing it seems to work. But the lisp is really a bit
> gross. In particular I have no idea if I should be escaping the message
> ids (so this could break in unfortunate/insecure ways)
Thanks to broken Apple mail clients, I'm getting more and more messages
that have attachments hidden in multipart/"alternatives" to text/plain
parts. So I would really like to revive this patch.
I just tested it and it still applies to current master, and actually
seems to work great. 'W' cycles through which part is displayed in the
current message. Pretty much exactly what I want.
Mark seems to think this patch is less than ideal. One issue is that
it's trying to store a setting for a single displayed message in a
variable of full buffer scope. So he's storing a list of message ids
there:
> +(defvar notmuch-show-message-multipart/alternative nil)
> +(make-variable-buffer-local 'notmuch-show-message-multipart/alternative)
> +(put 'notmuch-show-message-multipart/alternative 'permanent-local t)
...
> + (lax-plist-put notmuch-show-message-multipart/alternative (plist-get msg :id) 0)))
I can see that might get a little hairy. Can any elisp experts out
there think of a better way to do this? (actually, this is making me
again want a show mode that only displays one message at a time (which I
guess means I need to try pick again)).
jamie.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120809/d468b6e2/attachment.pgp>
More information about the notmuch
mailing list