Commit cb12a84f authored by Eric Abrahamsen's avatar Eric Abrahamsen
Browse files

Remove Gnus group name encoding/decoding

This completes the process started in c1b63af4. Gnus group names are
now fully decoded inside the Gnus system.

* lisp/gnus/gnus-agent.el (gnus-agent-file-coding-system): Change
  default to utf-8-emacs.
  (gnus-agent-decoded-group-names, gnus-agent-decoded-group-name):
  Remove variable and function. Remove all usage in this file.
* lisp/gnus/gnus-cache.el (gnus-cache-decoded-group-names,
  gnus-cache-unified-group-names, gnus-cache-decoded-group-name):
  Remove these variables and function. Remove all usage in this file.
* lisp/gnus/gnus-group.el (gnus-tmp-decoded-group): Remove this
  variable, gnus-tmp-group is now decoded.
  (gnus-group-completing-read): Don't encode or decode group names
  here.
  (gnus-group-make-group): Remove ENCODED argument.
* lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): Decode group
  names here.
* lisp/gnus/gnus-start.el (gnus-make-hashtable-from-newsrc-alist):
  check for encoded group names and decode.
  (gnus-active-to-gnus-format): Make sure incoming group names are
  decoded.
  (gnus-read-newsrc-el-file): Check for encoded group names in
  gnus-topic-alist.
* lisp/gnus/nnagent.el: Don't use a unibyte buffer.
* lisp/gnus/nnheader.el (nnheader-file-coding-system): Switch default
  from 'raw-text to 'undecided, on the assumption that 'undecided will
  probably write 'utf-8-emacs unless the user has arranged things
  otherwise.
* lisp/gnus/nnimap.el (nnimap-decode-gnus-group,
  nnimap-encode-gnus-group): Remove functions and their use.
* lisp/gnus/nnmail.el (nnmail-parse-active): Remove encoding.
  (nnmail-active-file-coding-system): Default to 'utf-8-emacs instead
  of 'raw-text.
  (nnmail-group-names-not-encoded-p): Obsolete this variable; stop
  using it.
* lisp/gnus/gnus-art.el:
* lisp/gnus/gnus-cus.el:
* lisp/gnus/gnus-msg.el:
* lisp/gnus/gnus-start.el:
* lisp/gnus/gnus-sum.el:
* lisp/gnus/gnus.el:
* lisp/gnus/nnml.el:
* lisp/gnus/message.el:
* lisp/gnus/nnrss.el: Stop using gnus-group-decoded-name in all these
  files.
