diff options
Diffstat (limited to 'lisp/gnus/gnus-group.el')
-rw-r--r-- | lisp/gnus/gnus-group.el | 82 |
1 files changed, 51 insertions, 31 deletions
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 6d38626998c..30b7fe68dd1 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -482,9 +482,15 @@ simple manner.") (?T (gnus-range-length (cdr (assq 'tick gnus-tmp-marked))) ?d) (?i (+ (gnus-range-length (cdr (assq 'dormant gnus-tmp-marked))) (gnus-range-length (cdr (assq 'tick gnus-tmp-marked)))) ?d) - (?g gnus-tmp-group ?s) + (?g (if (boundp 'gnus-tmp-decoded-group) + gnus-tmp-decoded-group + gnus-tmp-group) + ?s) (?G gnus-tmp-qualified-group ?s) - (?c (gnus-short-group-name gnus-tmp-group) ?s) + (?c (gnus-short-group-name (if (boundp 'gnus-tmp-decoded-group) + gnus-tmp-decoded-group + gnus-tmp-group)) + ?s) (?C gnus-tmp-comment ?s) (?D gnus-tmp-newsgroup-description ?s) (?o gnus-tmp-moderated ?c) @@ -1441,8 +1447,8 @@ if it is a string, only list groups matching REGEXP." (point) (prog1 (1+ (point)) ;; Insert the text. - (let ((gnus-tmp-group (gnus-group-name-decode - gnus-tmp-group group-name-charset))) + (let ((gnus-tmp-decoded-group (gnus-group-name-decode + gnus-tmp-group group-name-charset))) (eval gnus-group-line-format-spec))) `(gnus-group ,(gnus-intern-safe gnus-tmp-group gnus-active-hashtb) gnus-unread ,(if (numberp number) @@ -2244,7 +2250,7 @@ ADDRESS." (nname (if method (gnus-group-prefixed-name name meth) name)) backend info) (when (gnus-gethash nname gnus-newsrc-hashtb) - (error "Group %s already exists" nname)) + (error "Group %s already exists" (gnus-group-decoded-name nname))) ;; Subscribe to the new group. (gnus-group-change-level (setq info (list t nname gnus-level-default-subscribed nil nil meth)) @@ -2305,20 +2311,21 @@ be removed from the server, even when it's empty." (unless (gnus-check-backend-function 'request-delete-group group) (error "This back end does not support group deletion")) (prog1 - (if (and (not no-prompt) - (not (gnus-yes-or-no-p - (format - "Do you really want to delete %s%s? " - group (if force " and all its contents" ""))))) - () ; Whew! - (gnus-message 6 "Deleting group %s..." group) - (if (not (gnus-request-delete-group group force)) - (gnus-error 3 "Couldn't delete group %s" group) - (gnus-message 6 "Deleting group %s...done" group) - (gnus-group-goto-group group) - (gnus-group-kill-group 1 t) - (gnus-sethash group nil gnus-active-hashtb) - t)) + (let ((group-decoded (gnus-group-decoded-name group))) + (if (and (not no-prompt) + (not (gnus-yes-or-no-p + (format + "Do you really want to delete %s%s? " + group-decoded (if force " and all its contents" ""))))) + () ; Whew! + (gnus-message 6 "Deleting group %s..." group-decoded) + (if (not (gnus-request-delete-group group force)) + (gnus-error 3 "Couldn't delete group %s" group-decoded) + (gnus-message 6 "Deleting group %s...done" group-decoded) + (gnus-group-goto-group group) + (gnus-group-kill-group 1 t) + (gnus-sethash group nil gnus-active-hashtb) + t))) (gnus-group-position-point))) (defun gnus-group-rename-group (group new-name) @@ -2588,16 +2595,26 @@ If there is, use Gnus to create an nnrss group" (setq url (read-from-minibuffer "URL to Search for RSS: "))) (let ((feedinfo (nnrss-discover-feed url))) (if feedinfo - (let ((title (read-from-minibuffer "Title: " - (cdr (assoc 'title - feedinfo)))) + (let ((title (gnus-newsgroup-savable-name + (read-from-minibuffer "Title: " + (gnus-newsgroup-savable-name + (or (cdr (assoc 'title + feedinfo)) + ""))))) (desc (read-from-minibuffer "Description: " (cdr (assoc 'description feedinfo)))) - (href (cdr (assoc 'href feedinfo)))) - (push (list title href desc) - nnrss-group-alist) - (gnus-group-make-group title '(nnrss "")) + (href (cdr (assoc 'href feedinfo))) + (encodable (mm-coding-system-p 'utf-8))) + (when encodable + ;; Unify non-ASCII text. + (setq title (mm-decode-coding-string + (mm-encode-coding-string title 'utf-8) 'utf-8))) + (gnus-group-make-group (if encodable + (mm-encode-coding-string title 'utf-8) + title) + '(nnrss "")) + (push (list title href desc) nnrss-group-alist) (nnrss-save-server-data nil)) (error "No feeds found for %s" url)))) @@ -3101,7 +3118,7 @@ up is returned." "Do you really want to mark all articles in %s as read? " "Mark all unread articles in %s as read? ") (if (= (length groups) 1) - (car groups) + (gnus-group-decoded-name (car groups)) (format "these %d groups" (length groups))))))) n (while (setq group (pop groups)) @@ -3179,7 +3196,8 @@ Uses the process/prefix convention." (defun gnus-group-expire-articles-1 (group) (when (gnus-check-backend-function 'request-expire-articles group) - (gnus-message 6 "Expiring articles in %s..." group) + (gnus-message 6 "Expiring articles in %s..." + (gnus-group-decoded-name group)) (let* ((info (gnus-get-info group)) (expirable (if (gnus-group-total-expirable-p group) (cons nil (gnus-list-of-read-articles group)) @@ -3204,7 +3222,8 @@ Uses the process/prefix convention." (gnus-request-expire-articles (gnus-uncompress-sequence (cdr expirable)) group)))) (gnus-close-group group)) - (gnus-message 6 "Expiring articles in %s...done" group) + (gnus-message 6 "Expiring articles in %s...done" + (gnus-group-decoded-name group)) ;; Return the list of un-expired articles. (cdr expirable)))) @@ -3243,7 +3262,8 @@ Uses the process/prefix convention." (while (setq group (pop groups)) (gnus-group-remove-mark group) (gnus-message 6 "Changed level of %s from %d to %d" - group (or (gnus-group-group-level) gnus-level-killed) + (gnus-group-decoded-name group) + (or (gnus-group-group-level) gnus-level-killed) level) (gnus-group-change-level group level (or (gnus-group-group-level) gnus-level-killed)) @@ -3392,7 +3412,7 @@ of groups killed." gnus-list-of-killed-groups)) (gnus-group-change-level (if entry entry group) gnus-level-killed (if entry nil level)) - (message "Killed group %s" group)) + (message "Killed group %s" (gnus-group-decoded-name group))) ;; If there are lots and lots of groups to be killed, we use ;; this thing instead. (dolist (group (nreverse groups)) |