diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-02-18 01:43:09 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-02-18 01:43:09 -0500 |
commit | 69dea2f9a02903fbca387496f2798ee8e0462d45 (patch) | |
tree | 055f71d62c22be750d8748208670586ae8cd1727 /lisp | |
parent | d9e96d1f762a6b9f637932849dc3f0f472dc02e7 (diff) | |
download | emacs.d-69dea2f9a02903fbca387496f2798ee8e0462d45.tar.gz |
Add command gnus-copy-gmane-link-as-kill
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-gnus.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/init-gnus.el b/lisp/init-gnus.el index ebe6eea..d8ed69a 100644 --- a/lisp/init-gnus.el +++ b/lisp/init-gnus.el @@ -173,6 +173,17 @@ to group buffer instead of moving to next group." (let ((gnus-auto-select-next (unless no-next 'quietly))) (gnus-summary-catchup-and-exit nil t))) +(defun km/gnus-copy-gmane-link-as-kill () + (interactive) + (km/gnus-summary-set-current-article) + (with-current-buffer gnus-original-article-buffer + (save-excursion + (goto-char (point-min)) + (if (re-search-forward "Archived-At: <\\(.*\\)>") + (let ((link (match-string-no-properties 1))) + (kill-new (message "%s" link))) + (user-error "No link found"))))) + (define-key gnus-summary-mode-map (kbd "C-c j") 'km/gnus-follow-last-message-link) (define-key gnus-summary-mode-map ";" 'gnus-summary-universal-argument) @@ -189,10 +200,12 @@ to group buffer instead of moving to next group." (define-prefix-command 'km/gnus-summary-prefix-map) (define-key gnus-summary-mode-map (kbd "C-c m") 'km/gnus-summary-prefix-map) (define-key km/gnus-summary-prefix-map "p" 'km/gnus-open-github-patch) +(define-key km/gnus-summary-prefix-map "l" 'km/gnus-copy-gmane-link-as-kill) (define-prefix-command 'km/gnus-article-prefix-map) (define-key gnus-article-mode-map (kbd "C-c m") 'km/gnus-article-prefix-map) (define-key km/gnus-article-prefix-map "p" 'km/gnus-open-github-patch) +(define-key km/gnus-article-prefix-map "l" 'km/gnus-copy-gmane-link-as-kill) ;;; Message mode |