parent c6b4eed8
......@@ -229,7 +229,7 @@ NOTES:
"Cache of message subjects for spam messages.
Actually a hash table holding subjects mapped to t.")
(defvar gnus-agent-file-name nil)
(defvar gnus-agent-file-coding-system 'raw-text)
(defvar gnus-agent-file-coding-system 'utf-8-emacs)
(defvar gnus-agent-file-loading-cache nil)
(defvar gnus-agent-total-fetched-hashtb nil)
(defvar gnus-agent-inhibit-update-total-fetched-for nil)
......@@ -406,8 +406,6 @@ manipulated as follows:
(defun gnus-agent-read-group ()
"Read a group name in the minibuffer, with completion."
(let ((def (or (gnus-group-group-name) gnus-newsgroup-name)))
(when def
(setq def (gnus-group-decoded-name def)))
(gnus-group-completing-read nil nil t nil nil def)))
;;; Fetching setup functions.
......@@ -1330,7 +1328,10 @@ downloaded into the agent."
(gnus-make-directory (file-name-directory file))
(with-temp-file file
;; Emacs got problem to match non-ASCII group in multibyte buffer.
(mm-disable-multibyte)
;; FIXME: Is this still an issue now that group names are
;; always strings?
;(mm-disable-multibyte)
(when (file-exists-p file)
(nnheader-insert-file-contents file)
......@@ -1360,7 +1361,7 @@ downloaded into the agent."
(gnus-make-directory (file-name-directory file))
(with-temp-buffer
;; Emacs got problem to match non-ASCII group in multibyte buffer.
(mm-disable-multibyte)
;(mm-disable-multibyte)
(when (file-exists-p file)
(nnheader-insert-file-contents file)
......@@ -1372,18 +1373,6 @@ downloaded into the agent."
oactive-min (read (current-buffer))) ;; min
(cons oactive-min oactive-max))))))))
(defvar gnus-agent-decoded-group-names nil
"Alist of non-ASCII group names and decoded ones.")
(defun gnus-agent-decoded-group-name (group)
"Return a decoded group name of GROUP."
(or (cdr (assoc group gnus-agent-decoded-group-names))
(if (string-match "[^\000-\177]" group)
(let ((decoded (gnus-group-decoded-name group)))
(push (cons group decoded) gnus-agent-decoded-group-names)
decoded)
group)))
(defun gnus-agent-group-path (group)
"Translate GROUP into a file name."
......@@ -1395,7 +1384,7 @@ downloaded into the agent."
(nnheader-translate-file-chars
(nnheader-replace-duplicate-chars-in-string
(nnheader-replace-chars-in-string
(gnus-group-real-name (gnus-agent-decoded-group-name group))
(gnus-group-real-name group)
?/ ?_)
?. ?_)))
(if (or nnmail-use-long-file-names
......@@ -1409,7 +1398,7 @@ downloaded into the agent."
;; unplugged. The agent must, therefore, use the same directory
;; while plugged.
(nnmail-group-pathname
(gnus-group-real-name (gnus-agent-decoded-group-name group))
(gnus-group-real-name group)
(if gnus-command-method
(gnus-agent-directory)
(let ((gnus-command-method (gnus-find-method-for-group group)))
......@@ -1437,7 +1426,7 @@ downloaded into the agent."
(format " *Gnus agent %s history*"
(gnus-agent-method)))))
gnus-agent-history-buffers)
(mm-disable-multibyte) ;; everything is binary
;(mm-disable-multibyte) ;; everything is binary
(erase-buffer)
(insert "\n")
(let ((file (gnus-agent-lib-file "history")))
......@@ -1525,8 +1514,7 @@ downloaded into the agent."
(setq selected-sets (nreverse selected-sets))
(gnus-make-directory dir)
(gnus-message 7 "Fetching articles for %s..."
(gnus-agent-decoded-group-name group))
(gnus-message 7 "Fetching articles for %s..." group)
(unwind-protect
(while (setq articles (pop selected-sets))
......@@ -1537,8 +1525,7 @@ downloaded into the agent."
(let (article)
(while (setq article (pop articles))
(gnus-message 10 "Fetching article %s for %s..."
article
(gnus-agent-decoded-group-name group))
article group)
(when (or
(gnus-backlog-request-article group article
nntp-server-buffer)
......@@ -1875,8 +1862,7 @@ article numbers will be returned."
(with-current-buffer nntp-server-buffer
(if articles
(progn
(gnus-message 8 "Fetching headers for %s..."
(gnus-agent-decoded-group-name group))
(gnus-message 8 "Fetching headers for %s..." group)
;; Fetch them.
(gnus-make-directory (nnheader-translate-file-chars
......@@ -3058,8 +3044,7 @@ FORCE is equivalent to setting the expiration predicates to true."
;; provided a non-nil active
(let ((dir (gnus-agent-group-pathname group))
(file-name-coding-system nnmail-pathname-coding-system)
(decoded (gnus-agent-decoded-group-name group)))
(file-name-coding-system nnmail-pathname-coding-system))
(gnus-agent-with-refreshed-group
group
(when (boundp 'gnus-agent-expire-current-dirs)
......@@ -3068,8 +3053,8 @@ FORCE is equivalent to setting the expiration predicates to true."
(if (and (not force)
(eq 'DISABLE (gnus-agent-find-parameter group
'agent-enable-expiration)))
(gnus-message 5 "Expiry skipping over %s" decoded)
(gnus-message 5 "Expiring articles in %s" decoded)
(gnus-message 5 "Expiry skipping over %s" group)
(gnus-message 5 "Expiring articles in %s" group)
(gnus-agent-load-alist group)
(let* ((bytes-freed 0)
(size-files-deleted 0.0)
......@@ -3293,7 +3278,7 @@ line." (point) nov-file)))
(keep
(gnus-agent-message 10
"gnus-agent-expire: %s:%d: Kept %s article%s."
decoded article-number keep (if fetch-date " and file" ""))
group article-number keep (if fetch-date " and file" ""))
(when fetch-date
(unless (file-exists-p
(concat dir (number-to-string
......@@ -3301,7 +3286,7 @@ line." (point) nov-file)))
(setf (nth 1 entry) nil)
(gnus-agent-message 3 "gnus-agent-expire cleared \
download flag on %s:%d as the cached article file is missing."
decoded (caar dlist)))
group (caar dlist)))
(unless marker
(gnus-message 1 "gnus-agent-expire detected a \
missing NOV entry. Run gnus-agent-regenerate-group to restore it.")))
......@@ -3379,12 +3364,12 @@ article alist" type) actions))
(when actions
(gnus-agent-message 8 "gnus-agent-expire: %s:%d: %s"
decoded article-number
group article-number
(mapconcat #'identity actions ", ")))))
(t
(gnus-agent-message
10 "gnus-agent-expire: %s:%d: Article kept as \
expiration tests failed." decoded article-number)
expiration tests failed." group article-number)
(gnus-agent-append-to-list
tail-alist (cons article-number fetch-date)))
)
......@@ -3835,7 +3820,7 @@ If REREAD is not nil, downloaded articles are marked as unread."
(sit-for 1)
t)))))
(when group
(gnus-message 5 "Regenerating in %s" (gnus-agent-decoded-group-name group))
(gnus-message 5 "Regenerating in %s" group)
(let* ((gnus-command-method (or gnus-command-method
(gnus-find-method-for-group group)))
(file (gnus-agent-article-name ".overview" group))
......@@ -3912,8 +3897,7 @@ If REREAD is not nil, downloaded articles are marked as unread."
(> (car downloaded) (car nov-arts))))
;; This entry is missing from the overview file
(gnus-message 3 "Regenerating NOV %s %d..."
(gnus-agent-decoded-group-name group)
(car downloaded))
group (car downloaded))
(let ((file (concat dir (number-to-string (car downloaded)))))
(mm-with-unibyte-buffer
(nnheader-insert-file-contents file)
......
......@@ -4506,9 +4506,7 @@ commands:
(defun gnus-article-setup-buffer ()
"Initialize the article buffer."
(let* ((name (if gnus-single-article-buffer "*Article*"
(concat "*Article "
(gnus-group-decoded-name gnus-newsgroup-name)
"*")))
(concat "*Article " gnus-newsgroup-name "*")))
(original
(progn (string-match "\\*Article" name)
(concat " *Original Article"
......
......@@ -430,41 +430,7 @@ Returns the list of articles removed."
(and unread (memq 'unread class))
(and (not unread) (not ticked) (not dormant) (memq 'read class))))
(defvar gnus-cache-decoded-group-names nil
"Alist of original group names and decoded group names.
Decoding is done according to `gnus-group-name-charset-method-alist'
or `gnus-group-name-charset-group-alist'.")
(defvar gnus-cache-unified-group-names nil
"Alist of unified decoded group names and original group names.
A group name is decoded according to
`gnus-group-name-charset-method-alist' or
`gnus-group-name-charset-group-alist' first, and is encoded and
decoded again according to `nnmail-pathname-coding-system',
`file-name-coding-system', or `default-file-name-coding-system'.
It is used when asking for an original group name from a cache
directory name, in which non-ASCII characters might have been unified
into the ones of a certain charset particularly if the `utf-8' coding
system for example was used.")
(defun gnus-cache-decoded-group-name (group)
"Return a decoded group name of GROUP."
(or (cdr (assoc group gnus-cache-decoded-group-names))
(let ((decoded (gnus-group-decoded-name group))
(coding (or nnmail-pathname-coding-system
file-name-coding-system
default-file-name-coding-system)))
(push (cons group decoded) gnus-cache-decoded-group-names)
(push (cons (decode-coding-string
(encode-coding-string decoded coding)
coding)
group)
gnus-cache-unified-group-names)
decoded)))
(defun gnus-cache-file-name (group article)
(setq group (gnus-cache-decoded-group-name group))
(expand-file-name
(if (stringp article) article (int-to-string article))
(file-name-as-directory
......@@ -733,12 +699,7 @@ If LOW, update the lower bound instead."
(push (pop files) alphs)))
;; If we have nums, then this is probably a valid group.
(when (setq nums (sort nums '<))
;; Use non-decoded group name.
;; FIXME: this is kind of a workaround. The active file should
;; be updated at the time articles are cached. It will make
;; `gnus-cache-unified-group-names' needless.
(puthash (or (cdr (assoc group gnus-cache-unified-group-names))
group)
(puthash group
(cons (car nums) (car (last nums)))
gnus-cache-active-hashtb))
;; Go through all the other files.
......
......@@ -396,7 +396,7 @@ category."))
:tag "topic parameters"
"(gnus)Topic Parameters"))
(widget-insert " for <")
(widget-insert (gnus-group-decoded-name (or group topic)))
(widget-insert (or group topic))
(widget-insert "> and press ")
(widget-create 'push-button
:tag "done"
......@@ -845,8 +845,7 @@ When called interactively, FILE defaults to the current score file.
This can be changed using the `\\[gnus-score-change-score-file]' command."
(interactive (list gnus-current-score-file))
(unless file
(error "No score file for %s"
(gnus-group-decoded-name gnus-newsgroup-name)))
(error "No score file for %s" gnus-newsgroup-name))
(let ((scores (gnus-score-load file))
(types (mapcar (lambda (entry)
`(group :format "%v%h\n"
......
......@@ -479,7 +479,6 @@ simple manner."
(defvar gnus-tmp-news-method)
(defvar gnus-tmp-colon)
(defvar gnus-tmp-news-server)
(defvar gnus-tmp-decoded-group)
(defvar gnus-tmp-header)
(defvar gnus-tmp-process-marked)
(defvar gnus-tmp-summary-live)
......@@ -518,14 +517,9 @@ 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 (if (boundp 'gnus-tmp-decoded-group)
gnus-tmp-decoded-group
gnus-tmp-group)
?s)
(?g gnus-tmp-group ?s)
(?G gnus-tmp-qualified-group ?s)
(?c (gnus-short-group-name (if (boundp 'gnus-tmp-decoded-group)
gnus-tmp-decoded-group
gnus-tmp-group))
(?c (gnus-short-group-name gnus-tmp-group)
?s)
(?C gnus-tmp-comment ?s)
(?D gnus-tmp-newsgroup-description ?s)
......@@ -1398,8 +1392,7 @@ if it is a string, only list groups matching REGEXP."
((functionp regexp) (funcall regexp group))))
(add-text-properties
(point) (prog1 (1+ (point))
(insert " " mark " *: "
(gnus-group-decoded-name group)
(insert " " mark " *: " group
"\n"))
(list 'gnus-group group
'gnus-unread t
......@@ -1508,8 +1501,6 @@ if it is a string, only list groups matching REGEXP."
"Insert a group line in the group buffer."
(let* ((gnus-tmp-method
(gnus-server-get-method gnus-tmp-group gnus-tmp-method))
(group-name-charset (gnus-group-name-charset gnus-tmp-method
gnus-tmp-group))
(gnus-tmp-active (gnus-active gnus-tmp-group))
(gnus-tmp-number-total
(if gnus-tmp-active
......@@ -1528,16 +1519,13 @@ if it is a string, only list groups matching REGEXP."
((= gnus-tmp-level gnus-level-zombie) ?Z)
(t ?K)))
(gnus-tmp-qualified-group
(gnus-group-name-decode (gnus-group-real-name gnus-tmp-group)
group-name-charset))
(gnus-group-real-name gnus-tmp-group))
(gnus-tmp-comment
(or (gnus-group-get-parameter gnus-tmp-group 'comment t)
gnus-tmp-group))
(gnus-tmp-newsgroup-description
(if gnus-description-hashtb
(or (gnus-group-name-decode
(gethash gnus-tmp-group gnus-description-hashtb)
group-name-charset) "")
(or (gethash gnus-tmp-group gnus-description-hashtb) "")
""))
(gnus-tmp-moderated
(if (and gnus-moderated-hashtb
......@@ -1574,9 +1562,7 @@ if it is a string, only list groups matching REGEXP."
(point)
(prog1 (1+ (point))
;; Insert the text.
(let ((gnus-tmp-decoded-group (gnus-group-name-decode
gnus-tmp-group group-name-charset)))
(eval gnus-group-line-format-spec)))
(eval gnus-group-line-format-spec))
`(gnus-group ,gnus-tmp-group
gnus-unread ,(if (numberp number)
(string-to-number gnus-tmp-number-of-unread)
......@@ -2117,9 +2103,7 @@ be permanent."
(defun gnus-group-name-at-point ()
"Return a group name from around point if it exists, or nil."
(if (derived-mode-p 'gnus-group-mode)
(let ((group (gnus-group-group-name)))
(when group
(gnus-group-decoded-name group)))
(gnus-group-group-name)
;; FIXME: Use rx.
(let ((regexp "[][\C-@-\t\v-*,/:-@\\^`{-\C-?]*\
\\(nn[a-z]+\\(?:\\+[^][\C-@-*,/:-@\\^`{-\C-?]+\\)?:\
......@@ -2160,41 +2144,25 @@ be permanent."
require-match initial-input hist
def)
"Read a group name with completion.
Non-ASCII group names are allowed. The arguments are the same as
`completing-read' except that COLLECTION and HIST default to
`gnus-active-hashtb' and `gnus-group-history' respectively if
they are omitted. Can handle COLLECTION as a list, hash table,
or vector."
The arguments are the same as `completing-read' except that
COLLECTION and HIST default to `gnus-active-hashtb' and
`gnus-group-history' respectively if they are omitted. Can
handle COLLECTION as a list, hash table, or vector."
;; This function handles vectors for backwards compatibility. In
;; theory, `collection' will only ever be a list or a hash table.
(or collection (setq collection gnus-active-hashtb))
(let* ((choices
(mapcar
(lambda (g)
(if (string-match "[^\000-\177]" g)
(gnus-group-decoded-name g)
g))
(cond ((listp collection)
collection)
((vectorp collection)
(mapatoms #'symbol-name collection))
((hash-table-p collection)
(hash-table-keys collection)))))
(hash-table-keys collection))))
(group
(gnus-completing-read (or prompt "Group") (reverse choices)
require-match initial-input
(or hist 'gnus-group-history)
def)))
(unless (cond ((and (listp collection)
(symbolp (car collection)))
(member group (mapcar 'symbol-name collection)))
((listp collection)
(member group collection))
((vectorp collection)
(symbol-value (intern-soft group collection)))
((hash-table-p collection)
(gethash group collection)))
(setq group
(encode-coding-string
group (gnus-group-name-charset nil group))))
(replace-regexp-in-string "\n" "" group)))
;;;###autoload
......@@ -2755,13 +2723,13 @@ The user will be prompted for GROUP."
(interactive (list (gnus-group-completing-read)))
(gnus-group-make-group (gnus-group-real-name group)
(gnus-group-server group)
nil nil t))
nil nil))
(defun gnus-group-make-group (name &optional method address args encoded)
(defun gnus-group-make-group (name &optional method address args)
"Add a new newsgroup.
The user will be prompted for a NAME, for a select METHOD, and an
ADDRESS. NAME should be a human-readable string (i.e., not be encoded
even if it contains non-ASCII characters) unless ENCODED is non-nil.
even if it contains non-ASCII characters).
If the backend supports it, the group will also be created on the
server."
......@@ -2772,10 +2740,6 @@ server."
(when (stringp method)
(setq method (or (gnus-server-to-method method) method)))
(unless encoded
(setq name (encode-coding-string
name
(gnus-group-name-charset method name))))
(let* ((meth (gnus-method-simplify
(when (and method
(not (gnus-server-equal method gnus-select-method)))
......@@ -2784,7 +2748,7 @@ server."
(nname (if method (gnus-group-prefixed-name name meth) name))
backend info)
(when (gnus-group-entry nname)
(error "Group %s already exists" (gnus-group-decoded-name nname)))
(error "Group %s already exists" nname))
;; Subscribe to the new group.
(gnus-group-change-level
(setq info (list t nname gnus-level-default-subscribed nil nil meth))
......@@ -2860,20 +2824,19 @@ 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
(let ((group-decoded (gnus-group-decoded-name group)))
(when (or no-prompt
(gnus-yes-or-no-p
(format
"Do you really want to delete %s%s? "
group-decoded (if force " and all its contents" ""))))
(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-set-active group nil)
t)))
(when (or no-prompt
(gnus-yes-or-no-p
(format
"Do you really want to delete %s%s? "
group (if force " and all its contents" ""))))
(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-set-active group nil)
t))
(gnus-group-position-point)))
(defun gnus-group-rename-group (group new-name)
......@@ -2887,13 +2850,9 @@ and NEW-NAME will be prompted for."
(error "This back end does not support renaming groups"))
(setq new-name (gnus-read-group
"Rename group to: "
(gnus-group-real-name (gnus-group-decoded-name group)))
(gnus-group-real-name group))
method (gnus-info-method (gnus-get-info group)))
(list group (encode-coding-string
new-name
(gnus-group-name-charset
method
(gnus-group-prefixed-name new-name method))))))
(list group (gnus-group-prefixed-name new-name method))))
(unless (gnus-check-backend-function 'request-rename-group group)
(error "This back end does not support renaming groups"))
......@@ -2912,34 +2871,30 @@ and NEW-NAME will be prompted for."
(gnus-group-real-name new-name)
(gnus-info-method (gnus-get-info group)))))
(let ((decoded-group (gnus-group-decoded-name group))
(decoded-new-name (gnus-group-decoded-name new-name)))
(when (gnus-active new-name)
(error "The group %s already exists" decoded-new-name))
(when (gnus-active new-name)
(error "The group %s already exists" new-name))
(gnus-message 6 "Renaming group %s to %s..."
decoded-group decoded-new-name)
(prog1
(if (progn
(gnus-group-goto-group group)
(not (when (< (gnus-group-group-level) gnus-level-zombie)
(gnus-request-rename-group group new-name))))
(gnus-error 3 "Couldn't rename group %s to %s"
decoded-group decoded-new-name)
;; We rename the group internally by killing it...
(gnus-group-kill-group)
;; ... changing its name ...
(setcar (cdar gnus-list-of-killed-groups) new-name)
;; ... and then yanking it. Magic!
(gnus-group-yank-group)
(gnus-set-active new-name (gnus-active group))
(gnus-message 6 "Renaming group %s to %s...done"
decoded-group decoded-new-name)
new-name)
(setq gnus-killed-list (delete group gnus-killed-list))
(gnus-set-active group nil)
(gnus-dribble-touch)
(gnus-group-position-point))))
(gnus-message 6 "Renaming group %s to %s..." group new-name)
(prog1
(if (progn
(gnus-group-goto-group group)
(not (when (< (gnus-group-group-level) gnus-level-zombie)
(gnus-request-rename-group group new-name))))
(gnus-error 3 "Couldn't rename group %s to %s"
group new-name)
;; We rename the group internally by killing it...
(gnus-group-kill-group)
;; ... changing its name ...
(setcar (cdar gnus-list-of-killed-groups) new-name)
;; ... and then yanking it. Magic!
(gnus-group-yank-group)
(gnus-set-active new-name (gnus-active group))
(gnus-message 6 "Renaming group %s to %s...done" group new-name)
new-name)
(setq gnus-killed-list (delete group gnus-killed-list))
(gnus-set-active group nil)
(gnus-dribble-touch)
(gnus-group-position-point)))
(defun gnus-group-edit-group (group &optional part)
"Edit the group on the current line."
......@@ -2966,7 +2921,7 @@ and NEW-NAME will be prompted for."
((eq part 'method) "select method")
((eq part 'params) "group parameters")
(t "group info"))
(gnus-group-decoded-name group))
group)
`(lambda (form)
(gnus-group-edit-group-done ',part ,group form)))
(local-set-key
......@@ -3105,8 +3060,7 @@ If called with a prefix argument, ask for the file type."
(coding (gnus-group-name-charset method name)))
(setcar (cdr method) (encode-coding-string file coding))
(gnus-group-make-group
(encode-coding-string (gnus-group-real-name name) coding)
method nil nil t)))
(gnus-group-real-name name) method nil nil)))
(defvar nnweb-type-definition)
(defvar gnus-group-web-type-history nil)
......@@ -3611,7 +3565,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)
(gnus-group-decoded-name (car groups))
(car groups)
(format "these %d groups" (length groups)))))))
n
(while (setq group (pop groups))
......@@ -3696,8 +3650,7 @@ 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..."
(gnus-group-decoded-name group))
(gnus-message 6 "Expiring articles in %s..." group)
(let* ((info (gnus-get-info group))
(expirable (if (gnus-group-total-expirable-p group)
(cons nil (gnus-list-of-read-articles group))
......@@ -3724,8 +3677,7 @@ Uses the process/prefix convention."
;; Just expire using the normal expiry values.
(gnus-request-expire-articles articles-to-expire group))))
(gnus-close-group group))
(gnus-message 6 "Expiring articles in %s...done"
(gnus-group-decoded-name group))
(gnus-message 6 "Expiring articles in %s...done" group)
;; Return the list of un-expired articles.
(cdr expirable))))
......@@ -3762,7 +3714,7 @@ Uses the process/prefix convention."
(dolist (group (gnus-group-process-prefix n))
(gnus-group-remove-mark group)
(gnus-message 6 "Changed level of %s from %d to %d"
(gnus-group-decoded-name group)
group
(or (gnus-group-group-level) gnus-level-killed)
level)
(gnus-group-change-level
......@@ -3909,7 +3861,7 @@ of groups killed."
;; `gnus-newsrc-hashtb', this check will always return nil.
(when (numberp (gnus-group-unread group))
(gnus-request-update-group-status group 'unsubscribe))
(message "Killed group %s" (gnus-group-decoded-name group)))
(message "Killed group %s" group))
;; If there are lots and lots of groups to be killed, we use
;; this thing instead.
(dolist (group (nreverse groups))
......@@ -4047,7 +3999,7 @@ entail asking the server for the groups."
(add-text-properties
(point) (prog1 (1+ (point))
(insert " *: "
(gnus-group-decoded-name group)
group
"\n"))
(list 'gnus-group group
'gnus-unread t
......@@ -4494,9 +4446,9 @@ and the second element is the address."
(prin1-to-string (car method)))
(and (consp method)
(nth 1 (gnus-info-method info)))
nil t)
nil)
;; It's a native group.
(gnus-group-make-group (gnus-info-group info) nil nil nil t)))
(gnus-group-make-group (gnus-info-group info) nil nil nil)))
(gnus-message 6 "Note: New group created")
(setq entry
(gnus-group-entry (gnus-group-prefixed-name
......@@ -4685,7 +4637,7 @@ This command may read the active file."
(while (setq point (text-property-not-all (point) (point-max)
'gnus-group nil))
(goto-char point)
(push (symbol-name (get-text-property point 'gnus-group)) groups)