From fe1be6ad102aedbbd731b4d4645babf9133fee34 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 21 Jan 2002 02:05:03 +0000 Subject: [PATCH] Synch with the released version of Oort Gnus v0.05. After translating gnus-ja.texi, it will be tagged with `t-gnus-6_15_5-02-quimby' and it will be merged into t-gnus-6_15 branch. --- ChangeLog | 5 ++ lisp/ChangeLog | 123 ++++++++++++++++++++++++++++++++++++++++++++- lisp/gnus-agent.el | 2 +- lisp/gnus-art.el | 17 ++++--- lisp/gnus-fun.el | 2 +- lisp/gnus-score.el | 2 +- lisp/gnus-spec.el | 34 ++++++++----- lisp/gnus-sum.el | 67 +++++++++++++++++-------- lisp/gnus-topic.el | 12 +++-- lisp/gnus-util.el | 29 +++++++++-- lisp/gnus-vers.el | 2 +- lisp/gnus.el | 23 ++++----- lisp/imap.el | 141 ++++++++++++++++++++++++++++------------------------ lisp/message.el | 4 +- lisp/mml-smime.el | 5 +- lisp/nneething.el | 30 +++++++++++ lisp/nnfolder.el | 15 +++--- lisp/nnkiboze.el | 2 + lisp/nnmail.el | 8 ++- lisp/nnml.el | 15 +++--- lisp/smiley-ems.el | 19 +++---- texi/ChangeLog | 18 +++++++ texi/gnus-ja.texi | 80 +++++++++++++++++++++++++++-- texi/gnus.texi | 80 +++++++++++++++++++++++++++-- 24 files changed, 561 insertions(+), 174 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ca9f57..5f69238 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-01-21 Katsumi Yamaoka + + * lisp/gnus-vers.el (gnus-revision-number): Increment to 02 (synch + with the released version of Oort Gnus v0.05). + 2002-01-16 Katsumi Yamaoka * lisp/dgnushack.el: Advise `byte-compile-inline-expand' for Mule diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8e33e3e..17646c7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,124 @@ +2002-01-20 Lars Magne Ingebrigtsen + + * gnus-util.el (gnus-completing-read): Remove + inherit-input-method. + +2002-01-20 05:33:30 Lars Magne Ingebrigtsen + + * gnus.el: Oort Gnus v0.05 is released. + +2002-01-20 Lars Magne Ingebrigtsen + + * nnkiboze.el (nnkiboze-generate-group): Make sure the directory + exists. + + * gnus-spec.el (gnus-string-width-function): New function. + (gnus-tilde-cut-form): Use it. + (gnus-tilde-max-form): Ditto. + (gnus-use-correct-string-widths): Default to (featurep 'xemacs). + (gnus-substring-function): Use it. + (gnus-tilde-cut-form): Ditto. + (gnus-substring-function): New function. + + * message.el (message-check-news-header-syntax): New message. + + * gnus.el (gnus-slave-no-server): Doc fix. + + * gnus-spec.el (gnus-use-correct-string-widths): Default to t. + +2002-01-15 Katsumi Yamaoka + + * gnus-sum.el (gnus-adjust-marked-articles): Fix the record for + `seen' if it looks like (seen NUM1 . NUM2). It should be + (seen (NUM1 . NUM2)). + +2002-01-20 Lars Magne Ingebrigtsen + + * gnus-topic.el (gnus-topic-catchup-articles): Update article + number in closed topics. + +2002-01-19 Daniel Pittman + + * gnus-sum.el (gnus-summary-first-unseen-or-unread-subject): New + functions. + +2002-01-19 Lars Magne Ingebrigtsen + + * gnus.el (gnus-group-find-parameter): Clean up. + + * gnus-sum.el (gnus-summary-goto-subject): Error on non-numerical + articles. + + * gnus-util.el (gnus-completing-read-with-default): Renamed. + + * nnmail.el (nnmail-article-group): Clean up. + +2002-01-19 Paul Stodghill + + * gnus-agent.el (gnus-category-name): Intern the category name. + +2002-01-19 Lars Magne Ingebrigtsen + + * gnus-topic.el (gnus-topic-move-group): Use gnus-topic-history. + + * gnus-util.el (gnus-completing-read): New function. + +2002-01-19 ShengHuo ZHU + + * gnus-art.el (gnus-add-wash-type): Use add-to-list. + + * smiley-ems.el (smiley-region): Register smiley. + (smiley-toggle-buffer): Rewrite the function. + (smiley-active): Removed. + +2002-01-19 Simon Josefsson + + * gnus-util.el (gnus-parent-id): Optimize null n case. From + Jesper Harder . + +2002-01-18 TSUCHIYA Masatoshi + + * gnus-art.el (gnus-request-article-this-buffer): Call + `nneething-get-file-name' to extract the file name from the + message id. + + * nneething.el (nneething-encode-file-name): New function. + (nneething-decode-file-name): Ditto. + (nneething-get-file-name): Ditto. + (nneething-make-head): Encode the file name and encapsulate it + into the field of the message id. + +2002-01-18 Simon Josefsson + + * nnml.el (nnml-request-update-info): Don't erase flags that isn't + stored in .marks. + + * nnfolder.el (nnfolder-request-update-info): Ditto. + +2002-01-18 ShengHuo ZHU + + * gnus-art.el (gnus-url-parse-query-string): Allow new line in value. + +2002-01-18 Simon Josefsson + + * imap.el (imap-starttls-p): Don't check for binary. + (imap-gssapi-auth-p): Ditto. + (imap-kerberos4-auth-p): Ditto. + (imap-open): Change logic. Iterate through all possible streams, + instead of bailing out after first failure. Move authenticator + decision to `imap-authenticate'. + (imap-authenticate): Change logic, now finds the authenticator to + use, was previously in `imap-open'. + (imap-open): Return nil on failure. + (imap-open): Setup temp buffer correctly. + (imap-open): Return buffer only on success. + (imap-interactive-login, imap-interactive-login): Tell the user + which stream/authenticator is used for the queried + username/password. + (imap-open, imap-authenticate): Set variables. + (imap-gssapi-auth-p, imap-kerberos4-auth-p): Fix typo. + (imap-open): Don't assume how `with-temp-buffer' is implemented. + 2002-01-17 Lars Magne Ingebrigtsen * gnus-fun.el (gnus-grab-cam-x-face): New function. @@ -4571,7 +4692,7 @@ 2001-06-03 Dale Hagglund * gnus-mlspl.el (gnus-group-split-fancy): Fix generation of split - restrict clauses. + restrict clauses. 2001-06-07 16:00:00 ShengHuo ZHU diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index d452471..eacc400 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -1425,7 +1425,7 @@ The following commands are available: (gnus-category-position-point))) (defun gnus-category-name () - (or (get-text-property (gnus-point-at-bol) 'gnus-category) + (or (intern (get-text-property (gnus-point-at-bol) 'gnus-category)) (error "No category on the current line"))) (defun gnus-category-read () diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index b9877ae..b5ca7d8 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -4804,7 +4804,7 @@ is the string to use when it is inactive.") (defun gnus-add-wash-type (type) "Add a washing of TYPE to the current status." - (push type gnus-article-wash-types)) + (add-to-list 'gnus-article-wash-types type)) (defun gnus-delete-wash-type (type) "Add a washing of TYPE to the current status." @@ -5189,6 +5189,9 @@ If given a prefix, show the hidden text instead." (gnus-check-server (gnus-find-method-for-group gnus-newsgroup-name)) (gnus-request-group gnus-newsgroup-name t))) +(eval-when-compile + (autoload 'nneething-get-file-name "nneething")) + (defun gnus-request-article-this-buffer (article group) "Get an article and insert it into this buffer. T-gnus change: Insert an article into `gnus-original-article-buffer'." @@ -5240,12 +5243,10 @@ T-gnus change: Insert an article into `gnus-original-article-buffer'." gnus-newsgroup-name))) (when (and (eq (car method) 'nneething) (vectorp header)) - (let ((dir (expand-file-name - (mail-header-subject header) - (file-name-as-directory - (or (cadr (assq 'nneething-address method)) - (nth 1 method)))))) - (when (file-directory-p dir) + (let ((dir (nneething-get-file-name + (mail-header-id header)))) + (when (and (stringp dir) + (file-directory-p dir)) (setq article 'nneething) (gnus-group-enter-directory dir)))))))) (setq gnus-original-article (cons group article)) @@ -6110,7 +6111,7 @@ specified by `gnus-button-alist'." (if (not (string-match "=" cur)) nil ; Grace (setq key (gnus-url-unhex-string (substring cur 0 (match-beginning 0))) - val (gnus-url-unhex-string (substring cur (match-end 0) nil))) + val (gnus-url-unhex-string (substring cur (match-end 0) nil) t)) (if downcase (setq key (downcase key))) (setq cur (assoc key retval)) diff --git a/lisp/gnus-fun.el b/lisp/gnus-fun.el index 048faa7..d24124a 100644 --- a/lisp/gnus-fun.el +++ b/lisp/gnus-fun.el @@ -201,7 +201,7 @@ colors of the displayed X-Faces." (setq file (car file)) (with-temp-buffer (shell-command - (format "pnmcut -left 110 -top 60 -width 144 -height 144 '%s' | ppmnorm 2>/dev/null | pnmscale -width 48 | ppmtopgm | pgmtopbm -threshold -value 0.92 | pbmtoxbm | compface" + (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | ppmnorm 2>/dev/null | pnmscale -width 48 | ppmtopgm | pgmtopbm -threshold -value 0.92 | pbmtoxbm | compface" file) (current-buffer)) ;;(sleep-for 3) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index c6d2e4d..30eb81e 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -678,7 +678,7 @@ used as score." (and gnus-extra-headers (equal (nth 1 entry) "extra") (intern ; need symbol - (gnus-completing-read + (gnus-completing-read-with-default (symbol-name (car gnus-extra-headers)) ; default response "Score extra header:" ; prompt (mapcar (lambda (x) ; completion list diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index 646cf12..eec204e 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -338,15 +338,29 @@ (setq wend seek) (substring string wstart (1- wend)))) +(defun gnus-string-width-function () + (cond + (gnus-use-correct-string-widths + 'gnus-correct-length) + ((fboundp 'string-width) + 'string-width) + (t + 'length))) + +(defun gnus-substring-function () + (cond + (gnus-use-correct-string-widths + 'gnus-correct-substring) + ((fboundp 'string-width) + 'gnus-correct-substring) + (t + 'substring))) + (defun gnus-tilde-max-form (el max-width) "Return a form that limits EL to MAX-WIDTH." (let ((max (abs max-width)) - (length-fun (if gnus-use-correct-string-widths - 'gnus-correct-length - 'length)) - (substring-fun (if gnus-use-correct-string-widths - 'gnus-correct-substring - 'substring))) + (length-fun (gnus-string-width-function)) + (substring-fun (gnus-substring-function))) (if (symbolp el) `(if (> (,length-fun ,el) ,max) ,(if (< max-width 0) @@ -363,12 +377,8 @@ (defun gnus-tilde-cut-form (el cut-width) "Return a form that cuts CUT-WIDTH off of EL." (let ((cut (abs cut-width)) - (length-fun (if gnus-use-correct-string-widths - 'gnus-correct-length - 'length)) - (substring-fun (if gnus-use-correct-string-widths - 'gnus-correct-substring - 'substring))) + (length-fun (gnus-string-width-function)) + (substring-fun (gnus-substring-function))) (if (symbolp el) `(if (> (,length-fun ,el) ,cut) ,(if (< cut-width 0) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index eca4251..05f181f 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -307,13 +307,16 @@ This variable can either be the symbols `first' (place point on the first subject), `unread' (place point on the subject line of the first unread article), `best' (place point on the subject line of the higest-scored article), `unseen' (place point on the subject line of -the first unseen article), or a function to be called to place point on -some subject line.." +the first unseen article), 'unseen-or-unread' (place point on the subject +line of the first unseen article or, if all article have been seen, on the +subject line of the first unread article), or a function to be called to +place point on some subject line.." :group 'gnus-group-select :type '(choice (const best) (const unread) (const first) - (const unseen))) + (const unseen) + (const unseen-or-unread))) (defcustom gnus-dont-select-after-jump-to-other-group nil "If non-nil, don't select the first unread article after entering the @@ -3350,6 +3353,8 @@ If SHOW-ALL is non-nil, already read articles are also listed." (gnus-summary-first-unread-subject)) ((eq gnus-auto-select-subject 'unseen) (gnus-summary-first-unseen-subject)) + ((eq gnus-auto-select-subject 'unseen-or-unread) + (gnus-summary-first-unseen-or-unread-subject)) ((eq gnus-auto-select-subject 'first) ;; Do nothing. ) @@ -5010,8 +5015,8 @@ If SELECT-ARTICLES, only select those articles from GROUP." ((eq mark-type 'range) (cond ((eq mark 'seen) - ;; T-gnus change: Fix the record for `seen' if it looks like - ;; (seen NUM1 . NUM2). It should be (seen (NUM1 . NUM2)). + ;; Fix the record for `seen' if it looks like (seen NUM1 . NUM2). + ;; It should be (seen (NUM1 . NUM2)). (when (numberp (cddr marks)) (setcdr marks (list (cdr marks)))) (setq articles (cdr marks)) @@ -6486,6 +6491,8 @@ If optional argument UNREAD is non-nil, only unread article is selected." "Go the subject line of ARTICLE. If FORCE, also allow jumping to articles not currently shown." (interactive "nArticle number: ") + (unless (numberp article) + (error "Article %s is not a number" article)) (let ((b (point)) (data (gnus-data-find article))) ;; We read in the article if we have to. @@ -6887,6 +6894,19 @@ Return nil if there are no unseen articles." (gnus-summary-first-subject t t t)) (gnus-summary-position-point))) +(defun gnus-summary-first-unseen-or-unread-subject () + "Place the point on the subject line of the first unseen article. +Return nil if there are no unseen articles." + (interactive) + (prog1 + (unless (when (gnus-summary-first-subject t t t) + (gnus-summary-show-thread) + (gnus-summary-first-subject t t t)) + (when (gnus-summary-first-subject t) + (gnus-summary-show-thread) + (gnus-summary-first-subject t))) + (gnus-summary-position-point))) + (defun gnus-summary-first-article () "Select the first article. Return nil if there are no articles." @@ -7098,7 +7118,7 @@ articles that are younger than AGE days." (interactive (let ((header (intern - (gnus-completing-read + (gnus-completing-read-with-default (symbol-name (car gnus-extra-headers)) (if current-prefix-arg "Exclude extra header:" @@ -8613,7 +8633,7 @@ latter case, they will be copied into the relevant groups." (car (gnus-find-method-for-group gnus-newsgroup-name))))) (method - (gnus-completing-read + (gnus-completing-read-with-default methname "What backend do you want to use when respooling?" methods nil t nil 'gnus-mail-method-history)) ms) @@ -10318,23 +10338,26 @@ save those articles instead." (to-newsgroup (cond ((null split-name) - (gnus-completing-read default prom - gnus-active-hashtb - 'gnus-valid-move-group-p - nil prefix - 'gnus-group-history)) + (gnus-completing-read-with-default + default prom + gnus-active-hashtb + 'gnus-valid-move-group-p + nil prefix + 'gnus-group-history)) ((= 1 (length split-name)) - (gnus-completing-read (car split-name) prom - gnus-active-hashtb - 'gnus-valid-move-group-p - nil nil - 'gnus-group-history)) + (gnus-completing-read-with-default + (car split-name) prom + gnus-active-hashtb + 'gnus-valid-move-group-p + nil nil + 'gnus-group-history)) (t - (gnus-completing-read nil prom - (mapcar (lambda (el) (list el)) - (nreverse split-name)) - nil nil nil - 'gnus-group-history)))) + (gnus-completing-read-with-default + nil prom + (mapcar (lambda (el) (list el)) + (nreverse split-name)) + nil nil nil + 'gnus-group-history)))) (to-method (gnus-server-to-method (gnus-group-method to-newsgroup)))) (when to-newsgroup (if (or (string= to-newsgroup "") diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index f01ad87..b7d054d 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -1194,10 +1194,13 @@ Also see `gnus-group-catchup'." (if (not topic) (call-interactively 'gnus-group-catchup-current) (save-excursion - (let ((gnus-group-marked + (let* ((groups (mapcar (lambda (entry) (car (nth 2 entry))) - (gnus-topic-find-groups topic gnus-level-killed t)))) - (gnus-group-catchup-current))))) + (gnus-topic-find-groups topic gnus-level-killed t))) + (buffer-read-only nil) + (gnus-group-marked groups)) + (gnus-group-catchup-current) + (mapcar 'gnus-topic-update-topics-containing-group groups))))) (defun gnus-topic-read-group (&optional all no-article group) "Read news in this newsgroup. @@ -1255,7 +1258,8 @@ When used interactively, PARENT will be the topic under point." If COPYP, copy the groups instead." (interactive (list current-prefix-arg - (completing-read "Move to topic: " gnus-topic-alist nil t))) + (gnus-completing-read "Move to topic" gnus-topic-alist nil t + 'gnus-topic-history))) (let ((use-marked (and (not n) (not (gnus-region-active-p)) gnus-group-marked t)) (groups (gnus-group-process-prefix n)) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 6cbbfc1..fe2d0e0 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -320,7 +320,7 @@ (define-key keymap key (pop plist)) (pop plist))))) -(defun gnus-completing-read (default prompt &rest args) +(defun gnus-completing-read-with-default (default prompt &rest args) ;; Like `completing-read', except that DEFAULT is the default argument. (let* ((prompt (if default (concat prompt " (default " default ") ") @@ -505,10 +505,13 @@ jabbering all the time." If N, return the Nth ancestor instead." (when (and references (not (zerop (length references)))) - (let ((ids (inline (gnus-split-references references)))) - (while (nthcdr (or n 1) ids) - (setq ids (cdr ids))) - (car ids)))) + (if n + (let ((ids (inline (gnus-split-references references)))) + (while (nthcdr n ids) + (setq ids (cdr ids))) + (car ids)) + (when (string-match "<[^> \t]+>\\'" references) + (match-string 0 references))))) (defun gnus-buffer-live-p (buffer) "Say whether BUFFER is alive or not." @@ -1281,6 +1284,22 @@ SPEC is a predicate specifier that contains stuff like `or', `and', (t (list 'local-map map)))) +(defun gnus-completing-read (prompt table &optional predicate require-match + history) + (when (and history + (not (boundp history))) + (set history nil)) + (completing-read + (if (symbol-value history) + (concat prompt " (" (car (symbol-value history)) "): ") + (concat prompt ": ")) + table + predicate + require-match + nil + history + (car (symbol-value history)))) + (provide 'gnus-util) ;;; gnus-util.el ends here diff --git a/lisp/gnus-vers.el b/lisp/gnus-vers.el index 0f16280..21b9843 100644 --- a/lisp/gnus-vers.el +++ b/lisp/gnus-vers.el @@ -34,7 +34,7 @@ (require 'product) (provide 'gnus-vers) -(defconst gnus-revision-number "01" +(defconst gnus-revision-number "02" "Revision number for this version of gnus.") ;; Product information of this gnus. diff --git a/lisp/gnus.el b/lisp/gnus.el index 12ea662..92fdcda 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -3022,12 +3022,10 @@ If you call this function inside a loop, consider using the faster (set-buffer gnus-group-buffer) (if symbol (gnus-group-fast-parameter group symbol allow-list) - (let ((parameters - (nconc - (copy-sequence - (funcall gnus-group-get-parameter-function group)) - (gnus-parameters-get-parameter group)))) - parameters)))) + (nconc + (copy-sequence + (funcall gnus-group-get-parameter-function group)) + (gnus-parameters-get-parameter group))))) (defun gnus-group-get-parameter (group &optional symbol allow-list) "Return the group parameters for GROUP. @@ -3373,18 +3371,19 @@ Allow completion over sensible values." ;;;###autoload (defun gnus-slave-no-server (&optional arg) - "Read network news as a slave, without connecting to local server." + "Read network news as a slave, without connecting to the local server." (interactive "P") (gnus-no-server arg t)) ;;;###autoload (defun gnus-no-server (&optional arg slave) "Read network news. -If ARG is a positive number, Gnus will use that as the -startup level. If ARG is nil, Gnus will be started at level 2. -If ARG is non-nil and not a positive number, Gnus will -prompt the user for the name of an NNTP server to use. -As opposed to `gnus', this command will not connect to the local server." +If ARG is a positive number, Gnus will use that as the startup +level. If ARG is nil, Gnus will be started at level 2. If ARG is +non-nil and not a positive number, Gnus will prompt the user for the +name of an NNTP server to use. +As opposed to `gnus', this command will not connect to the local +server." (interactive "P") (gnus-no-server-1 arg slave)) diff --git a/lisp/imap.el b/lisp/imap.el index 0164f85..c0cbb5c 100644 --- a/lisp/imap.el +++ b/lisp/imap.el @@ -703,12 +703,7 @@ If ARGS, PROMPT is used as an argument to `format'." nil))) (defun imap-starttls-p (buffer) - (and (imap-capability 'STARTTLS buffer) - (condition-case () - (progn - (require 'starttls) - (call-process "starttls")) - (error nil)))) + (imap-capability 'STARTTLS buffer)) (defun imap-starttls-open (name buffer server port) (let* ((port (or port imap-default-port)) @@ -760,12 +755,15 @@ Returns t if login was successful, nil otherwise." (while (or (not user) (not passwd)) (setq user (or imap-username (read-from-minibuffer - (concat "IMAP username for " imap-server ": ") + (concat "IMAP username for " imap-server + " (using stream `" (symbol-name imap-stream) + "'): ") (or user imap-default-user)))) (setq passwd (or imap-password (imap-read-passwd (concat "IMAP password for " user "@" - imap-server ": ")))) + imap-server " (using authenticator `" + (symbol-name imap-auth) "'): ")))) (when (and user passwd) (if (funcall loginfunc user passwd) (progn @@ -787,13 +785,7 @@ Returns t if login was successful, nil otherwise." (defun imap-gssapi-auth-p (buffer) (and (imap-capability 'AUTH=GSSAPI buffer) - (catch 'imtest-found - (let (prg (prgs imap-gssapi-program)) - (while (setq prg (pop prgs)) - (condition-case () - (and (call-process (substring prg 0 (string-match " " prg))) - (throw 'imtest-found t)) - (error nil))))))) + (eq imap-stream 'gssapi))) (defun imap-gssapi-auth (buffer) (message "imap: Authenticating using GSSAPI...%s" @@ -802,13 +794,7 @@ Returns t if login was successful, nil otherwise." (defun imap-kerberos4-auth-p (buffer) (and (imap-capability 'AUTH=KERBEROS_V4 buffer) - (catch 'imtest-found - (let (prg (prgs imap-kerberos4-program)) - (while (setq prg (pop prgs)) - (condition-case () - (and (call-process (substring prg 0 (string-match " " prg))) - (throw 'imtest-found t)) - (error nil))))))) + (eq imap-stream 'kerberos4))) (defun imap-kerberos4-auth (buffer) (message "imap: Authenticating using Kerberos 4...%s" @@ -943,46 +929,54 @@ necessery. If nil, the buffer name is generated." (setq imap-auth (or auth imap-auth)) (setq imap-stream (or stream imap-stream)) (message "imap: Connecting to %s..." imap-server) - (if (let ((imap-stream (or imap-stream imap-default-stream))) - (imap-open-1 buffer)) - ;; Choose stream. - (let (stream-changed) - (message "imap: Connecting to %s...done" imap-server) - (when (null imap-stream) - (let ((streams imap-streams)) - (while (setq stream (pop streams)) - (if (funcall (nth 1 (assq stream imap-stream-alist)) buffer) - (setq stream-changed (not (eq (or imap-stream - imap-default-stream) - stream)) - imap-stream stream - streams nil))) - (unless imap-stream - (error "Couldn't figure out a stream for server")))) - (when stream-changed - (message "imap: Reconnecting with stream `%s'..." imap-stream) - (imap-close buffer) - (if (imap-open-1 buffer) - (message "imap: Reconnecting with stream `%s'...done" - imap-stream) - (message "imap: Reconnecting with stream `%s'...failed" - imap-stream)) - (setq imap-capability nil)) - (if (imap-opened buffer) - ;; Choose authenticator - (when (and (null imap-auth) (not (eq imap-state 'auth))) - (let ((auths imap-authenticators)) - (while (setq auth (pop auths)) - (if (funcall (nth 1 (assq auth imap-authenticator-alist)) - buffer) - (setq imap-auth auth - auths nil))) - (unless imap-auth - (error "Couldn't figure out authenticator for server")))))) - (message "imap: Connecting to %s...failed" imap-server)) - (when (imap-opened buffer) - (setq imap-mailbox-data (make-vector imap-mailbox-prime 0)) - buffer))) + (if (null (let ((imap-stream (or imap-stream imap-default-stream))) + (imap-open-1 buffer))) + (progn + (message "imap: Connecting to %s...failed" imap-server) + nil) + (when (null imap-stream) + ;; Need to choose stream. + (let ((streams imap-streams)) + (while (setq stream (pop streams)) + ;; OK to use this stream? + (when (funcall (nth 1 (assq stream imap-stream-alist)) buffer) + ;; Stream changed? + (if (not (eq imap-default-stream stream)) + (with-current-buffer (get-buffer-create + (generate-new-buffer-name " *temp*")) + (mapcar 'make-local-variable imap-local-variables) + (set-buffer-multibyte nil) + (imap-disable-multibyte) + (buffer-disable-undo) + (setq imap-server (or server imap-server)) + (setq imap-port imap-port) + (setq imap-auth imap-auth) + (message "imap: Reconnecting with stream `%s'..." stream) + (if (null (let ((imap-stream stream)) + (imap-open-1 (current-buffer)))) + (progn + (kill-buffer (current-buffer)) + (message + "imap: Reconnecting with stream `%s'...failed" + stream)) + ;; We're done, kill the first connection + (imap-close buffer) + (kill-buffer buffer) + (rename-buffer buffer) + (message "imap: Reconnecting with stream `%s'...done" + stream) + (setq imap-stream stream) + (setq imap-capability nil) + (setq streams nil))) + ;; We're done + (message "imap: Connecting to %s...done" imap-server) + (setq imap-stream stream) + (setq imap-capability nil) + (setq streams nil)))))) + (when (imap-opened buffer) + (setq imap-mailbox-data (make-vector imap-mailbox-prime 0))) + (when imap-stream + buffer)))) (defun imap-opened (&optional buffer) "Return non-nil if connection to imap server in BUFFER is open. @@ -1009,8 +1003,27 @@ password is remembered in the buffer." (make-local-variable 'imap-password) (if user (setq imap-username user)) (if passwd (setq imap-password passwd)) - (if (funcall (nth 2 (assq imap-auth imap-authenticator-alist)) buffer) - (setq imap-state 'auth))))) + (if imap-auth + (and (funcall (nth 2 (assq imap-auth + imap-authenticator-alist)) buffer) + (setq imap-state 'auth)) + ;; Choose authenticator. + (let ((auths imap-authenticators) + auth) + (while (setq auth (pop auths)) + ;; OK to use authenticator? + (when (funcall (nth 1 (assq auth imap-authenticator-alist)) buffer) + (message "imap: Authenticating to `%s' using `%s'..." + imap-server auth) + (setq imap-auth auth) + (if (funcall (nth 2 (assq auth imap-authenticator-alist)) buffer) + (progn + (message "imap: Authenticating to `%s' using `%s'...done" + imap-server auth) + (setq auths nil)) + (message "imap: Authenticating to `%s' using `%s'...failed" + imap-server auth))))) + imap-state)))) (defun imap-close (&optional buffer) "Close connection to server in BUFFER. diff --git a/lisp/message.el b/lisp/message.el index 84e9df9..b438468 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -3751,7 +3751,7 @@ Otherwise, generate and save a value for `canlock-password' first." (zerop (length (setq to (completing-read - "Followups to: (default all groups) " + "Followups to (default: no Followup-To header) " (mapcar (lambda (g) (list g)) (cons "poster" (message-tokenize-header @@ -4253,7 +4253,7 @@ If NOW, use that time instead." (aset user (match-beginning 0) ?_)) user) (message-number-base36 (user-uid) -1)) - (message-number-base36 (+ (car tm) + (message-number-base36 (+ (car tm) (lsh (% message-unique-id-char 25) 16)) 4) (message-number-base36 (+ (nth 1 tm) (lsh (/ message-unique-id-char 25) 16)) 4) diff --git a/lisp/mml-smime.el b/lisp/mml-smime.el index ac87492..d5baf3f 100644 --- a/lisp/mml-smime.el +++ b/lisp/mml-smime.el @@ -112,8 +112,9 @@ ;; todo: try dns/ldap automatically first, before prompting user (let (certs done) (while (not done) - (ecase (read (gnus-completing-read "dns" "Fetch certificate from" - '(("dns") ("file")) nil t)) + (ecase (read (gnus-completing-read-with-default + "dns" "Fetch certificate from" + '(("dns") ("file")) nil t)) (dns (setq certs (append certs (mml-smime-get-dns-cert)))) (file (setq certs (append certs diff --git a/lisp/nneething.el b/lisp/nneething.el index 8b4b80b..9901397 100644 --- a/lisp/nneething.el +++ b/lisp/nneething.el @@ -383,6 +383,35 @@ This variable is used as the alternative of `mailcap-mime-extensions'.") (insert-buffer-substring nneething-work-buffer) (goto-char (point-max)))) +(defun nneething-encode-file-name (file &optional coding-system) + "Encode the name of the FILE in CODING-SYSTEM." + (let ((pos 0) buf) + (setq file (mm-encode-coding-string + file (or coding-system nnmail-pathname-coding-system))) + (while (string-match "[^-a-zA-Z_:/.]" file pos) + (setq buf (cons (format "%%%02x" (aref file (match-beginning 0))) + (cons (substring file pos (match-beginning 0)) buf)) + pos (match-end 0))) + (apply (function concat) + (nreverse (cons (substring file pos) buf))))) + +(defun nneething-decode-file-name (file &optional coding-system) + "Decode the name of the FILE is encoded in CODING-SYSTEM." + (let ((pos 0) buf) + (while (string-match "%\\([0-9a-fA-F][0-9a-fA-F]\\)" file pos) + (setq buf (cons (string (string-to-number (match-string 1 file) 16)) + (cons (substring file pos (match-beginning 0)) buf)) + pos (match-end 0))) + (decode-coding-string + (apply (function concat) + (nreverse (cons (substring file pos) buf))) + (or coding-system nnmail-pathname-coding-system)))) + +(defun nneething-get-file-name (id) + "Extract the file name from the message ID string." + (when (string-match "\\`\\'" id) + (nneething-decode-file-name (match-string 1 id)))) + (defun nneething-make-head (file &optional buffer extra-msg mime-type mime-charset mime-encoding) "Create a head by looking at the file attributes of FILE." @@ -391,6 +420,7 @@ This variable is used as the alternative of `mailcap-mime-extensions'.") "Subject: " (file-name-nondirectory file) (or extra-msg "") "\n" "Message-ID: \n" (if (equal '(0 0) (nth 5 atts)) "" (concat "Date: " (current-time-string (nth 5 atts)) "\n")) diff --git a/lisp/nnfolder.el b/lisp/nnfolder.el index 3ca1246..97e6a1b 100644 --- a/lisp/nnfolder.el +++ b/lisp/nnfolder.el @@ -1164,13 +1164,14 @@ This command does not work if you use short group names." (nnfolder-open-marks group server) ;; Update info using `nnfolder-marks'. (mapcar (lambda (pred) - (gnus-info-set-marks - info - (gnus-update-alist-soft - (cdr pred) - (cdr (assq (cdr pred) nnfolder-marks)) - (gnus-info-marks info)) - t)) + (unless (memq (cdr pred) gnus-article-unpropagated-mark-lists) + (gnus-info-set-marks + info + (gnus-update-alist-soft + (cdr pred) + (cdr (assq (cdr pred) nnfolder-marks)) + (gnus-info-marks info)) + t))) gnus-article-mark-lists) (let ((seen (cdr (assq 'read nnfolder-marks)))) (gnus-info-set-read info diff --git a/lisp/nnkiboze.el b/lisp/nnkiboze.el index f23c7a5..b610abe 100644 --- a/lisp/nnkiboze.el +++ b/lisp/nnkiboze.el @@ -255,6 +255,7 @@ Finds out what articles are to be part of the nnkiboze groups." (load newsrc-file)) (let ((coding-system-for-write nnkiboze-file-coding-system) (output-coding-system nnkiboze-file-coding-system)) + (gnus-make-directory (file-name-directory nov-file)) (with-temp-file nov-file (when (file-exists-p nov-file) (nnheader-insert-file-contents nov-file)) @@ -343,6 +344,7 @@ Finds out what articles are to be part of the nnkiboze groups." (gnus-message 3 "nnkiboze: Checking %s...done" (caar newsrc)) (setq newsrc (cdr newsrc))))) ;; We save the kiboze newsrc for this group. + (gnus-make-directory (file-name-directory newsrc-file)) (with-temp-file newsrc-file (insert "(setq nnkiboze-newsrc '") (gnus-prin1 nnkiboze-newsrc) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 96b294c..52c993c 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1072,13 +1072,11 @@ FUNC will be called with the group name to determine the article number." (funcall func (car method))))))))) ;; Produce a trace if non-empty. (when (and trace nnmail-split-trace) - (let ((trace (nreverse nnmail-split-trace)) - (restore (current-buffer))) + (let ((restore (current-buffer))) (nnheader-set-temp-buffer "*Split Trace*") (gnus-add-buffer) - (while trace - (insert (car trace) "\n") - (setq trace (cdr trace))) + (dolist (trace (nreverse nnmail-split-trace)) + (insert trace "\n")) (goto-char (point-min)) (gnus-configure-windows 'split-trace) (set-buffer restore))) diff --git a/lisp/nnml.el b/lisp/nnml.el index 7f1a3e6..7f411b0 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -946,13 +946,14 @@ Use the nov database for the current group if available." (nnml-open-marks group server) ;; Update info using `nnml-marks'. (mapcar (lambda (pred) - (gnus-info-set-marks - info - (gnus-update-alist-soft - (cdr pred) - (cdr (assq (cdr pred) nnml-marks)) - (gnus-info-marks info)) - t)) + (unless (memq (cdr pred) gnus-article-unpropagated-mark-lists) + (gnus-info-set-marks + info + (gnus-update-alist-soft + (cdr pred) + (cdr (assq (cdr pred) nnml-marks)) + (gnus-info-marks info)) + t))) gnus-article-mark-lists) (let ((seen (cdr (assq 'read nnml-marks)))) (gnus-info-set-read info diff --git a/lisp/smiley-ems.el b/lisp/smiley-ems.el index ea15c7d..d05a713 100644 --- a/lisp/smiley-ems.el +++ b/lisp/smiley-ems.el @@ -37,6 +37,7 @@ (eval-when-compile (require 'cl)) (require 'nnheader) +(require 'gnus-art) (defgroup smiley nil "Turn :-)'s into real images." @@ -102,10 +103,6 @@ regexp to replace with IMAGE. IMAGE is the name of a PBM file in (push (list (car elt) (cadr elt) image) smiley-cached-regexp-alist))))))) -(defvar smiley-active nil - "Non-nil means smilies in the buffer will be displayed.") -(make-variable-buffer-local 'smiley-active) - (defvar smiley-mouse-map (let ((map (make-sparse-keymap))) (define-key map [down-mouse-2] 'ignore) ; override widget @@ -125,7 +122,6 @@ A list of images is returned." (overlays-in start end)) (unless smiley-cached-regexp-alist (smiley-update-cache)) - (setq smiley-active t) (save-excursion (let ((beg (or start (point-min))) group overlay image images) @@ -136,6 +132,8 @@ A list of images is returned." (while (re-search-forward (car entry) end t) (when image (push image images) + (gnus-add-wash-type 'smiley) + (gnus-add-image 'smiley image) (add-text-properties (match-beginning group) (match-end group) `(display ,image @@ -146,12 +144,15 @@ A list of images is returned." images)))) (defun smiley-toggle-buffer (&optional arg) - "Toggle displaying smiley faces. + "Toggle displaying smiley faces in article buffer. With arg, turn displaying on if and only if arg is positive." (interactive "P") - (if (numberp arg) - (setq smiley-active (> arg 0)) - (setq smiley-active (not smiley-active)))) + (gnus-with-article-buffer + (if (if (numberp arg) + (> arg 0) + (not (memq 'smiley gnus-article-wash-types))) + (smiley-region (point-min) (point-max)) + (gnus-delete-images 'smiley)))) (defun smiley-mouse-toggle-buffer (event) "Toggle displaying smiley faces. diff --git a/texi/ChangeLog b/texi/ChangeLog index 385986f..eb55f64 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,21 @@ +2002-01-20 Patric Mueller + + * gnus.texi (Group Timestamp): Typo fix. + +2002-01-19 Lars Magne Ingebrigtsen + + * gnus.texi (Selecting a Group): Addition. + +2002-01-19 Lars Magne Ingebrigtsen + + * gnus.texi (Mail Spool): Note that the .marks files can be + removed. + +2002-01-17 Paul Jarc + + * gnus.texi (Choosing a Mail Back End): mention nnmaildir. + (Comparing Mail Backends): briefly describe nnmaildir. + 2002-01-17 ShengHuo ZHU * gnus.texi (Agent Commands): Use gnus-agent-batch instead of diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index b5a7598..b5536bc 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -2216,6 +2216,10 @@ Gnus $B$O(B @code{gnus-user-format-function-}@samp{X} $B4X?t$r8F$S=P$7$^$9!#$ @item unseen $B$^$@FI$^$l$?$3$H$,L5$$:G=i$N5-;v$NI=Bj$N9T$K%]%$%s%H$r0\F0$5$;$^$9!#(B +@item unseen-or-unread +$B$^$@FI$^$l$?$3$H$,L5$$:G=i$N5-;v$,$"$l$P!"$=$N5-;v$NI=Bj$N9T$K%]%$%s%H$r(B +$B0\F0$5$;!"L5$+$C$?$i:G=i$NL$FI5-;v$NI=Bj$N9T$K%]%$%s%H$r0\F0$5$;$^$9!#(B + @item best $B%9%3%"$,:G$b9b$$L$FI5-;v$NI=Bj$N9T$K%]%$%s%H$r0\F0$5$;$^$9!#(B @end table @@ -4180,10 +4184,12 @@ Gnus $B$K!"$"$J$?$,:G8e$K$$$D%0%k!<%W$rFI$s$@$+$r5-O?$5$;$k$HJXMx$+$b$7$l(B @lisp (setq gnus-group-line-format - "%M\%S\%p\%P\%5y: %(%-40,40g%) %Ud\n") + "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n") (defun gnus-user-format-function-d (headers) (let ((time (gnus-group-timestamp gnus-tmp-group))) - (format-time-string "%b %d %H:%M" time))) + (if time + (format-time-string "%b %d %H:%M" time) + ""))) @end lisp @node File Commands @@ -12920,9 +12926,12 @@ Gnus $B$O%a!<%k%0%k!<%W$rF0:n$9$k$h$&$K$9$k$H%a!<%k%9%W!<%k$rFI$_9~$_$^$9!#(B $B%a!<%k%U%!%$%k$O$^$:$"$J$?$N%[!<%`%G%#%l%/%H%j!<$KJ#A0!#4{DjCM(B $B$,2DG=$G!"(B($B%P%C%/%"%C%W$r(B nnml $B%G%#%l%/%$%H%j$KLa$7$?8e$G(B) @kbd{G m} $B%-!<(B $B$r;H$C$F$=$N%0%k!<%W$r85$KLa$7$^$9!#(B +$B$b$72?$i$+$NM}M3$K$h$C$F(B @file{.marks} $B%U%!%$%k$,$*$+$7$/$J$C$F$$$k$H;W$C(B +$B$?$H$-$O!"C1$K$=$l$iA4It$r>C$7$F$7$^$&$3$H$,$G$-$^$9!#(Bgnus $B$Oe$N%5!<%P!<$N@_Dj(B: @table @code @@ -13335,6 +13348,63 @@ Rand MH $B%a!<%k1\Mw%7%9%F%`$O(B UNIX $B%7%9%F%`$K$+$J$jD9$$4VB8:_$7$F$$$^$9! @code{nnfolder} $B$O:GA1$NA*Br$G$O$"$j$^$;$s$,!"$=$l$J$j$NNL$N%a!<%k$7$+