]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-wash.el
emacs: add inline patch fake parts through a special handler
[notmuch] / emacs / notmuch-wash.el
index 8607fb006e1a42729ed669b346732b9e19499ec7..e9f2dbad577963dcc7976544f8a26df8b1e8fc9f 100644 (file)
@@ -137,7 +137,7 @@ collapse the remaining lines into a button.")
     (format label-format lines-count)))
 
 (defun notmuch-wash-region-to-button (msg beg end type prefix)
-  "Auxilary function to do the actual making of overlays and buttons
+  "Auxiliary function to do the actual making of overlays and buttons
 
 BEG and END are buffer locations. TYPE should a string, either
 \"citation\" or \"signature\". PREFIX is some arbitrary text to
@@ -156,6 +156,7 @@ insert before the button, probably for indentation."
     (add-to-invisibility-spec invis-spec)
     (overlay-put overlay 'invisible (list invis-spec message-invis-spec))
     (overlay-put overlay 'isearch-open-invisible #'notmuch-wash-region-isearch-show)
+    (overlay-put overlay 'priority 10)
     (overlay-put overlay 'type type)
     (goto-char (1+ end))
     (save-excursion
@@ -312,7 +313,7 @@ for error."
              (setq patch-end (match-beginning 0)))
          (save-restriction
            (narrow-to-region patch-start patch-end)
-           (setq part (plist-put part :content-type "text/x-diff"))
+           (setq part (plist-put part :content-type "inline-patch-fake-part"))
            (setq part (plist-put part :content (buffer-string)))
            (setq part (plist-put part :id -1))
            (setq part (plist-put part :filename "inline patch"))