summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-gnus.el24
1 files changed, 22 insertions, 2 deletions
diff --git a/lisp/init-gnus.el b/lisp/init-gnus.el
index f95f11c..a4657bc 100644
--- a/lisp/init-gnus.el
+++ b/lisp/init-gnus.el
@@ -1,6 +1,4 @@
(require 'gnus)
-(autoload 'gnus-group-topic "gnus-topic")
-
(require 'org-gnus)
(setq gnus-home-directory "~/.gnus.d/"
@@ -79,6 +77,28 @@ is off."
(string< (gnus-group-topic (gnus-info-group info1))
(gnus-group-topic (gnus-info-group info2))))
+(autoload 'gnus-group-topic "gnus-topic")
+(defun km/gnus-group-jump-to-group ()
+ "`gnus-group-jump-to-group', but with ido completion."
+ (interactive)
+ (gnus-group-jump-to-group
+ (ido-completing-read "Group: "
+ (mapcar #'car (cdr gnus-newsrc-alist))
+ nil t)))
+
+(defun km/gnus-topic-jump-to-topic ()
+ "`gnus-group-jump-to-group', but with ido completion."
+ (interactive)
+ (gnus-topic-jump-to-topic
+ (ido-completing-read "Topic: "
+ (mapcar #'car gnus-topic-alist)
+ nil t)))
+
+(define-key gnus-group-mode-map [remap gnus-group-jump-to-group]
+ 'km/gnus-group-jump-to-group)
+(define-key gnus-group-mode-map [remap gnus-topic-jump-to-topic]
+ 'km/gnus-topic-jump-to-topic)
+
(define-key gnus-group-mode-map "e" 'gnus-group-select-group)