mirror of https://github.com/djcb/mu.git
* mu4e: copy address at point with c / C-u c in message-view
This commit is contained in:
parent
2f680b79d0
commit
7d52ef1c3f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue