+2002-01-21 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * 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 <yamaoka@jpl.org>
* lisp/dgnushack.el: Advise `byte-compile-inline-expand' for Mule
+2002-01-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-util.el (gnus-completing-read): Remove
+ inherit-input-method.
+
+2002-01-20 05:33:30 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no>
+
+ * gnus.el: Oort Gnus v0.05 is released.
+
+2002-01-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * 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 <yamaoka@jpl.org>
+
+ * 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 <larsi@gnus.org>
+
+ * gnus-topic.el (gnus-topic-catchup-articles): Update article
+ number in closed topics.
+
+2002-01-19 Daniel Pittman <daniel@rimspace.net>
+
+ * gnus-sum.el (gnus-summary-first-unseen-or-unread-subject): New
+ functions.
+
+2002-01-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * 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 <stodghil@cs.cornell.edu>
+
+ * gnus-agent.el (gnus-category-name): Intern the category name.
+
+2002-01-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-topic.el (gnus-topic-move-group): Use gnus-topic-history.
+
+ * gnus-util.el (gnus-completing-read): New function.
+
+2002-01-19 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * 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 <jas@extundo.com>
+
+ * gnus-util.el (gnus-parent-id): Optimize null n case. From
+ Jesper Harder <harder@ifa.au.dk>.
+
+2002-01-18 TSUCHIYA Masatoshi <tsuchiya@namazu.org>
+
+ * 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 <jas@extundo.com>
+
+ * 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 <zsh@cs.rochester.edu>
+
+ * gnus-art.el (gnus-url-parse-query-string): Allow new line in value.
+
+2002-01-18 Simon Josefsson <jas@extundo.com>
+
+ * 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 <larsi@gnus.org>
* gnus-fun.el (gnus-grab-cam-x-face): New function.
2001-06-03 Dale Hagglund <rdh@best.com>
* gnus-mlspl.el (gnus-group-split-fancy): Fix generation of split
- restrict clauses.
+ restrict clauses.
2001-06-07 16:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
(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 ()
(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."
(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'."
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))
(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))
(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)
(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
(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)
(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)
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
(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.
)
((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))
"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.
(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."
(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:"
(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)
(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 "")
(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.
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))
(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 ") ")
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."
(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
(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.
(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.
;;;###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))
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))
(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
(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"
(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"
(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.
(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.
(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
(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)
;; 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
(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 "\\`<nneething\\-[0-9]+\\-\\([^@]+\\)@.*>\\'" 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."
"Subject: " (file-name-nondirectory file) (or extra-msg "") "\n"
"Message-ID: <nneething-"
(int-to-string (incf nneething-message-id-number))
+ "-" (nneething-encode-file-name file)
"@" (system-name) ">\n"
(if (equal '(0 0) (nth 5 atts)) ""
(concat "Date: " (current-time-string (nth 5 atts)) "\n"))
(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
(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))
(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)
(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)))
(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
(eval-when-compile (require 'cl))
(require 'nnheader)
+(require 'gnus-art)
(defgroup smiley nil
"Turn :-)'s into real images."
(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
(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)
(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
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.
+2002-01-20 Patric Mueller <bhaak@gmx.net>
+
+ * gnus.texi (Group Timestamp): Typo fix.
+
+2002-01-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus.texi (Selecting a Group): Addition.
+
+2002-01-19 Lars Magne Ingebrigtsen <karra@cs.utah.edu>
+
+ * gnus.texi (Mail Spool): Note that the .marks files can be
+ removed.
+
+2002-01-17 Paul Jarc <prj@po.cwru.edu>
+
+ * gnus.texi (Choosing a Mail Back End): mention nnmaildir.
+ (Comparing Mail Backends): briefly describe nnmaildir.
+
2002-01-17 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus.texi (Agent Commands): Use gnus-agent-batch instead of
@item unseen
\e$B$^$@FI$^$l$?$3$H$,L5$$:G=i$N5-;v$NI=Bj$N9T$K%]%$%s%H$r0\F0$5$;$^$9!#\e(B
+@item unseen-or-unread
+\e$B$^$@FI$^$l$?$3$H$,L5$$:G=i$N5-;v$,$"$l$P!"$=$N5-;v$NI=Bj$N9T$K%]%$%s%H$r\e(B
+\e$B0\F0$5$;!"L5$+$C$?$i:G=i$NL$FI5-;v$NI=Bj$N9T$K%]%$%s%H$r0\F0$5$;$^$9!#\e(B
+
@item best
\e$B%9%3%"$,:G$b9b$$L$FI5-;v$NI=Bj$N9T$K%]%$%s%H$r0\F0$5$;$^$9!#\e(B
@end table
@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
\e$B%a!<%k%U%!%$%k$O$^$:$"$J$?$N%[!<%`%G%#%l%/%H%j!<$KJ#<L$5$l$^$9!#$=$N8e$K\e(B
\e$B2?$,5/$3$k$+$O%a!<%k$r$I$NMM<0$GN/$a$?$$$+$K$h$C$FJQ$o$j$^$9!#\e(B
-\e$BI8=`$N\e(B gnus \e$B$G$O8^$D$N0c$C$?%a!<%k%P%C%/%(%s%I$,$"$j!"8DJL$K$5$i$J$k%P%C\e(B
-\e$B%/%(%s%I$r;HMQ2DG=$G$9!#$[$H$s$I$N?M$,;H$&%a!<%k%P%C%/%(%s%I$O\e(B (\e$B$H$$$&$N\e(B
-\e$B$O:GB.$G=@Fp$@$+$i\e(B) @code{nnml} \e$B$G$9\e(B (@pxref{Mail Spool})\e$B!#\e(B
+\e$BI8=`$N\e(B gnus \e$B$G$OO;$D$N0c$C$?%a!<%k%P%C%/%(%s%I$,$"$j!"8DJL$K$5$i$J$k%P%C\e(B
+\e$B%/%(%s%I$r;HMQ2DG=$G$9!#$[$H$s$I$N?M$,;H$&%a!<%k%P%C%/%(%s%I$O\e(B (\e$B$=$l$,$?\e(B
+\e$B$V$s:GB.$@$+$i\e(B) @code{nnml} \e$B$G$9\e(B (@pxref{Mail Spool})\e$B!#$"$J$?$O0J2<$K8^\e(B
+\e$B$D$N%P%C%/%(%s%I$7$+$J$$$3$H$K5$$,IU$/$G$7$g$&\e(B; @code{nnmaildir} \e$B$NJ88%\e(B
+\e$B$O$^$@$3$N%^%K%e%"%k$K40A4$KJTF~$5$l$F$$$J$$$N$G$9!#$=$l$^$G\e(B
+\e$B$O\e(B @uref{http://multivac.cwru.edu./nnmaildir/} \e$B$G8+$D$1$k$3$H$,$G$-$^$9!#\e(B
@menu
* Unix Mail Box:: (\e$B$H$F$b\e(B) \e$BI8=`E*$J\e(B Un*x mbox \e$B$r;H$&\e(B
\e$B$,2DG=$G!"\e(B(\e$B%P%C%/%"%C%W$r\e(B nnml \e$B%G%#%l%/%$%H%j$KLa$7$?8e$G\e(B) @kbd{G m} \e$B%-!<\e(B
\e$B$r;H$C$F$=$N%0%k!<%W$r85$KLa$7$^$9!#\e(B
+\e$B$b$72?$i$+$NM}M3$K$h$C$F\e(B @file{.marks} \e$B%U%!%$%k$,$*$+$7$/$J$C$F$$$k$H;W$C\e(B
+\e$B$?$H$-$O!"C1$K$=$l$iA4It$r>C$7$F$7$^$&$3$H$,$G$-$^$9!#\e(Bgnus \e$B$O<!2s5/F0$9\e(B
+\e$B$k$H$-$K!"$=$l$i$r@5$7$/:F:n@.$9$k$G$7$g$&!#\e(B
+
\e$B;v<B>e$N%5!<%P!<$N@_Dj\e(B:
@table @code
@code{nnfolder} \e$B$O:GA1$NA*Br$G$O$"$j$^$;$s$,!"$=$l$J$j$NNL$N%a!<%k$7$+<u\e(B
\e$B$1<h$i$J$$$J$i!"$*$=$i$/\e(B @code{nnfolder} \e$B$OA4$F$NCf$G0lHVE,$7$?%P%C%/%(\e(B
\e$B%s%I$G$7$g$&!#\e(B
+
+@c TRANSLATE_ME
+@item nnmaildir
+
+@code{nnmaildir} is largely similar to @code{nnml}, with some notable
+differences. Each message is stored in a separate file, but the
+filename is unrelated to the article number in Gnus. @code{nnmaildir}
+also stores the equivalent of @code{nnml}'s overview files in one file
+per article, so it uses about twice as many inodes as @code{nnml}. (Use
+@code{df -i} to see how plentiful your inode supply is.) If this slows
+you down or takes up very much space, consider switching to ReiserFS
+(@uref{http://www.namesys.com/}) or another non-block-structured
+filesystem.
+
+Since maildirs don't require locking for delivery, the maildirs you use
+as groups can also be the maildirs your mail is directly delivered to.
+This means you can skip Gnus's mail splitting if your mail is already
+organized into different mailboxes during delivery. A @code{directory}
+entry in @code{mail-sources} would have a similar effect, but would
+require one set of mailboxes for spooling deliveries (in mbox format,
+thus damaging message bodies), and another set to be used as groups (in
+whatever format you like). A maildir has a built-in spool, in the
+@code{new/} subdirectory. Beware that currently, mail moved from
+@code{new/} to @code{cur/} instead of via mail splitting will undergo
+treatment such as duplicate checking.
+
+An article will not necessarily keep the same number across Gnus
+sessions; articles are renumbered starting from 1 for each Gnus session
+(more precisely, each time you open the @code{nnmaildir} server). This
+way, you don't get gaps in your article number ranges, and when entering
+large groups, Gnus is likely to give a more accurate article count. The
+price is that @code{nnmaildir} doesn't work with the cache or agent.
+This will probably be changed in the future.
+
+@code{nnmaildir} stores article marks for a given group in the
+corresponding maildir, in a way designed so that it's easy to manipulate
+them from outside Gnus. You can tar up a maildir, unpack it somewhere
+else, and still have your marks. @code{nnml} also stores marks, but
+it's not as easy to work with them from outside Gnus as with
+@code{nnmaildir}.
+
+For configuring expiry and other things, @code{nnmaildir} uses group
+parameters slightly different from those of other mail backends.
+
+@code{nnmaildir} uses a significant amount of memory to speed things up.
+(It keeps in memory some of the things that @code{nnml} stores in files
+and that @code{nnmh} repeatedly parses out of message files.) If this
+is a problem for you, you can set the @code{nov-cache-size} group
+parameter to somthing small (0 would probably not work, but 1 probably
+would) to make it use less memory.
+
+Startup and shutdown are likely to be slower with @code{nnmaildir} than
+with other backends. Everything in between is likely to be faster,
+depending in part on your filesystem.
+
+@code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
+to write an @code{nnmaildir}-derived backend.
@end table
@node Browsing the Web
@item unseen
Place point on the subject line of the first unseen article.
+@item unseen-or-unread
+Place point on the subject line of the first unseen article, and if
+there is no such article, place point on the subject line of the first
+unread article.
+
@item best
Place point on the subject line of the highest-scored unread article.
@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
file is first copied to your home directory. What happens after that
depends on what format you want to store your mail in.
-There are five different mail back ends in the standard Gnus, and more
+There are six different mail back ends in the standard Gnus, and more
back ends are available separately. The mail back end most people use
-(because it is the fastest and most flexible) is @code{nnml}
-(@pxref{Mail Spool}).
+(because it is possibly the fastest) is @code{nnml} (@pxref{Mail
+Spool}). You might notice that only five back ends are listed below;
+@code{nnmaildir}'s documentation has not yet been completely
+incorporated into this manual. Until it is, you can find it at
+@uref{http://multivac.cwru.edu./nnmaildir/}.
@menu
* Unix Mail Box:: Using the (quite) standard Un*x mbox.
to restore the group (after restoring the backup into the nnml
directory).
+If for some reason you believe your @file{.marks} files are screwed
+up, you can just delete them all. Gnus will then correctly regenerate
+them next time it starts.
+
Virtual server settings:
@table @code
only a moderate amount of mail, @code{nnfolder} is probably the most
friendly mail back end all over.
+@item nnmaildir
+
+@code{nnmaildir} is largely similar to @code{nnml}, with some notable
+differences. Each message is stored in a separate file, but the
+filename is unrelated to the article number in Gnus. @code{nnmaildir}
+also stores the equivalent of @code{nnml}'s overview files in one file
+per article, so it uses about twice as many inodes as @code{nnml}. (Use
+@code{df -i} to see how plentiful your inode supply is.) If this slows
+you down or takes up very much space, consider switching to ReiserFS
+(@uref{http://www.namesys.com/}) or another non-block-structured
+filesystem.
+
+Since maildirs don't require locking for delivery, the maildirs you use
+as groups can also be the maildirs your mail is directly delivered to.
+This means you can skip Gnus's mail splitting if your mail is already
+organized into different mailboxes during delivery. A @code{directory}
+entry in @code{mail-sources} would have a similar effect, but would
+require one set of mailboxes for spooling deliveries (in mbox format,
+thus damaging message bodies), and another set to be used as groups (in
+whatever format you like). A maildir has a built-in spool, in the
+@code{new/} subdirectory. Beware that currently, mail moved from
+@code{new/} to @code{cur/} instead of via mail splitting will undergo
+treatment such as duplicate checking.
+
+An article will not necessarily keep the same number across Gnus
+sessions; articles are renumbered starting from 1 for each Gnus session
+(more precisely, each time you open the @code{nnmaildir} server). This
+way, you don't get gaps in your article number ranges, and when entering
+large groups, Gnus is likely to give a more accurate article count. The
+price is that @code{nnmaildir} doesn't work with the cache or agent.
+This will probably be changed in the future.
+
+@code{nnmaildir} stores article marks for a given group in the
+corresponding maildir, in a way designed so that it's easy to manipulate
+them from outside Gnus. You can tar up a maildir, unpack it somewhere
+else, and still have your marks. @code{nnml} also stores marks, but
+it's not as easy to work with them from outside Gnus as with
+@code{nnmaildir}.
+
+For configuring expiry and other things, @code{nnmaildir} uses group
+parameters slightly different from those of other mail backends.
+
+@code{nnmaildir} uses a significant amount of memory to speed things up.
+(It keeps in memory some of the things that @code{nnml} stores in files
+and that @code{nnmh} repeatedly parses out of message files.) If this
+is a problem for you, you can set the @code{nov-cache-size} group
+parameter to somthing small (0 would probably not work, but 1 probably
+would) to make it use less memory.
+
+Startup and shutdown are likely to be slower with @code{nnmaildir} than
+with other backends. Everything in between is likely to be faster,
+depending in part on your filesystem.
+
+@code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
+to write an @code{nnmaildir}-derived backend.
+
@end table