From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH v3 0/5] Use invisibility to toggle display of all parts including multipart
Date: Sat, 15 Dec 2012 08:15:32 +0000 [thread overview]
Message-ID: <1355559338-14313-1-git-send-email-markwalters1009@gmail.com> (raw)
This is version 3 of this set: version 2 is at
id:1355389924-3718-1-git-send-email-markwalters1009@gmail.com
This fixes the things Austin pointed out in the previous version.
Diff from v2 is below the diffstat.
Best wishes
Mark
Mark Walters (5):
emacs: show: modify insert-part-header to save the button text
emacs: show: add overlays for each part
emacs: show: add invisibility button action
emacs: wash: fix fake-diff part to include msg parameter
emacs: show: set default show-all-multipart/alternatives to nil
emacs/notmuch-show.el | 113 +++++++++++++++++++++++++++++++++++++-----------
emacs/notmuch-wash.el | 2 +-
2 files changed, 88 insertions(+), 27 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index c43dd32..457f84a 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -478,7 +478,6 @@ message at DEPTH in the current thread."
(define-key map "v" 'notmuch-show-part-button-view)
(define-key map "o" 'notmuch-show-part-button-interactively-view)
(define-key map "|" 'notmuch-show-part-button-pipe)
- (define-key map "t" 'notmuch-show-toggle-invisible-part-action)
map)
"Submap for button commands")
(fset 'notmuch-show-part-button-map notmuch-show-part-button-map)
@@ -556,7 +555,7 @@ message at DEPTH in the current thread."
(mm-pipe-part handle))))
;; This is taken from notmuch-wash: maybe it should be unified?
-(defun notmuch-show-toggle-invisible-part-action (&optional button)
+(defun notmuch-show-toggle-part-invisibility (&optional button)
(interactive)
(let* ((button (or button (button-at (point))))
(overlay (button-get button 'overlay))
@@ -861,7 +860,7 @@ message at DEPTH in the current thread."
(setq handlers (cdr handlers))))
t)
-(defun notmuch-show-insert-part-overlays (msg beg end hide)
+(defun notmuch-show-create-part-overlays (msg beg end hide)
"Add an overlay to the part between BEG and END"
(let* ((button (button-at beg))
(part-beg (and button (1+ (button-end button)))))
@@ -875,7 +874,6 @@ message at DEPTH in the current thread."
(overlay-put overlay 'invisible (list invis-spec message-invis-spec))
(overlay-put overlay 'priority 10)
- (overlay-put overlay 'type "part")
;; Now we have to add invis-spec to every overlay this
;; overlay contains, otherwise these inner overlays will
;; override this one.
@@ -892,7 +890,7 @@ message at DEPTH in the current thread."
;; button label right.
(save-excursion
(when hide
- (notmuch-show-toggle-invisible-part-action button))))))
+ (notmuch-show-toggle-part-invisibility button))))))
(defun notmuch-show-insert-bodypart (msg part depth &optional hide)
"Insert the body part PART at depth DEPTH in the current thread.
@@ -909,7 +907,7 @@ If HIDE is non-nil then initially hide this part."
;; Ensure that the part ends with a carriage return.
(unless (bolp)
(insert "\n"))
- (notmuch-show-insert-part-overlays msg beg (point) hide)))
+ (notmuch-show-create-part-overlays msg beg (point) hide)))
(defun notmuch-show-insert-body (msg body depth)
"Insert the body BODY at depth DEPTH in the current thread."
@@ -2023,7 +2021,7 @@ the user (see `notmuch-show-stash-mlarchive-link-alist')."
(interactive)
(let ((button (or button (button-at (point)))))
(if (button-get button 'invisibility-spec)
- (notmuch-show-toggle-invisible-part-action button)
+ (notmuch-show-toggle-part-invisibility button)
(notmuch-show-part-button-internal button notmuch-show-part-button-default-action))))
(defun notmuch-show-part-button-save (&optional button)
next reply other threads:[~2012-12-15 8:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-15 8:15 Mark Walters [this message]
2012-12-15 8:15 ` [PATCH v3 1/5] emacs: show: modify insert-part-header to save the button text Mark Walters
2012-12-15 8:15 ` [PATCH v3 2/5] emacs: show: add overlays for each part Mark Walters
2012-12-15 8:15 ` [PATCH v3 3/5] emacs: show: add invisibility button action Mark Walters
2012-12-17 12:59 ` David Bremner
2012-12-15 8:15 ` [PATCH v3 4/5] emacs: wash: fix fake-diff part to include msg parameter Mark Walters
2012-12-15 8:15 ` [PATCH v3 5/5] emacs: show: set default show-all-multipart/alternatives to nil Mark Walters
2012-12-15 19:03 ` [PATCH v3 0/5] Use invisibility to toggle display of all parts including multipart Austin Clements
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=1355559338-14313-1-git-send-email-markwalters1009@gmail.com \
--to=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).