From 52f63e0651dc1e9d1103b666e9eb1371393f408e Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 14 Oct 2001 23:12:42 +0000 Subject: [PATCH] * gnus-group.el (gnus-group-sort-by-server): Use it. * gnus.el (gnus-method-to-full-server-name): New, bogus function. * gnus-topic.el (gnus-topic-sort-groups-by-server): New command and keystroke. --- lisp/ChangeLog | 9 +++++++++ lisp/gnus-group.el | 4 ++-- lisp/gnus-topic.el | 7 +++++++ lisp/gnus.el | 3 +++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a5648c318..8fe4ad382 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2001-09-04 21:42:23 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-group-sort-by-server): Use it. + + * gnus.el (gnus-method-to-full-server-name): New, bogus function. + + * gnus-topic.el (gnus-topic-sort-groups-by-server): New command + and keystroke. + 2001-10-14 Simon Josefsson * dig.el: Doc fix. diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 9775c4e0b..d1507b5fd 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -2800,10 +2800,10 @@ sort in reverse order." (defun gnus-group-sort-by-server (info1 info2) "Sort alphabetically by server name." - (string< (gnus-method-to-server-name + (string< (gnus-method-to-full-server-name (gnus-find-method-for-group (gnus-info-group info1) info1)) - (gnus-method-to-server-name + (gnus-method-to-full-server-name (gnus-find-method-for-group (gnus-info-group info2) info2)))) diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index 62c91795e..07485dd21 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -1039,6 +1039,7 @@ articles in the topic and its subtopics." "a" gnus-topic-sort-groups-by-alphabet "u" gnus-topic-sort-groups-by-unread "l" gnus-topic-sort-groups-by-level + "e" gnus-topic-sort-groups-by-server "v" gnus-topic-sort-groups-by-score "r" gnus-topic-sort-groups-by-rank "m" gnus-topic-sort-groups-by-method)) @@ -1621,6 +1622,12 @@ If REVERSE, sort in reverse order." (interactive "P") (gnus-topic-sort-groups 'gnus-group-sort-by-method reverse)) +(defun gnus-topic-sort-groups-by-server (&optional reverse) + "Sort the current topic alphabetically by server name. +If REVERSE, sort in reverse order." + (interactive "P") + (gnus-topic-sort-groups 'gnus-group-sort-by-server reverse)) + (defun gnus-topic-sort-topics-1 (top reverse) (if (cdr top) (let ((subtop diff --git a/lisp/gnus.el b/lisp/gnus.el index ad0b9bc4b..a999e0517 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -2702,6 +2702,9 @@ that that variable is buffer-local to the summary buffers." (not (string= (nth 1 method) ""))) (concat "+" (nth 1 method))))) +(defsubst gnus-method-to-full-server-name (method) + (format "%s+%s" (car method) (nth 1 method))) + (defun gnus-group-prefixed-name (group method) "Return the whole name from GROUP and METHOD." (and (stringp method) (setq method (gnus-server-to-method method))) -- 2.25.1