From 95d68b47415631af7cdf37da2f24225c60a86c15 Mon Sep 17 00:00:00 2001 From: djcb Date: Sun, 27 Aug 2017 17:35:23 +0300 Subject: [PATCH] mu4e: add action mu4e-action-copy-message-file-path Allow for copying the file path of the current message; useful for developers. --- mu4e/mu4e-actions.el | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/mu4e/mu4e-actions.el b/mu4e/mu4e-actions.el index 555fe0b3..412ba6c5 100644 --- a/mu4e/mu4e-actions.el +++ b/mu4e/mu4e-actions.el @@ -94,11 +94,13 @@ return the filename." (while (re-search-forward (format "src=\"cid:%s\"" (plist-get attachment :cid)) nil t) (if (plist-get attachment :temp) - (replace-match (format "src=\"%s\"" (plist-get attachment :temp))) + (replace-match (format "src=\"%s\"" + (plist-get attachment :temp))) (replace-match (format "src=\"%s%s\"" temporary-file-directory (plist-get attachment :name))) - (let ((tmp-attachment-name (format "%s%s" temporary-file-directory - (plist-get attachment :name)))) + (let ((tmp-attachment-name + (format "%s%s" temporary-file-directory + (plist-get attachment :name)))) (mu4e~proc-extract 'save (mu4e-message-field msg :docid) (plist-get attachment :index) mu4e-decryption-policy tmp-attachment-name) @@ -160,6 +162,16 @@ with `mu4e-compose-attach-captured-message'." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defun mu4e-action-copy-message-file-path (msg) + "Save the full path the message file for the current message to +the kill-ring." + (kill-new (mu4e-message-field msg :path))) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar mu4e-org-contacts-file nil