summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <meyerkya@gmail.com>2013-06-19 19:35:55 -0400
committerKyle Meyer <meyerkya@gmail.com>2013-06-19 19:35:55 -0400
commit4ad849035b9865f26761ac886f1241a2df3dff73 (patch)
treeb7e8666fc51ac90a8f04b1891f013c4ddb224c9d
parenteb62191beeca244e57a8f2f1cc32d47f8f229e9a (diff)
downloademacs.d-4ad849035b9865f26761ac886f1241a2df3dff73.tar.gz
function to locate and follow gnus link
For articles with many links, it can get annoying to press <TAB> (gnus-summary-widget-forward) to get to the external link to the current article.
-rw-r--r--init/km-gnus.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/init/km-gnus.el b/init/km-gnus.el
index fcd1303..8b55b78 100644
--- a/init/km-gnus.el
+++ b/init/km-gnus.el
@@ -82,6 +82,23 @@
'(gnus-thread-sort-by-number
gnus-thread-sort-by-most-recent-date))
+(defun km/follow-gnus-link ()
+ "Follow link at bottom of gnus message"
+ (interactive)
+ ;; next 3 lines from gnus-sum.el guns-summary-widget-forward
+ (gnus-summary-select-article)
+ (gnus-configure-windows 'article)
+ (select-window (gnus-get-buffer-window gnus-article-buffer))
+
+ (end-of-buffer)
+ (search-backward "Link")
+ (widget-button-press (point)))
+
+(define-key gnus-summary-mode-map
+ (kbd "C-c j") 'km/follow-gnus-link)
+(define-key gnus-article-mode-map
+ (kbd "C-c j") 'km/follow-gnus-link)
+
(require 'notmuch)
(require 'org-gnus)