unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Istvan Marko <notmuch@kismala.com>
To: notmuch@notmuchmail.org
Subject: [PATCH] emacs: add buttons for all multipart/related parts
Date: Fri, 16 Aug 2013 13:24:23 -0700	[thread overview]
Message-ID: <m3r4dtgz9k.fsf@zsu.kismala.com> (raw)

When text/html parts include images as multipart/related and the
text/plain alternative is used these images can be completely hidden
with no easy way to access them or even find out that they are there.

Make notmuch-show-insert-part-multipart/related add buttons for all
parts, the first one visible the rest hidden.
---
 emacs/notmuch-show.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 82b70ba..20844f0 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -621,6 +621,10 @@ message at DEPTH in the current thread."
 
     ;; Render the primary part.
     (notmuch-show-insert-bodypart msg (car inner-parts) depth)
+    ;; Add hidden buttons for the rest
+    (mapc (lambda (inner-part)
+	    (notmuch-show-insert-bodypart msg inner-part depth t))
+	  (cdr inner-parts))
 
     (when notmuch-show-indent-multipart
       (indent-rigidly start (point) 1)))
-- 
1.8.1.4




-- 
	Istvan

             reply	other threads:[~2013-08-16 20:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-16 20:24 Istvan Marko [this message]
2013-08-20 15:17 ` [PATCH] emacs: add buttons for all multipart/related parts Jameson Graef Rollins
2013-08-20 15:43   ` Istvan Marko
2013-08-20 16:07     ` Jameson Graef Rollins
2013-08-20 16:17       ` Istvan Marko
2013-08-20 18:23   ` Mark Walters
2013-08-21 17:26     ` Jameson Graef Rollins
2013-08-23  8:36   ` Mark Walters
2013-09-01 17:13 ` Mark Walters
2013-09-10 11:15 ` 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=m3r4dtgz9k.fsf@zsu.kismala.com \
    --to=notmuch@kismala.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).