diff options
-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" |