diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index 40d0065e..d403f959 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -295,9 +295,18 @@ at POINT, or if nil, at (point)." "Compose a message for the address at point." (interactive) (unless (get-text-property (or point (point)) 'email) - (error "No address at point")) + (mu4e-error "No address at point")) (mu4e~compose-mail (get-text-property (or point (point)) 'email))) +(defun mu4e~view-copy-contact (&optional full) + "Compose a message for the address at (point)." + (interactive "P") + (let ((email (get-text-property (point) 'email)) + (long (get-text-property (point) 'long))) + (unless email (mu4e-error "No address at point")) + (kill-new (if full long email)) + (mu4e-message "Address copied."))) + (defun mu4e~view-construct-contacts-header (msg field) "Add a header for a contact field (ie., :to, :from, :cc, :bcc)." (mu4e~view-construct-header field @@ -312,6 +321,7 @@ at POINT, or if nil, at (point)." (define-key map [?\M-\r] 'mu4e~view-toggle-contact) (define-key map [mouse-2] 'mu4e~view-compose-contact) (define-key map "C" 'mu4e~view-compose-contact) + (define-key map "c" 'mu4e~view-copy-contact) (propertize (if mu4e-view-show-addresses long short) 'long long diff --git a/mu4e/mu4e.texi b/mu4e/mu4e.texi index 38122da8..5fec8785 100644 --- a/mu4e/mu4e.texi +++ b/mu4e/mu4e.texi @@ -1050,6 +1050,7 @@ A execute some custom action on an attachment misc ---- +c copy address at point (with C-u copy long version) w toggle line wrapping h toggle showing cited parts