diff options
author | Kyle Meyer <kyle@kyleam.com> | 2018-05-14 18:34:28 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2018-05-14 18:34:28 -0400 |
commit | 31178148a2c35afcb8bd28d340999ea3a21406f5 (patch) | |
tree | e27dbd5c0b72eae50c1428ad6b7cb4c9fe13895f /lisp | |
parent | 40288a2e91a0d413f97c8284a73e74166079c6dd (diff) | |
download | emacs.d-31178148a2c35afcb8bd28d340999ea3a21406f5.tar.gz |
notmuch-visit-github-url: Copy URL when given a prefix argument
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/km-mail.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/km-mail.el b/lisp/km-mail.el index ab1cb78..8511326 100644 --- a/lisp/km-mail.el +++ b/lisp/km-mail.el @@ -211,10 +211,14 @@ Tracking System, set '--in-reply-to' to the initial report and ;;;###autoload -(defun km/notmuch-visit-github-url () - "Visit the GitHub link associated with this message." - (interactive) - (browse-url +(defun km/notmuch-visit-github-url (&optional copy) + "Visit the GitHub link associated with this message. +If COPY is non-nil, copy the URL instead of visiting it." + (interactive "P") + (funcall + (if copy + (lambda (url) (kill-new (message url))) + #'browse-url) (km/notmuch-with-raw-message (notmuch-show-get-message-id) (if (re-search-forward (concat "Reply to this email directly or view it on GitHub:\n" |