From: yamaoka Date: Mon, 14 Apr 2003 12:09:40 +0000 (+0000) Subject: Import Oort Gnus v0.18. X-Git-Tag: ognus-0_18~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4c03c5964e7e010e3af3fe99aba43ab4eb47846f;p=elisp%2Fgnus.git- Import Oort Gnus v0.18. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 84fb561..fc2b63a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,291 @@ +2003-04-13 01:12:01 Lars Magne Ingebrigtsen + + * gnus.el: Oort Gnus v0.18 is released. + +2003-04-13 Lars Magne Ingebrigtsen + + * gnus-draft.el (gnus-draft-send): Add message-hidden-headers. + +2003-04-12 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-article-next-page): Use + gnus-article-over-scroll. + (gnus-article-over-scroll): New variable. + + * message.el (message-newline-and-reformat): Place a boundary + before filling. + (message-make-forward-subject-function): Changed default to + message-forward-subject-name-subject. + (message-forward-subject-name-subject): New function. + + * nnimap.el (nnimap-split-fancy): Ditto. + + * gnus-sum.el (gnus-summary-line-message-size): Ditto. + + * gnus-cus.el (gnus-group-parameters): Removed "which see". + + * mml.el (mml-minibuffer-read-file): Bind + completion-ignored-extensions to nil. + + * message.el (message-fix-before-sending): Comment fix. + (message-fix-before-sending): Make hidden headers visible. + (message-hide-headers): Bind after-change-functions to nil. + (message-forbidden-properties): Put invisible and intangible + back. + (message-strip-forbidden-properties): Ignore message-hidden text. + + * gnus-msg.el: Hide headers. + + * message.el (message-hidden-headers): New variable. + (message-hide-headers): New function. + (message-hide-header-p): New function. + (message-hide-header-p): Change logic. + (message-forbidden-properties): Remove intangible nil invisible + nil. + (message-hide-headers): Narrow to headers. + + * lpath.el (featurep): Bind Info-directory, Info-menu. + +2003-04-12 Jesper Harder + + * mm-bodies.el (mm-body-charset-encoding-alist): UTF-16 *must* be + encoded. + (mm-encode-body): Don't corrupt UTF-16. + (mm-body-encoding): Pay attention to mm-body-charset-encoding-alist. + +2003-04-10 Kevin Greiner + + * gnus-agent.el (gnus-agent-get-undownloaded-list): Articles in + the CACHE are now detected and handled the same as an article + downloaded into the agent. + (gnus-agent-group-path): Modified to match nnmail-group-pathname + so that the agent front-end and back-end (nnagent) always use the + same directory. + (gnus-agent-group-pathname): New function. Wrapper for + nnmail-group-pathname. + (gnus-agent-expire-unagentized-dirs): New variable. May be + customized to disable gnus-agent-expire-unagentized-dirs. + (gnus-agent-expire-unagentized-dirs): Expand gnus-agent-directory + as the directories in gnus-agent-expire-current-dirs were + expanded. + +2003-04-10 Jesper Harder + + * gnus-sum.el (gnus-summary-make-menu-bar): Disable "Encrypt + body" entry in read only groups. + +2003-04-09 Jesper Harder + + * gnus-sum.el (gnus-summary-make-menu-bar): Disable "Import file" + and "Create article" items in non-editable groups. + +2003-04-09 Kevin Greiner + + * gnus-agent.el (gnus-agent-write-active): Added option of + replacing, rather than updating, the agent's active file. Do NOT + use the fully qualified group name as gnus-active-to-gnus-format + blindly prefixes group names with server names. + (gnus-agent-save-group-info): Merge BOTH min/max of current active + range, was just merging min, with specified active range. + (gnus-agent-expire): Save agent's active ranges after + expiring all groups. + (gnus-agent-expire-group-1): Update min of agent's active range to + min article currently fetched. + (gnus-agent-expire-unagentized-dirs): Avoid asking to delete the + same ancestor multiple times. + + * gnus-async.el (gnus-asynchronous): Moved defcustom of + gnus-asynchronous away from defgroup of gnus-asynchronous. This + seems to fix an intermittant error in which loading gnus-async + fails to define gnus-asynchronous (the variable). + + * gnus-sum.el: Concur with Steve Young, 5th argument to 'load' is + non-essential. Removed on all platforms. + (gnus-select-newsgroup): When the agent is active, expand the + group's active range to include fetched articles that are no + longer in the server's active range. + + * gnus-util.el (gnus-with-output-to-file): Removed all of the + print-* bindings as they should be handled by the function doing + the printing. + +2003-04-09 Jesper Harder + + * mm-uu.el (mm-uu-copy-to-buffer): buffer-file-coding-system + might be unbound in non-MULE XEmacsen. + +2003-04-08 Jesper Harder + + * mm-uu.el (mm-uu-diff-groups-regexp, mm-uu-type-alist) + (mm-uu-diff-extract, mm-uu-diff-test): New functionality: + recognize diffs. + + * mm-bodies.el (mm-decode-body): Use the supplied charset + unconditionally if `code-pages' hasn't been loaded. + +2003-04-07 Jesper Harder + + * gnus-art.el (article-verify-x-pgp-sig): Don't use + `insert-buffer', the docstring says "This function is meant for + the user to run interactively. Don't call it from programs!" + + * mm-extern.el (mm-extern-mail-server): do. + + * mml1991.el (mml1991-mailcrypt-sign, mml1991-mailcrypt-sign) + (mml1991-gpg-sign, mml1991-gpg-encrypt, mml1991-pgg-sign) + (mml1991-pgg-encrypt): do. + + * pgg.el (pgg-decrypt-region): do. + + * mm-view.el (mm-view-pkcs7-decrypt): do. + + * mml-smime.el (mml-smime-verify): do. + + * mml.el (mml-insert-mime, mml-preview): do. + + * mml2015.el (mml2015-gpg-decrypt-1, mml2015-gpg-sign) + (mml2015-gpg-encrypt, mml2015-pgg-clear-decrypt) + (mml2015-pgg-encrypt): do. + +2003-04-06 Katsumi Yamaoka + + * mm-bodies.el (mm-decode-body): Silence XEmacs when compiling. + +2003-04-06 Jesper Harder + + * mm-uu.el (mm-uu-copy-to-buffer): Copy + `buffer-file-coding-system' to the new buffer. + (mm-uu-pgp-signed-extract-1): Don't copy + `buffer-file-coding-system' here. + + * mm-bodies.el (mm-decode-body): last-coding-system-used doesn't + exist in XEmacs. + (mm-decode-body): Add missing quote. + + * mm-uu.el (mm-uu-pgp-signed-extract-1): Set + buffer-file-coding-system. + + * mm-bodies.el (mm-decode-body): Set buffer-file-coding-system to + last-coding-system-used. + + * mml2015.el (mml2015-pgg-clear-verify): Encode the text + according to buffer-file-coding-system. + + * pgg-gpg.el (pgg-gpg-process-region): Revert previous change. + + * pgg-pgp.el (pgg-pgp-process-region, pgg-pgp-verify-region) + (pgg-pgp-snarf-keys-region): do. + + * pgg-pgp5.el (pgg-pgp5-verify-region) + (pgg-pgp5-snarf-keys-region, pgg-pgp5-process-region): do. + + * pgg.el (pgg-make-temp-file, pgg-temporary-file-directory): do. + +2003-04-05 Teodor Zlatanov + + * spam.el (spam-split): (save-excursion) around (widen) + (spam-ham-move-routine): Use spam-group-ham-mark-p, not + spam-group-spam-mark-p (from Michael Shields ) + +2003-04-05 Steve Youngs + + * gnus-sum.el: XEmacs doesn't support the 5th arg to 'load', so + don't use it when loading gnus-sum.el if we're in XEmacs. + +2003-04-05 Kevin Greiner + + * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bound + print-escape-nonascii to fix more characters in compiled format + specs. + +2003-04-05 Jesper Harder + + * gnus-audio.el (gnus-audio-au-player, gnus-audio-wav-player): + Fix customization type. + +2003-04-04 Kevin Greiner + + * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bound + print-quoted, print-readably, print-escape-multibyte, and + print-level to match original behavior of gnus-prin1. This should + repair the format of .newsrc.eld when using compiled format specs. + +2003-04-04 Jesper Harder + + * gnus-group.el (tool-bar-map): defvar it. + + * gnus-art.el (tool-bar-map): do. + + * gnus-sum.el (tool-bar-map): do. + +2003-04-03 Jesper Harder + + * earcon.el (earcon-regexp-alist): catmeow is a wav file. + +2003-04-03 Reiner Steib + + * gnus-art.el (gnus-button-ctan-directory-regexp): Changed meaning + and value. + (gnus-button-alist): Use it. + +2003-04-03 Jesper Harder + + * pgg-gpg.el (pgg-gpg-process-region): do. + + * pgg-pgp.el (pgg-pgp-process-region, pgg-pgp-verify-region) + (pgg-pgp-snarf-keys-region): do. + + * pgg-pgp5.el (pgg-pgp5-verify-region) + (pgg-pgp5-snarf-keys-region, pgg-pgp5-process-region): Use it. + + * pgg.el (pgg-make-temp-file): New function. `make-temp-name' is + unsafe. + (pgg-temporary-file-directory): Remove. + +2003-04-02 Katsumi Yamaoka + + * lpath.el: Fbind Info-directory and Info-menu. + +2003-04-02 Reiner Steib + + * gnus-util.el (gnus-message): Added doc-string. + + * gnus-score.el (gnus-score-find-trace): Changed behavior of `q'. + (gnus-score-edit-file-at-point): Goto first match when using `e'. + +2003-04-01 Reiner Steib + + * gnus-art.el (gnus-button-ctan-directory-regexp): New variable. + (gnus-button-alist): Use it. Changed CTAN and "setq" entries. + +2003-04-01 Katsumi Yamaoka + + * nntp.el (nntp-via-rlogin-command-switches): Doc fix. + (nntp-open-via-rlogin-and-telnet): Disable the telnet linemode. + +2003-03-31 Kevin Greiner + + * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bound + print-escape-newlines to print escape sequences rather than + literal newline characters. + +2003-03-31 Reiner Steib + + * gnus-art.el (gnus-button-valid-fqdn-regexp): Use + `message-valid-fqdn-regexp' for initialization. + (gnus-button-handle-info-url): Renamed and extended version of + `gnus-button-handle-info'. + (gnus-button-message-level): Renamed from `gnus-button-mail-level' + (gnus-button-handle-symbol, gnus-button-handle-library) + (gnus-button-handle-info-keystrokes): New functions. + (gnus-button-browse-level): New variable. + (gnus-button-alist): Use them. Added levels. + (gnus-header-button-alist): Added levels. + +2003-03-31 Lars Magne Ingebrigtsen + + * gnus.el (gnus-version-number): Bump. + 2003-03-31 20:08:19 Lars Magne Ingebrigtsen * gnus.el: Oort Gnus v0.17 is released. @@ -49,7 +337,7 @@ 2003-03-28 Vasily Korytov * message.el (message-make-in-reply-to): Use - mail-extract-address-components to dentermine sender's + mail-extract-address-components to determine sender's name/address. 2003-03-30 Lars Magne Ingebrigtsen @@ -339,7 +627,7 @@ 2003-03-18 Jesper Harder * mm-bodies.el (mm-decode-coding-region-safely): Don't use - find-charset-region which is slooow in XEmacs. + find-charset-string which is slooow in XEmacs. 2003-03-18 Katsumi Yamaoka diff --git a/lisp/earcon.el b/lisp/earcon.el index faa38c5..e9691e1 100644 --- a/lisp/earcon.el +++ b/lisp/earcon.el @@ -1,6 +1,6 @@ ;;; earcon.el --- Sound effects for messages -;; Copyright (C) 1996, 2000, 2001 Free Software Foundation +;; Copyright (C) 1996, 2000, 2001, 2003 Free Software Foundation ;; Author: Steven L. Baur @@ -50,7 +50,7 @@ ("evil[ \t]+laugh" 1 "Evil_Laugh.au") ("gag\\|puke" 1 "Puke.au") ("snicker" 1 "Snicker.au") - ("meow" 1 "catmeow.au") + ("meow" 1 "catmeow.wav") ("sob\\|boohoo" 1 "cry.wav") ("drum[ \t]*roll" 1 "drumroll.au") ("blast" 1 "explosion.au") diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 18397bc..114685a 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -26,6 +26,7 @@ (require 'gnus) (require 'gnus-cache) +(require 'nnmail) (require 'nnvirtual) (require 'gnus-sum) (require 'gnus-score) @@ -168,6 +169,11 @@ enable expiration per categories, topics, and groups." :type '(radio (const :format "Enable " ENABLE) (const :format "Disable " DISABLE))) +(defcustom gnus-agent-expire-unagentized-dirs t +"Have gnus-agent-expire scan the directories under +\(gnus-agent-directory) for groups that are no longer agentized. When +found, offer to remove them.") + ;;; Internal variables (defvar gnus-agent-history-buffers nil) @@ -392,6 +398,10 @@ manipulated as follows: (defmacro gnus-agent-append-to-list (tail value) `(setq ,tail (setcdr ,tail (cons ,value nil)))) +(defmacro gnus-agent-message (level &rest args) + `(if (<= ,level gnus-verbose) + (message ,@args))) + ;;; ;;; Mode infestation ;;; @@ -892,6 +902,7 @@ article's mark is toggled." (headers (sort (mapcar (lambda (h) (mail-header-number h)) gnus-newsgroup-headers) '<)) + (cached (and gnus-use-cache gnus-newsgroup-cached)) (undownloaded (list nil)) (tail-undownloaded undownloaded) (unfetched (list nil)) @@ -918,7 +929,14 @@ article's mark is toggled." (t (pop alist) (pop headers) - (gnus-agent-append-to-list tail-undownloaded a))))) + + ;; This article isn't in the agent. Check to see + ;; if it is in the cache. If it is, it's been + ;; downloaded. + (while (and cached (< (car cached) a)) + (pop cached)) + (unless (equal a (car cached)) + (gnus-agent-append-to-list tail-undownloaded a)))))) (while headers (let ((num (pop headers))) @@ -1023,6 +1041,15 @@ This can be added to `gnus-select-article-hook' or ;;; Internal functions ;;; +;;; NOTES: +;;; The agent's active range is defined as follows: +;;; If the agent has no record of the group, use the actual active +;;; range. +;;; If the agent has a record, set the agent's active range to +;;; include the max limit of the actual active range. +;;; When expiring, update the min limit to match the smallest of the +;;; min article not expired or the min actual active range. + (defun gnus-agent-save-active (method) (gnus-agent-save-active-1 method 'gnus-active-to-gnus-format)) @@ -1036,32 +1063,41 @@ This can be added to `gnus-select-article-hook' or (erase-buffer) (nnheader-insert-file-contents file)))) -(defun gnus-agent-write-active (file new) - (let ((orig (gnus-make-hashtable (count-lines (point-min) (point-max)))) - (file (gnus-agent-lib-file "active")) - elem osym) - (when (file-exists-p file) +(defun gnus-agent-write-active (file new &optional literal-replacement) + (let ((old new)) + (when (and (not literal-replacement) + (file-exists-p file)) + (setq old (gnus-make-hashtable (count-lines (point-min) (point-max)))) (with-temp-buffer - (nnheader-insert-file-contents file) - (gnus-active-to-gnus-format nil orig)) + (nnheader-insert-file-contents file) + (gnus-active-to-gnus-format nil old)) + ;; Iterate over the current active groups, the current active + ;; range may expand, but NOT CONTRACT, the agent's active range. (mapatoms - (lambda (sym) - (when (and sym (boundp sym)) - (if (and (boundp (setq osym (intern (symbol-name sym) orig))) - (setq elem (symbol-value osym))) - (progn - (if (and (integerp (car (symbol-value sym))) - (> (car elem) (car (symbol-value sym)))) - (setcar elem (car (symbol-value sym)))) - (if (integerp (cdr (symbol-value sym))) - (setcdr elem (cdr (symbol-value sym))))) - (set (intern (symbol-name sym) orig) (symbol-value sym))))) + (lambda (nsym) + (let ((new-active (and nsym (boundp nsym) (symbol-value nsym)))) + (when new-active + (let* ((osym (intern (symbol-name nsym) old)) + (old-active (and (boundp osym) (symbol-value osym)))) + (if old-active + (let ((new-min (car new-active)) + (old-min (car old-active)) + (new-max (cdr new-active)) + (old-max (cdr old-active))) + (if (and (integerp new-min) + (< new-min old-min)) + (setcar old-active new-min)) + (if (and (integerp new-max) + (> new-max old-max)) + (setcdr old-active new-max))) + (set osym new-active)))))) new)) (gnus-make-directory (file-name-directory file)) (let ((nnmail-active-file-coding-system gnus-agent-file-coding-system)) - ;; The hashtable contains real names of groups, no more prefix - ;; removing, so set `full' to `t'. - (gnus-write-active-file file orig t)))) + ;; The hashtable contains real names of groups. However, do NOT + ;; add the foreign server prefix as gnus-active-to-gnus-format + ;; will add it while reading the file. + (gnus-write-active-file file old nil)))) (defun gnus-agent-save-groups (method) (gnus-agent-save-active-1 method 'gnus-groups-to-gnus-format)) @@ -1072,39 +1108,55 @@ This can be added to `gnus-select-article-hook' or (coding-system-for-write nnheader-file-coding-system) (file-name-coding-system nnmail-pathname-coding-system) (file (gnus-agent-lib-file "active")) - oactive-min) + oactive-min oactive-max) (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) (when (file-exists-p file) - (nnheader-insert-file-contents file)) - (goto-char (point-min)) - (when (re-search-forward - (concat "^" (regexp-quote group) " ") nil t) - (save-excursion - (read (current-buffer)) ;; max - (setq oactive-min (read (current-buffer)))) ;; min - (gnus-delete-line)) + (nnheader-insert-file-contents file) + + (goto-char (point-min)) + (when (re-search-forward + (concat "^" (regexp-quote group) " ") nil t) + (save-excursion + (setq oactive-max (read (current-buffer)) ;; max + oactive-min (read (current-buffer)))) ;; min + (gnus-delete-line))) (insert (format "%S %d %d y\n" (intern group) - (cdr active) - (or oactive-min (car active)))) + (max (or oactive-max (cdr active)) (cdr active)) + (min (or oactive-min (car active)) (car active)))) (goto-char (point-max)) (while (search-backward "\\." nil t) (delete-char 1)))))) (defun gnus-agent-group-path (group) "Translate GROUP into a file name." - (if nnmail-use-long-file-names - (gnus-group-real-name group) - (nnheader-translate-file-chars - (nnheader-replace-chars-in-string - (nnheader-replace-duplicate-chars-in-string - (nnheader-replace-chars-in-string - (gnus-group-real-name group) - ?/ ?_) - ?. ?_) - ?. ?/)))) + + ;; NOTE: This is what nnmail-group-pathname does as of Apr 2003. + ;; The two methods must be kept synchronized, which is why + ;; gnus-agent-group-pathname was added. + + (setq group + (nnheader-translate-file-chars + (nnheader-replace-duplicate-chars-in-string + (nnheader-replace-chars-in-string + (gnus-group-real-name group) + ?/ ?_) + ?. ?_))) + (if (or nnmail-use-long-file-names + (file-directory-p (expand-file-name group (gnus-agent-directory)))) + group + (mm-encode-coding-string + (nnheader-replace-chars-in-string group ?. ?/) + nnmail-pathname-coding-system))) + +(defun gnus-agent-group-pathname (group) + "Translate GROUP into a file name." + ;; nnagent uses nnmail-group-pathname to read articles while + ;; unplugged. The agent must, therefore, use the same directory + ;; while plugged. + (nnmail-group-pathname (gnus-group-real-name group) (gnus-agent-directory))) (defun gnus-agent-get-function (method) (if (gnus-online method) @@ -1201,9 +1253,7 @@ This can be added to `gnus-select-article-hook' or (when (or (cdr selected-sets) (car selected-sets)) (let* ((fetched-articles (list nil)) (tail-fetched-articles fetched-articles) - (dir (concat - (gnus-agent-directory) - (gnus-agent-group-path group) "/")) + (dir (gnus-agent-group-pathname group)) (date (time-to-days (current-time))) (case-fold-search t) pos crosses id) @@ -1699,8 +1749,7 @@ FILE and places the combined headers into `nntp-server-buffer'." (defun gnus-agent-article-name (article group) (expand-file-name article (file-name-as-directory - (expand-file-name (gnus-agent-group-path group) - (gnus-agent-directory))))) + (gnus-agent-group-pathname group)))) (defun gnus-agent-batch-confirmation (msg) "Show error message and return t." @@ -2406,34 +2455,28 @@ FORCE is equivalent to setting the expiration predicates to true." (overview (gnus-get-buffer-create " *expire overview*")) orig) (unwind-protect - (when (file-exists-p (gnus-agent-lib-file "active")) - (with-temp-buffer - (nnheader-insert-file-contents - (gnus-agent-lib-file "active")) - (gnus-active-to-gnus-format - gnus-command-method - (setq orig (gnus-make-hashtable - (count-lines (point-min) (point-max)))))) - (save-excursion - (gnus-agent-expire-group-1 - group overview (gnus-gethash-safe group orig) - articles force))) + (let ((active-file (gnus-agent-lib-file "active"))) + (when (file-exists-p active-file) + (with-temp-buffer + (nnheader-insert-file-contents active-file) + (gnus-active-to-gnus-format + gnus-command-method + (setq orig (gnus-make-hashtable + (count-lines (point-min) (point-max)))))) + (save-excursion + (gnus-agent-expire-group-1 + group overview (gnus-gethash-safe group orig) + articles force)) + (gnus-agent-write-active active-file orig t))) (kill-buffer overview)))) (gnus-message 4 "Expiry...done"))) -(defmacro gnus-agent-message (level &rest args) - `(if (<= ,level gnus-verbose) - (message ,@args))) - (defun gnus-agent-expire-group-1 (group overview active articles force) ;; Internal function - requires caller to have set ;; gnus-command-method, initialized overview buffer, and to have ;; provided a non-nil active - (let ((dir (concat - (gnus-agent-directory) - (gnus-agent-group-path group) - "/"))) + (let ((dir (gnus-agent-group-pathname group))) (when (boundp 'gnus-agent-expire-current-dirs) (set 'gnus-agent-expire-current-dirs (cons dir @@ -2694,7 +2737,8 @@ missing NOV entry. Run gnus-agent-regenerate-group to restore it."))) ;; If considering all articles is set, I can only ;; expire article IDs that are no longer in the - ;; active range. + ;; active range (That is, articles that preceed the + ;; first article in the new alist). (if (and gnus-agent-consider-all-articles (>= article-number (car active))) ;; I have to keep this ID in the alist @@ -2726,7 +2770,12 @@ expiration tests failed." article-number) (let ((inhibit-quit t)) (unless (equal alist gnus-agent-article-alist) (setq gnus-agent-article-alist alist) - (gnus-agent-save-alist group)) + (gnus-agent-save-alist group) + + ;; The active list changed, set the agent's active range + ;; to match the beginning of the list. + (if alist + (setcar active (caar alist)))) (when (buffer-modified-p) (let ((coding-system-for-write @@ -2767,35 +2816,37 @@ articles in every agentized group.")) (setq overview (gnus-get-buffer-create " *expire overview*")) (unwind-protect (while (setq gnus-command-method (pop methods)) - (when (file-exists-p (gnus-agent-lib-file "active")) - (with-temp-buffer - (nnheader-insert-file-contents - (gnus-agent-lib-file "active")) - (gnus-active-to-gnus-format - gnus-command-method - (setq orig (gnus-make-hashtable - (count-lines (point-min) (point-max)))))) - (dolist (expiring-group (gnus-groups-from-server - gnus-command-method)) - (let* ((active - (gnus-gethash-safe expiring-group orig))) + (let ((active-file (gnus-agent-lib-file "active"))) + (when (file-exists-p active-file) + (with-temp-buffer + (nnheader-insert-file-contents active-file) + (gnus-active-to-gnus-format + gnus-command-method + (setq orig (gnus-make-hashtable + (count-lines (point-min) (point-max)))))) + (dolist (expiring-group (gnus-groups-from-server + gnus-command-method)) + (let* ((active + (gnus-gethash-safe expiring-group orig))) - (when active - (save-excursion - (gnus-agent-expire-group-1 - expiring-group overview active articles force))))))) + (when active + (save-excursion + (gnus-agent-expire-group-1 + expiring-group overview active articles force))))) + (gnus-agent-write-active active-file orig t)))) (kill-buffer overview)) (gnus-agent-expire-unagentized-dirs) (gnus-message 4 "Expiry...done"))))) (defun gnus-agent-expire-unagentized-dirs () - (when (boundp 'gnus-agent-expire-current-dirs) + (when (and gnus-agent-expire-unagentized-dirs + (boundp 'gnus-agent-expire-current-dirs)) (let* ((keep (gnus-make-hashtable)) ;; Formally bind gnus-agent-expire-current-dirs so that the ;; compiler will not complain about free references. (gnus-agent-expire-current-dirs (symbol-value 'gnus-agent-expire-current-dirs)) - dir) + dir) (gnus-sethash gnus-agent-directory t keep) (while gnus-agent-expire-current-dirs @@ -2806,57 +2857,69 @@ articles in every agentized group.")) (gnus-sethash dir t keep) (setq dir (file-name-directory (directory-file-name dir)))))) - (let* (to-remove - checker - (checker - (function - (lambda (d) - (let ((files (directory-files d)) - file) - (while (setq file (pop files)) - (cond ((equal file ".") - nil) - ((equal file "..") - nil) - ((equal file ".overview") - (let ((d (file-name-as-directory d)) - r) - (while (not (gnus-gethash - (setq d (file-name-directory d)) keep)) - (setq r d - d (directory-file-name d))) - (if r - (push r to-remove)))) - ((file-directory-p (setq file (nnheader-concat d file))) - (funcall checker file))))))))) - (funcall checker gnus-agent-directory) - - (when (and to-remove - (gnus-y-or-n-p - "gnus-agent-expire has identified local directories that are\ + (let* (to-remove + checker + (checker + (function + (lambda (d) + "Given a directory, check it and its subdirectories for + membership in the keep hash. If it isn't found, add + it to to-remove." + (let ((files (directory-files d)) + file) + (while (setq file (pop files)) + (cond ((equal file ".") ; Ignore self + nil) + ((equal file "..") ; Ignore parent + nil) + ((equal file ".overview") + ;; Directory must contain .overview to be + ;; agent's cache of a group. + (let ((d (file-name-as-directory d)) + r) + ;; Search ancestor's for last directory NOT + ;; found in keep hash. + (while (not (gnus-gethash + (setq d (file-name-directory d)) keep)) + (setq r d + d (directory-file-name d))) + ;; if ANY ancestor was NOT in keep hash and + ;; it it's already in to-remove, add it to + ;; to-remove. + (if (and r + (not (member r to-remove))) + (push r to-remove)))) + ((file-directory-p (setq file (nnheader-concat d file))) + (funcall checker file))))))))) + (funcall checker (expand-file-name gnus-agent-directory)) + + (when (and to-remove + (or gnus-expert-user + (gnus-y-or-n-p + "gnus-agent-expire has identified local directories that are\ not currently required by any agentized group. Do you wish to consider\ - deleting them?")) - (while to-remove - (let ((dir (pop to-remove))) - (if (gnus-y-or-n-p (format "Delete %s?" dir)) - (let* (delete-recursive - (delete-recursive - (function - (lambda (f-or-d) - (ignore-errors - (if (file-directory-p f-or-d) - (condition-case nil - (delete-directory f-or-d) - (file-error - (mapcar (lambda (f) - (or (member f '("." "..")) - (funcall delete-recursive - (nnheader-concat - f-or-d f)))) - (directory-files f-or-d)) - (delete-directory f-or-d))) - (delete-file f-or-d))))))) - (funcall delete-recursive dir)))))))))) + deleting them?"))) + (while to-remove + (let ((dir (pop to-remove))) + (if (gnus-y-or-n-p (format "Delete %s?" dir)) + (let* (delete-recursive + (delete-recursive + (function + (lambda (f-or-d) + (ignore-errors + (if (file-directory-p f-or-d) + (condition-case nil + (delete-directory f-or-d) + (file-error + (mapcar (lambda (f) + (or (member f '("." "..")) + (funcall delete-recursive + (nnheader-concat + f-or-d f)))) + (directory-files f-or-d)) + (delete-directory f-or-d))) + (delete-file f-or-d))))))) + (funcall delete-recursive dir)))))))))) ;;;###autoload (defun gnus-agent-batch () @@ -3064,10 +3127,7 @@ has been fetched." (not gnus-plugged)) (numberp article)) (let* ((gnus-command-method (gnus-find-method-for-group group)) - (file (concat - (gnus-agent-directory) - (gnus-agent-group-path group) "/" - (number-to-string article))) + (file (gnus-agent-article-name (number-to-string article) group)) (buffer-read-only nil)) (when (and (file-exists-p file) (> (nth 7 (file-attributes file)) 0)) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 9a895b9..8a606c8 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -26,7 +26,9 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile + (require 'cl) + (defvar tool-bar-map)) (require 'gnus) (require 'gnus-sum) @@ -39,6 +41,7 @@ (require 'mm-view) (require 'wid-edit) (require 'mm-uu) +(require 'message) (autoload 'gnus-msg-mail "gnus-msg" nil t) (autoload 'gnus-button-mailto "gnus-msg") @@ -1329,6 +1332,11 @@ This requires GNU Libidn, and by default only enabled if it is found." :group 'gnus-article-headers :type 'boolean) +(defcustom gnus-article-over-scroll nil + "If non-nil, allow scrolling the article buffer even when there no more text." + :group 'gnus-article + :type 'boolean) + ;;; Internal variables (defvar gnus-english-month-names @@ -3300,7 +3308,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is mml2015-use (mml2015-clear-verify-function)) (with-temp-buffer - (insert-buffer gnus-original-article-buffer) + (insert-buffer-substring gnus-original-article-buffer) (setq items (split-string sig)) (message-narrow-to-head) (let ((inhibit-point-motion-hooks t) @@ -4887,10 +4895,11 @@ If end of article, return non-nil. Otherwise return nil. Argument LINES specifies lines to be scrolled up." (interactive "p") (move-to-window-line -1) - (if (save-excursion - (end-of-line) - (and (pos-visible-in-window-p) ;Not continuation line. - (>= (1+ (point)) (point-max)))) ;Allow for trailing newline. + (if (and (not gnus-article-over-scroll) + (save-excursion + (end-of-line) + (and (pos-visible-in-window-p) ;Not continuation line. + (>= (1+ (point)) (point-max))))) ;Allow for trailing newline. ;; Nothing in this page. (if (or (not gnus-page-broken) (save-excursion @@ -5562,13 +5571,7 @@ groups." :type 'regexp) (defcustom gnus-button-valid-fqdn-regexp - (concat "[a-z0-9][-.a-z0-9]+\\." ;; [hostname.subdomain.]domain. - ;; valid TLDs: - "\\([a-z][a-z]" ;; two letter country TDLs - "\\|biz\\|com\\|edu\\|gov\\|int\\|mil\\|net\\|org" - "\\|aero\\|coop\\|info\\|name\\|museum" - "\\|arpa\\|pro\\|uucp\\|bitnet\\|bofh" ;; old style? - "\\)") + message-valid-fqdn-regexp "Regular expression that matches a valid FQDN." :group 'gnus-article-buttons :type 'regexp) @@ -5607,6 +5610,18 @@ The function must take one argument, the string naming the URL." :type '(choice (const "^/?tex-archive/\\|/") (regexp :tag "Other"))) +(defcustom gnus-button-ctan-directory-regexp + (concat + "\\("; Cannot use `\(?: ... \)' (compatibility with Emacs 20). + "biblio\\|digests\\|dviware\\|fonts\\|graphics\\|help\\|" + "indexing\\|info\\|language\\|macros\\|support\\|systems\\|" + "tds\\|tools\\|usergrps\\|web\\|nonfree\\|obsolete" + "\\)") + "Regular expression for ctan directories. +It should match all directories in the top level of `gnus-ctan-url'." + :group 'gnus-article-buttons + :type 'regexp) + (defcustom gnus-button-mid-or-mail-regexp (concat "\\b\\(\")!;:,{}\n\t ]*@" gnus-button-valid-fqdn-regexp @@ -5638,12 +5653,12 @@ must return `mid', `mail', `invalid' or `ask'." (-5.0 . "@[Nn][Ee][Ww][Ss]") ;; /\@news/i (-5.0 . "@.*[Dd][Ii][Aa][Ll][Uu][Pp]") ;; /\@.*dialup/i; (-1.0 . "^[^a-z]+@") - + ;; (-5.0 . "\\.[0-9][0-9]+.*@") ;; "\.[0-9]{2,}.*\@" (-5.0 . "[a-z].*[A-Z].*[a-z].*[A-Z].*@") ;; "([a-z].*[A-Z].*){2,}\@" (-3.0 . "[A-Z][A-Z][a-z][a-z].*@") (-5.0 . "\\...?.?@") ;; (-5.0 . "\..{1,3}\@") - + ;; (-2.0 . "^[0-9]") (-1.0 . "^[0-9][0-9]") ;; @@ -5789,6 +5804,9 @@ address, `ask' if unsure and `invalid' if the string is invalid." (defvar gnus-button-handle-describe-prefix "^\\(C-h\\|?\\)") +;; FIXME: Maybe we should merge some of the functions that do quite similar +;; stuff? + (defun gnus-button-handle-describe-function (url) "Call `describe-function' when pushing the corresponding URL button." (describe-function @@ -5801,6 +5819,15 @@ address, `ask' if unsure and `invalid' if the string is invalid." (intern (gnus-replace-in-string url gnus-button-handle-describe-prefix "")))) +(defun gnus-button-handle-symbol (url) +"Display help on variable or function. +Calls `describe-variable' or `describe-function'." + (let ((sym (intern url))) + (cond + ((fboundp sym) (describe-function sym)) + ((boundp sym) (describe-variable sym)) + (t (gnus-message 3 "`%s' is not a known function of variable." url))))) + (defun gnus-button-handle-describe-key (url) "Call `describe-key' when pushing the corresponding URL button." (let* ((key-string @@ -5831,6 +5858,15 @@ address, `ask' if unsure and `invalid' if the string is invalid." (if (fboundp 'apropos-documentation) 'apropos-documentation 'apropos) (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))) +(defun gnus-button-handle-library (url) + "Call `locate-library' when pushing the corresponding URL button." + (gnus-message 9 "url=`%s'" url) + (let* ((lib (locate-library url)) + (file (gnus-replace-in-string (or lib "") "\.elc" ".el"))) + (if (not lib) + (gnus-message 1 "Cannot locale library `%s'." url) + (find-file-read-only file)))) + (defun gnus-button-handle-ctan (url) "Call `browse-url' when pushing a CTAN URL button." (funcall @@ -5872,36 +5908,62 @@ probably a good idea. See Info node `(gnus)Group Parameters' and the variable :link '(custom-manual "(gnus)Group Parameters") :type 'integer) -(defcustom gnus-button-mail-level 5 - "*Integer that says how many buttons for message IDs or mail addresses will appear. +(defcustom gnus-button-message-level 5 + "*Integer that says how many buttons for news or mail messages will appear. +The higher the number, the more buttons will appear and the more false +positives are possible." + ;; mail addresses, MIDs, URLs for news, ... + :group 'gnus-article-buttons + :type 'integer) + +(defcustom gnus-button-browse-level 5 + "*Integer that says how many buttons for browsing will appear. The higher the number, the more buttons will appear and the more false positives are possible." + ;; stuff handled by `browse-url' or `gnus-button-embedded-url' :group 'gnus-article-buttons :type 'integer) (defcustom gnus-button-alist '(("<\\(url:[>\n\t ]*?\\)?\\(nntp\\|news\\):[>\n\t ]*\\([^>\n\t ]*@[^>\n\t ]*\\)>" - 0 t gnus-button-handle-news 3) + 0 (>= gnus-button-message-level 0) gnus-button-handle-news 3) ("\\b\\(nntp\\|news\\):\\([^>\n\t ]*@[^>)!;:,\n\t ]*\\)" 0 t gnus-button-handle-news 2) ("\\(\\b<\\(url:[>\n\t ]*\\)?news:[>\n\t ]*\\(//\\)?\\([^>\n\t ]*\\)>\\)" - 1 t - gnus-button-fetch-group 4) - ("\\bnews:\\(//\\)?\\([^'\">\n\t ]+\\)" 0 t gnus-button-fetch-group 2) - ("\\bin\\( +article\\| +message\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2 - t gnus-button-message-id 3) - ("\\( \n\t]+\\)>" 0 t gnus-url-mailto 2) - ("mailto:\\([-a-z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1) - ("\\bmailto:\\([^ \n\t]+\\)" 0 t gnus-url-mailto 1) + 1 (>= gnus-button-message-level 0) gnus-button-fetch-group 4) + ("\\bnews:\\(//\\)?\\([^'\">\n\t ]+\\)" + 0 (>= gnus-button-message-level 0) gnus-button-fetch-group 2) + ("\\bin\\( +article\\| +message\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" + 2 (>= gnus-button-message-level 0) gnus-button-message-id 3) + ("\\( \n\t]+\\)>" + 0 (>= gnus-button-message-level 0) gnus-url-mailto 2) + ("mailto:\\([-a-z.@_+0-9%=?]+\\)" + 0 (>= gnus-button-message-level 0) gnus-url-mailto 1) + ("\\bmailto:\\([^ \n\t]+\\)" + 0 (>= gnus-button-message-level 0) gnus-url-mailto 1) ;; CTAN - ("\\bCTAN:[ \t\n]*\\([^>)!;:,\n\t ]*\\)" 0 (>= gnus-button-tex-level 1) - gnus-button-handle-ctan 1) + ("\\bCTAN:[ \t\n]*\\([^>)!;:,'\n\t ]*\\)" + 0 (>= gnus-button-tex-level 1) gnus-button-handle-ctan 1) + ((concat "\\btex-archive/\\(" + gnus-button-ctan-directory-regexp + "/[-_.a-z0-9/]+[-_./a-z0-9]+[/a-z0-9]\\)") + 1 (>= gnus-button-tex-level 6) gnus-button-handle-ctan 1) + ((concat + "\\b\\(" + gnus-button-ctan-directory-regexp + "/[-_.a-z0-9]+/[-_./a-z0-9]+[/a-z0-9]\\)") + 1 (>= gnus-button-tex-level 8) gnus-button-handle-ctan 1) ;; This is info - ("\\binfo:\\(//\\)?\\([^'\">\n\t ]+\\)" 0 - (>= gnus-button-emacs-level 1) gnus-button-handle-info 2) + ("\\binfo:\\(//\\)?\\([^'\">\n\t ]+\\)" + 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 2) + ("\\((Info-goto-node\\|(info\\)[ \t\n]*\\(\"[^\"]*\"\\))" 0 + (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 2) + ("\\b\\(C-h\\|?\\)[ \t\n]+i[ \t\n]+d?[ \t\n]?m[ \t\n]+\\([^ ]+ ?[^ ]+\\)[ \t\n]+RET" + ;; Info links like `C-h i d m CC Mode RET' + 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-keystrokes 2) ;; This is custom - ("\\bcustom:\\(//\\)?\\([^'\">\n\t ]+\\)" 0 - (>= gnus-button-emacs-level 5) gnus-button-handle-custom 2) + ("\\bcustom:\\(//\\)?\\([^'\">\n\t ]+\\)" + 0 (>= gnus-button-emacs-level 5) gnus-button-handle-custom 2) ("M-x[ \t\n]customize-[^ ]+[ \t\n]RET[ \t\n]\\([^ ]+\\)[ \t\n]RET" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-custom 1) ;; Emacs help commands @@ -5914,37 +5976,51 @@ positives are possible." 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-variable 1) ("M-x[ \t\n]+apropos-documentation[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-documentation 1) + ;; The following entries may lead to many false positives so don't enable + ;; them by default (use a high button level): + ("/\\([a-z][-a-z0-9]+\\.el\\)\\>" + 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1) + ("`\\([a-z][-a-z0-9]+\\.el\\)'" + 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1) + ("`\\([a-z]+-[a-z]+-[-a-z]+\\|\\(gnus\\|message\\)-[-a-z]+\\)'" + 0 (>= gnus-button-emacs-level 8) gnus-button-handle-symbol 1) + ("`\\([a-z]+-[a-z]+\\)'" + 0 (>= gnus-button-emacs-level 9) gnus-button-handle-symbol 1) + ("(setq[ \t\n]+\\([a-z][a-z0-9]+-[-a-z0-9]+\\)[ \t\n]+.+)" + 1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-variable 1) ("\\b\\(C-h\\|?\\)[ \t\n]+f[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2) ("\\b\\(C-h\\|?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2) - ("`\\(\\b\\(C-h\\|?\\)[ \t\n]+k[ \t\n]+\\([^']+\\)\\)'" 1 + ("`\\(\\b\\(C-h\\|?\\)[ \t\n]+k[ \t\n]+\\([^']+\\)\\)'" ;; Unlike the other regexps we really have to require quoting ;; here to determine where it ends. - (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3) - ;; This is how URLs _should_ be embedded in text... - ("]*\\)>" 1 t gnus-button-embedded-url 1) + 1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3) + ;; This is how URLs _should_ be embedded in text (RFC 1738)... + ("]*\\)>" + 1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1) ;; Raw URLs. - (gnus-button-url-regexp 0 t browse-url 0) + (gnus-button-url-regexp + 0 (>= gnus-button-browse-level 0) browse-url 0) ;; man pages - ("\\b\\([a-z][a-z]+\\)([1-9])\\W" 0 - (and (>= gnus-button-man-level 1) (< gnus-button-man-level 3)) + ("\\b\\([a-z][a-z]+\\)([1-9])\\W" + 0 (and (>= gnus-button-man-level 1) (< gnus-button-man-level 3)) gnus-button-handle-man 1) ;; more man pages: resolv.conf(5), iso_8859-1(7), xterm(1x) - ("\\b\\([a-z][-_.a-z0-9]+\\)([1-9])\\W" 0 - (and (>= gnus-button-man-level 3) (< gnus-button-man-level 5)) + ("\\b\\([a-z][-_.a-z0-9]+\\)([1-9])\\W" + 0 (and (>= gnus-button-man-level 3) (< gnus-button-man-level 5)) gnus-button-handle-man 1) ;; even more: Apache::PerlRun(3pm), PDL::IO::FastRaw(3pm), - ;; SoWWWAnchor(3iv), XSelectInput(3X11) - ("\\b\\([a-z][-_.:a-z0-9]+\\)([1-9][X1a-z]*)\\W" 0 - (>= gnus-button-man-level 5) gnus-button-handle-man 1) + ;; SoWWWAnchor(3iv), XSelectInput(3X11), X(1), X(7) + ("\\b\\([a-z][-_.:a-z0-9]+\\)([1-9][X1a-z]*)\\W\\|\\b\\(X\\)([1-9])\\W" + 0 (>= gnus-button-man-level 5) gnus-button-handle-man 1) ;; MID or mail: To avoid too many false positives we don't try to catch ;; all kind of allowed MIDs or mail addresses. Domain part must contain ;; at least one dot. TLD must contain two or three chars or be a know TLD ;; (info|name|...). Put this entry near the _end_ of `gnus-button-alist' ;; so that non-ambiguous entries (see above) match first. (gnus-button-mid-or-mail-regexp - 0 (>= gnus-button-mail-level 5) gnus-button-handle-mid-or-mail 1)) + 0 (>= gnus-button-message-level 5) gnus-button-handle-mid-or-mail 1)) "*Alist of regexps matching buttons in article bodies. Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where @@ -5969,16 +6045,21 @@ variable it the real callback function." (defcustom gnus-header-button-alist '(("^\\(References\\|Message-I[Dd]\\):" "<[^<>]+>" - 0 t gnus-button-message-id 0) - ("^\\(From\\|Reply-To\\):" ": *\\(.+\\)$" 1 t gnus-button-reply 1) + 0 (>= gnus-button-message-level 0) gnus-button-message-id 0) + ("^\\(From\\|Reply-To\\):" ": *\\(.+\\)$" + 1 (>= gnus-button-message-level 0) gnus-button-reply 1) ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" - 0 t gnus-button-mailto 0) - ("^X-[Uu][Rr][Ll]:" gnus-button-url-regexp 0 t browse-url 0) - ("^Subject:" gnus-button-url-regexp 0 t browse-url 0) - ("^[^:]+:" gnus-button-url-regexp 0 t browse-url 0) - ("^[^:]+:" "\\bmailto:\\([-a-z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1) - ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)" 1 t - gnus-button-message-id 3)) + 0 (>= gnus-button-message-level 0) gnus-button-mailto 0) + ("^X-[Uu][Rr][Ll]:" gnus-button-url-regexp + 0 (>= gnus-button-browse-level 0) browse-url 0) + ("^Subject:" gnus-button-url-regexp + 0 (>= gnus-button-browse-level 0) browse-url 0) + ("^[^:]+:" gnus-button-url-regexp + 0 (>= gnus-button-browse-level 0) browse-url 0) + ("^[^:]+:" "\\bmailto:\\([-a-z.@_+0-9%=?]+\\)" + 0 (>= gnus-button-message-level 0) gnus-url-mailto 1) + ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)" + 1 (>= gnus-button-message-level 0) gnus-button-message-id 3)) "*Alist of headers and regexps to match buttons in article heads. This alist is very similar to `gnus-button-alist', except that each @@ -6322,17 +6403,27 @@ specified by `gnus-button-alist'." "Fetch a man page." (funcall gnus-button-man-handler url)) -(defun gnus-button-handle-info (url) +(defun gnus-button-handle-info-url (url) "Fetch an info URL." - (if (string-match - "^\\([^:/]+\\)?/\\(.*\\)" - url) - (gnus-info-find-node - (concat "(" (or (gnus-url-unhex-string (match-string 1 url)) - "Gnus") - ")" - (gnus-url-unhex-string (match-string 2 url)))) - (error "Can't parse %s" url))) + (cond + ((string-match "^\\([^:/]+\\)?/\\(.*\\)" url) + (gnus-info-find-node + (concat "(" (or (gnus-url-unhex-string (match-string 1 url)) + "Gnus") + ")" (gnus-url-unhex-string (match-string 2 url))))) + ((string-match "([^)\"]+)[^\"]+" url) + (setq url + (gnus-replace-in-string + (gnus-replace-in-string url "[\n\t ]+" " ") "\"" "")) + (gnus-info-find-node url)) + (t (error "Can't parse %s" url)))) + +(defun gnus-button-handle-info-keystrokes (url) + "Call `info' when pushing the corresponding URL button." + ;; For links like `C-h i d m gnus RET', `C-h i d m CC Mode RET'. + (info) + (Info-directory) + (Info-menu url)) (defun gnus-button-message-id (message-id) "Fetch MESSAGE-ID." diff --git a/lisp/gnus-async.el b/lisp/gnus-async.el index 0a8a798..f3a43c9 100644 --- a/lisp/gnus-async.el +++ b/lisp/gnus-async.el @@ -36,12 +36,6 @@ "Support for asynchronous operations." :group 'gnus) -(defcustom gnus-asynchronous nil - "*If nil, inhibit all Gnus asynchronicity. -If non-nil, let the other asynch variables be heeded." - :group 'gnus-asynchronous - :type 'boolean) - (defcustom gnus-use-article-prefetch 30 "*If non-nil, prefetch articles in groups that allow this. If a number, prefetch only that many articles forward; @@ -51,6 +45,12 @@ if t, prefetch as many articles as possible." (const :tag "all" t) (integer :tag "some" 0))) +(defcustom gnus-asynchronous nil + "*If nil, inhibit all Gnus asynchronicity. +If non-nil, let the other asynch variables be heeded." + :group 'gnus-asynchronous + :type 'boolean) + (defcustom gnus-prefetched-article-deletion-strategy '(read exit) "List of symbols that say when to remove articles from the prefetch buffer. Possible values in this list are `read', which means that diff --git a/lisp/gnus-audio.el b/lisp/gnus-audio.el index 12366ab..785a936 100644 --- a/lisp/gnus-audio.el +++ b/lisp/gnus-audio.el @@ -50,12 +50,12 @@ (defcustom gnus-audio-au-player (executable-find "play") "Executable program for playing sun AU format sound files." :group 'gnus-audio - :type 'string) + :type '(choice file (const nil))) (defcustom gnus-audio-wav-player (executable-find "play") "Executable program for playing WAV files." :group 'gnus-audio - :type 'string) + :type '(choice file (const nil))) ;;; The following isn't implemented yet. Wait for Millennium Gnus. ;;(defvar gnus-audio-effects-enabled t diff --git a/lisp/gnus-cus.el b/lisp/gnus-cus.el index ba32cbe..c8c369e 100644 --- a/lisp/gnus-cus.el +++ b/lisp/gnus-cus.el @@ -159,7 +159,7 @@ days (not necessarily an integer) or the symbols `never' or string) "\ Where expired messages end up. -Overrides `nnmail-expiry-target', which see.") +Overrides `nnmail-expiry-target'.") (score-file (file :tag "Score File") "\ Make the specified file into the current score file. diff --git a/lisp/gnus-draft.el b/lisp/gnus-draft.el index cbde8b0..cb98655 100644 --- a/lisp/gnus-draft.el +++ b/lisp/gnus-draft.el @@ -133,6 +133,7 @@ "Send message ARTICLE." (let ((message-syntax-checks (if interactive message-syntax-checks 'dont-check-for-anything-just-trust-me)) + (message-hidden-headers nil) (message-inhibit-body-encoding (or (not group) (equal group "nndraft:queue") message-inhibit-body-encoding)) diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index fd1636f..818cbe9 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -26,7 +26,9 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile + (require 'cl) + (defvar tool-bar-map)) (require 'gnus) (require 'gnus-start) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index c34ec2f..84b1701 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -448,6 +448,7 @@ Thank you for your help in stamping out bugs. (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t)) (mml-destroy-buffers) (setq mml-buffer-list mbl))) + (message-hide-headers) (gnus-add-buffer) (gnus-configure-windows ,config t) (run-hooks 'post-command-hook) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 41adecb..3b37a0f 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -1106,7 +1106,18 @@ EXTRA is the possible non-standard header." (defun gnus-score-edit-file-at-point () "Edit score file at point. Useful especially after `V t'." (interactive) - (gnus-score-edit-file (ffap-string-at-point))) + (let* ((string (ffap-string-at-point)) + ;; FIXME: Should be the full `match element', not just string at + ;; point. + file) + (save-excursion + (end-of-line) + (setq file (ffap-string-at-point))) + (gnus-score-edit-file file) + (unless (string= string file) + (goto-char (point-min)) + ;; Goto first match + (search-forward string nil t)))) (defun gnus-score-load-file (file) ;; Load score file FILE. Returns a list a retrieved score-alists. @@ -2354,8 +2365,8 @@ score in `gnus-newsgroup-scored' by SCORE." (local-set-key "q" (lambda () (interactive) - (kill-buffer nil) - (gnus-article-show-summary))) + (bury-buffer nil) + (gnus-summary-expand-window))) (local-set-key "e" 'gnus-score-edit-file-at-point) (setq truncate-lines t) (while trace diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 85a1aea..c2d88f6 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -2641,7 +2641,13 @@ If FORCE is non-nil, the .newsrc file is read." (princ "(setq gnus-newsrc-file-version ") (princ (gnus-prin1-to-string gnus-version)) (princ ")\n") - (let* ((print-length nil) + (let* ((print-quoted t) + (print-readably t) + (print-escape-multibyte nil) + (print-escape-nonascii t) + (print-length nil) + (print-level nil) + (print-escape-newlines t) (gnus-killed-list (if (and gnus-save-killed-list (stringp gnus-save-killed-list)) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 1068e5d..d83f7d4 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -26,7 +26,9 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile + (require 'cl) + (defvar tool-bar-map)) (require 'gnus) (require 'gnus-group) @@ -1393,7 +1395,7 @@ buffers. For example: ;; source file. (if (boundp 'gnus-newsgroup-variables) nil - (load "gnus-sum.el" t t t t)) + (load "gnus-sum.el" t t t)) (require 'gnus) (require 'gnus-agent) (require 'gnus-art))) @@ -2095,14 +2097,20 @@ increase the score of each group you read." ["View MIME buttons" gnus-summary-display-buttonized t] ["View all" gnus-mime-view-all-parts t] ["Verify and Decrypt" gnus-summary-force-verify-and-decrypt t] - ["Encrypt body" gnus-article-encrypt-body t] + ["Encrypt body" gnus-article-encrypt-body + :active (not (gnus-group-read-only-p)) + ,@(if (featurep 'xemacs) nil + '(:help "Encrypt the message body on disk"))] ["Extract all parts" gnus-summary-save-parts t] ("Multipart" ["Repair multipart" gnus-summary-repair-multipart t] ["Add buttons" gnus-summary-display-buttonized t] ["Pipe part" gnus-article-pipe-part t] ["Inline part" gnus-article-inline-part t] - ["Encrypt body" gnus-article-encrypt-body t] + ["Encrypt body" gnus-article-encrypt-body + :active (not (gnus-group-read-only-p)) + ,@(if (featurep 'xemacs) nil + '(:help "Encrypt the message body on disk"))] ["View part externally" gnus-article-view-part-externally t] ["View part with charset" gnus-article-view-part-as-charset t] ["Copy part" gnus-article-copy-part t] @@ -2210,8 +2218,12 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) ["Crosspost article..." gnus-summary-crosspost-article (gnus-check-backend-function 'request-replace-article gnus-newsgroup-name)] - ["Import file..." gnus-summary-import-article t] - ["Create article..." gnus-summary-create-article t] + ["Import file..." gnus-summary-import-article + (gnus-check-backend-function + 'request-accept-article gnus-newsgroup-name)] + ["Create article..." gnus-summary-create-article + (gnus-check-backend-function + 'request-accept-article gnus-newsgroup-name)] ["Check if posted" gnus-summary-article-posted-p t] ["Edit article" gnus-summary-edit-article (not (gnus-group-read-only-p))] @@ -3377,7 +3389,7 @@ the thread are to be displayed." (defsubst gnus-summary-line-message-size (head) "Return pretty-printed version of message size. This function is intended to be used in -`gnus-summary-line-format-alist', which see." +`gnus-summary-line-format-alist'." (let ((c (or (mail-header-chars head) -1))) (cond ((< c 0) "n/a") ; chars not available ((< c (* 1000 10)) (format "%1.1fk" (/ c 1024.0))) @@ -4994,6 +5006,18 @@ If SELECT-ARTICLES, only select those articles from GROUP." (error "Couldn't request group %s: %s" group (gnus-status-message group))) + (when gnus-agent + ;; The agent may be storing articles that are no longer in the + ;; server's active range. If that is the case, the active range + ;; needs to be expanded such that the agent's articles can be + ;; included in the summary. + (let* ((gnus-command-method (gnus-find-method-for-group group)) + (alist (gnus-agent-load-alist group)) + (active (gnus-active group))) + (if (and (car alist) + (< (caar alist) (car active))) + (gnus-set-active group (cons (caar alist) (cdr active)))))) + (setq gnus-newsgroup-name group gnus-newsgroup-unselected nil gnus-newsgroup-unreads (gnus-list-of-unread-articles group)) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 8e5eb6a..4498375 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -455,12 +455,13 @@ jabbering all the time." :group 'gnus-start :type 'integer) -;; Show message if message has a lower level than `gnus-verbose'. -;; Guideline for numbers: -;; 1 - error messages, 3 - non-serious error messages, 5 - messages -;; for things that take a long time, 7 - not very important messages -;; on stuff, 9 - messages inside loops. (defun gnus-message (level &rest args) + "If LEVEL is lower than `gnus-verbose' print ARGS using `message'. + +Guideline for numbers: +1 - error messages, 3 - non-serious error messages, 5 - messages for things +that take a long time, 7 - not very important messages on stuff, 9 - messages +inside loops." (if (<= level gnus-verbose) (apply 'message args) ;; We have to do this format thingy here even if the result isn't @@ -1028,27 +1029,25 @@ Return the modified alist." (defmacro gnus-with-output-to-file (file &rest body) (let ((buffer (make-symbol "output-buffer")) (size (make-symbol "output-buffer-size")) - (leng (make-symbol "output-buffer-length"))) - `(let* ((print-quoted t) - (print-readably t) - (print-escape-multibyte nil) - print-level - print-length - (,size 131072) + (leng (make-symbol "output-buffer-length")) + (append (make-symbol "output-buffer-append"))) + `(let* ((,size 131072) (,buffer (make-string ,size 0)) (,leng 0) - (append nil) + (,append nil) (standard-output (lambda (c) - (aset ,buffer ,leng c) + (aset ,buffer ,leng c) + (if (= ,size (setq ,leng (1+ ,leng))) - (progn (write-region ,buffer nil ,file append 'no-msg) + (progn (write-region ,buffer nil ,file ,append 'no-msg) (setq ,leng 0 - append t)))))) + ,append t)))))) ,@body (when (> ,leng 0) + (let ((coding-system-for-write 'no-conversion)) (write-region (substring ,buffer 0 ,leng) nil ,file - append 'no-msg))))) + ,append 'no-msg)))))) (put 'gnus-with-output-to-file 'lisp-indent-function 1) (put 'gnus-with-output-to-file 'edebug-form-spec '(form body)) diff --git a/lisp/gnus.el b/lisp/gnus.el index 732545a..c08d790 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -286,7 +286,7 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "0.17" +(defconst gnus-version-number "0.18" "Version number for this version of Gnus.") (defconst gnus-version (format "Oort Gnus v%s" gnus-version-number) diff --git a/lisp/lpath.el b/lisp/lpath.el index c98ec0d..b195809 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -9,10 +9,10 @@ (defun maybe-bind (args) (mapcar (lambda (var) (unless (boundp var) (set var nil))) args)) -(maybe-fbind '(bbdb-create-internal bbdb-records - create-image display-graphic-p - display-time-event-handler find-image image-size - image-type-available-p insert-image +(maybe-fbind '(Info-directory + Info-menu bbdb-create-internal bbdb-records create-image + display-graphic-p display-time-event-handler find-image + image-size image-type-available-p insert-image make-mode-line-mouse-map make-temp-file open-ssl-stream propertize put-image replace-regexp-in-string rmail-msg-is-pruned rmail-msg-restore-non-pruned-header @@ -31,6 +31,7 @@ (if (featurep 'xemacs) (progn (maybe-fbind '(ccl-execute-on-string + Info-directory Info-menu char-charset charsetp coding-system-get coding-system-list coding-system-p decode-coding-region decode-coding-string define-ccl-program delete-overlay diff --git a/lisp/message.el b/lisp/message.el index 378b588..71dfef1 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -432,7 +432,7 @@ If t, use `message-user-organization-file'." :group 'message-headers) (defcustom message-make-forward-subject-function - 'message-forward-subject-author-subject + 'message-forward-subject-name-subject "*List of functions called to generate subject headers for forwarded messages. The subject generated by the previous function is passed into each successive function. @@ -441,6 +441,8 @@ The provided functions are: * `message-forward-subject-author-subject' (Source of article (author or newsgroup)), in brackets followed by the subject +* `message-forward-subject-name-subject' (Source of article (name of author + or newsgroup)), in brackets followed by the subject * `message-forward-subject-fwd' (Subject of article with 'Fwd:' prepended to it." :group 'message-forwarding @@ -982,6 +984,13 @@ candidates: (or (not (listp message-shoot-gnksa-feet)) (memq feature message-shoot-gnksa-feet))) +(defcustom message-hidden-headers nil + "Regexp of headers to be hidden when composing new messages. +This can also be a list of regexps to match headers. Or a list +starting with `not' and followed by regexps.." + :group 'message + :type '(repeat regexp)) + ;;; Internal variables. ;;; Well, not really internal. @@ -2216,7 +2225,7 @@ message composition doesn't break too bad." ;; No reason this should be clutter up customize. We make it a ;; property list (rather than a list of property symbols), to be ;; directly useful for `remove-text-properties'. - '(field nil read-only nil intangible nil invisible nil + '(field nil read-only nil invisible nil intangible nil mouse-face nil modification-hooks nil insert-in-front-hooks nil insert-behind-hooks nil point-entered nil point-left nil) ;; Other special properties: @@ -2247,7 +2256,11 @@ This function is intended to be called from `after-change-functions'. See also `message-forbidden-properties'." (when (and message-strip-special-text-properties (message-tamago-not-in-use-p begin)) - (remove-text-properties begin end message-forbidden-properties))) + (while (not (= begin end)) + (when (not (get-text-property begin 'message-hidden)) + (remove-text-properties begin (1+ begin) + message-forbidden-properties)) + (incf begin)))) ;;;###autoload (define-derived-mode message-mode text-mode "Message" @@ -2691,6 +2704,7 @@ Prefix arg means justify as well." (delete-region (point) (re-search-forward "[ \t]*")) (when (and quoted (not bolp)) (insert quoted leading-space))) + (undo-boundary) (if quoted (let* ((adaptive-fill-regexp (regexp-quote (concat quoted leading-space))) @@ -3272,7 +3286,14 @@ It should typically alter the sending method in some way or other." (goto-char (point-max)) (unless (bolp) (insert "\n")) - ;; Delete all invisible text. + ;; Make the hidden headers visible. + (let ((points (message-text-with-property 'message-hidden))) + (when points + (goto-char (car points)) + (dolist (point points) + (add-text-properties point (1+ point) + '(invisible nil intangible nil))))) + ;; Make invisible text visible. (message-check 'invisible-text (let ((points (message-text-with-property 'invisible))) (when points @@ -5823,6 +5844,22 @@ the list of newsgroups is was posted to." (mail-decode-encoded-word-string prefix))) "] " subject)) +(defun message-forward-subject-name-subject (subject) + "Generate a SUBJECT for a forwarded message. +The form is: [Source] Subject, where if the original message was mail, +Source is the name of the sender, and if the original message was +news, Source is the list of newsgroups is was posted to." + (concat "[" + (let ((prefix + (or (message-fetch-field "newsgroups") + (cdr + (mail-header-parse-address (message-fetch-field "from"))) + "(nowhere)"))) + (if message-forward-decoded-p + prefix + (mail-decode-encoded-word-string prefix))) + "] " subject)) + (defun message-forward-subject-fwd (subject) "Generate a SUBJECT for a forwarded message. The form is: Fwd: Subject, where Subject is the original subject of @@ -6468,6 +6505,39 @@ regexp varstr." (if (and (or to cc) bcc) ", ") (or bcc ""))))))) +(defun message-hide-headers () + "Hide headers based on the `message-hidden-headers' variable." + (let ((regexps (if (stringp message-hidden-headers) + (list message-hidden-headers) + message-hidden-headers)) + (inhibit-point-motion-hooks t) + (after-change-functions nil)) + (when regexps + (save-excursion + (save-restriction + (message-narrow-to-headers) + (goto-char (point-min)) + (while (not (eobp)) + (if (not (message-hide-header-p regexps)) + (message-next-header) + (let ((begin (point))) + (message-next-header) + (add-text-properties begin (point) + '(intangible t invisible t + message-hidden t)))))))))) + +(defun message-hide-header-p (regexps) + (let ((result nil) + (reverse nil)) + (when (eq (car regexps) 'not) + (setq reverse t) + (pop regexps)) + (dolist (regexp regexps) + (setq result (or result (looking-at regexp)))) + (if reverse + (not result) + result))) + (when (featurep 'xemacs) (require 'messagexmas) (message-xmas-redefine)) diff --git a/lisp/mm-bodies.el b/lisp/mm-bodies.el index e4c7894..9a7d7b5 100644 --- a/lisp/mm-bodies.el +++ b/lisp/mm-bodies.el @@ -1,6 +1,6 @@ ;;; mm-bodies.el --- Functions for decoding MIME things -;; Copyright (C) 1998, 1999, 2000, 2001 +;; Copyright (C) 1998, 1999, 2000, 2001, 2003 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -44,7 +44,12 @@ (defcustom mm-body-charset-encoding-alist '((iso-2022-jp . 7bit) - (iso-2022-jp-2 . 7bit)) + (iso-2022-jp-2 . 7bit) + ;; We MUST encode UTF-16 because it can contain \0's which is + ;; known to break servers. + (utf-16 . base64) + (utf-16be . base64) + (utf-16le . base64)) "Alist of MIME charsets to encodings. Valid encodings are `7bit', `8bit', `quoted-printable' and `base64'." :type '(repeat (cons (symbol :tag "charset") @@ -85,8 +90,7 @@ If no encoding was done, nil is returned." charset) (goto-char (point-min)) (let ((charsets (mm-find-mime-charset-region (point-min) (point-max) - mm-hack-charsets)) - start) + mm-hack-charsets))) (cond ;; No encoding. ((null charsets) @@ -96,24 +100,11 @@ If no encoding was done, nil is returned." charsets) ;; We encode. (t - (setq charset (car charsets)) - (while (not (eobp)) - (if (eq (mm-charset-after) 'ascii) - (when start - (save-restriction - (narrow-to-region start (point)) - (mm-encode-coding-region - start (point) (mm-charset-to-coding-system charset)) - (goto-char (point-max))) - (setq start nil)) - (unless start - (setq start (point)))) - (forward-char 1)) - (when start - (mm-encode-coding-region start (point) - (mm-charset-to-coding-system charset)) - (setq start nil)) - charset))))))) + (prog1 + (setq charset (car charsets)) + (mm-encode-coding-region (point-min) (point-max) + (mm-charset-to-coding-system charset)))) + )))))) (defun mm-long-lines-p (length) "Say whether any of the lines in the buffer is longer than LINES." @@ -143,7 +134,7 @@ If no encoding was done, nil is returned." bits) ((and (not mm-use-ultra-safe-encoding) (not longp) - (not (eq '7bit (cdr (assq charset mm-body-charset-encoding-alist)))) + (not (cdr (assq charset mm-body-charset-encoding-alist))) (or (eq t (cdr message-posting-charset)) (memq charset (cdr message-posting-charset)) (eq charset mail-parse-charset))) @@ -247,36 +238,52 @@ If TYPE is `text/plain' CRLF->LF translation may occur." "Decode the current article that has been encoded with ENCODING. The characters in CHARSET should then be decoded. If FORCE is non-nil use the supplied charset unconditionally." - (if (stringp charset) + (let ((charset-supplied charset)) + (when (stringp charset) (setq charset (intern (downcase charset)))) - (if (or (not charset) - (eq 'gnus-all mail-parse-ignored-charsets) - (memq 'gnus-all mail-parse-ignored-charsets) - (memq charset mail-parse-ignored-charsets)) - (setq charset mail-parse-charset)) - (save-excursion - (when encoding - (mm-decode-content-transfer-encoding encoding type)) - (when (featurep 'mule) - (let ((coding-system (mm-charset-to-coding-system charset))) - (if (and (not coding-system) - (listp mail-parse-ignored-charsets) - (memq 'gnus-unknown mail-parse-ignored-charsets)) - (setq coding-system - (mm-charset-to-coding-system mail-parse-charset))) - (when (and charset coding-system - ;; buffer-file-coding-system - ;;Article buffer is nil coding system - ;;in XEmacs - (mm-multibyte-p) - (or (not (eq coding-system 'ascii)) - (setq coding-system mail-parse-charset)) - (not (eq coding-system 'gnus-decoded))) - (if force - (mm-decode-coding-region (point-min) (point-max) - coding-system) - (mm-decode-coding-region-safely (point-min) (point-max) - coding-system))))))) + (when (or (not charset) + (eq 'gnus-all mail-parse-ignored-charsets) + (memq 'gnus-all mail-parse-ignored-charsets) + (memq charset mail-parse-ignored-charsets)) + (setq charset mail-parse-charset + charset-supplied nil)) + (save-excursion + (when encoding + (mm-decode-content-transfer-encoding encoding type)) + (when (featurep 'mule) + (let ((coding-system (mm-charset-to-coding-system charset))) + (if (and (not coding-system) + (listp mail-parse-ignored-charsets) + (memq 'gnus-unknown mail-parse-ignored-charsets)) + (setq coding-system + (mm-charset-to-coding-system mail-parse-charset))) + (when (and charset coding-system + ;; buffer-file-coding-system + ;;Article buffer is nil coding system + ;;in XEmacs + (mm-multibyte-p) + (or (not (eq coding-system 'ascii)) + (setq coding-system mail-parse-charset)) + (not (eq coding-system 'gnus-decoded))) + (if (or force + ;; If a charset was supplied and `code-pages' + ;; hasn't been loaded, then use the supplied + ;; charset unconditionally. + (and (not (featurep 'code-pages)) + charset-supplied)) + (mm-decode-coding-region (point-min) (point-max) + coding-system) + ;; Otherwise allow Emacs to auto-detect the charset. + ;; Messages in windows-125x are frequently incorrectly + ;; advertised as iso-8859-x -- if `code-pages' has been + ;; loaded and configured, we're able to deal with them + ;; properly. + (mm-decode-coding-region-safely (point-min) (point-max) + coding-system))) + (setq buffer-file-coding-system + (if (boundp 'last-coding-system-used) + (symbol-value 'last-coding-system-used) + coding-system))))))) (defun mm-decode-coding-region-safely (start end coding-system) "Decode region between START and END with CODING-SYSTEM. diff --git a/lisp/mm-extern.el b/lisp/mm-extern.el index dfad89f..4a2b25c 100644 --- a/lisp/mm-extern.el +++ b/lisp/mm-extern.el @@ -98,7 +98,7 @@ (message-mail server subject) (message-goto-body) (delete-region (point) (point-max)) - (insert-buffer buf) + (insert-buffer-substring buf) (message "Requesting external body...") (message-send-and-exit) (setq info "Request is sent.") diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el index cd20115..accc32d 100644 --- a/lisp/mm-uu.el +++ b/lisp/mm-uu.el @@ -1,5 +1,5 @@ ;;; mm-uu.el --- Return uu stuff as mm handles -;; Copyright (c) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +;; Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp @@ -78,6 +78,11 @@ This can be either \"inline\" or \"attachment\".") (defvar mm-uu-emacs-sources-regexp "gnu\\.emacs\\.sources" "The regexp of emacs sources groups.") +(defcustom mm-uu-diff-groups-regexp "gnus\\.commits" + "*Regexp matching diff groups." + :type 'regexp + :group 'gnus-article-mime) + (defvar mm-uu-type-alist '((postscript "^%!PS-" @@ -139,7 +144,13 @@ This can be either \"inline\" or \"attachment\".") "^;;;?[ \t]*\\([^ \t]+\\.el\\)[ \t]+ends here" mm-uu-emacs-sources-extract nil - mm-uu-emacs-sources-test))) + mm-uu-emacs-sources-test) + (diff + "^Index: " + nil + mm-uu-diff-extract + nil + mm-uu-diff-test))) (defcustom mm-uu-configure-list '((shar . disabled)) "A list of mm-uu configuration. @@ -175,8 +186,13 @@ To disable dissecting shar codes, for instance, add "Copy the contents of the current buffer to a fresh buffer. Return that buffer." (save-excursion - (let ((obuf (current-buffer))) + (let ((obuf (current-buffer)) + (coding-system + ;; Might not exist in non-MULE XEmacs + (when (boundp 'buffer-file-coding-system) + buffer-file-coding-system))) (set-buffer (generate-new-buffer " *mm-uu*")) + (setq buffer-file-coding-system coding-system) (insert-buffer-substring obuf from to) (current-buffer)))) @@ -247,6 +263,15 @@ Return that buffer." mm-uu-emacs-sources-regexp (string-match mm-uu-emacs-sources-regexp gnus-newsgroup-name))) +(defun mm-uu-diff-extract () + (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) + '("text/x-patch"))) + +(defun mm-uu-diff-test () + (and gnus-newsgroup-name + mm-uu-diff-groups-regexp + (string-match mm-uu-diff-groups-regexp gnus-newsgroup-name))) + (defun mm-uu-forward-extract () (mm-make-handle (mm-uu-copy-to-buffer (progn (goto-char start-point) (forward-line) (point)) diff --git a/lisp/mm-view.el b/lisp/mm-view.el index 0c036f6..47daf7c 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -559,7 +559,7 @@ map."))) t) (defun mm-view-pkcs7-decrypt (handle) - (insert-buffer (mm-handle-buffer handle)) + (insert-buffer-substring (mm-handle-buffer handle)) (goto-char (point-min)) (insert "MIME-Version: 1.0\n") (mm-insert-headers "application/pkcs7-mime" "base64" "smime.p7m") diff --git a/lisp/mml-smime.el b/lisp/mml-smime.el index 2eec919..5939b08 100644 --- a/lisp/mml-smime.el +++ b/lisp/mml-smime.el @@ -125,7 +125,7 @@ (defun mml-smime-verify (handle ctl) (with-temp-buffer - (insert-buffer (mm-handle-multipart-original-buffer ctl)) + (insert-buffer-substring (mm-handle-multipart-original-buffer ctl)) (goto-char (point-min)) (insert (format "Content-Type: %s; " (mm-handle-media-type ctl))) (insert (format "protocol=\"%s\"; " diff --git a/lisp/mml.el b/lisp/mml.el index 9729e6e..6c0f600 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -738,7 +738,7 @@ If HANDLES is non-nil, use it instead reparsing the buffer." (mml-insert-mml-markup handle buffer textp))) (cond (mmlp - (insert-buffer buffer) + (insert-buffer-substring buffer) (goto-char (point-max)) (insert "<#/mml>\n")) ((stringp (car handle)) @@ -881,7 +881,8 @@ See Info node `(emacs-mime)Composing'. ;;; (defun mml-minibuffer-read-file (prompt) - (let ((file (read-file-name prompt nil nil t))) + (let* ((completion-ignored-extensions nil) + (file (read-file-name prompt nil nil t))) ;; Prevent some common errors. This is inspired by similar code in ;; VM. (when (file-directory-p file) @@ -1039,7 +1040,7 @@ If RAW, don't highlight the article." (concat (if raw "*Raw MIME preview of " "*MIME preview of ") (buffer-name)))) (erase-buffer) - (insert-buffer buf) + (insert-buffer-substring buf) (mml-preview-insert-mail-followup-to) (let ((message-deletable-headers (if (message-news-p) nil diff --git a/lisp/mml1991.el b/lisp/mml1991.el index 63903d7..49419b5 100644 --- a/lisp/mml1991.el +++ b/lisp/mml1991.el @@ -62,7 +62,7 @@ (quoted-printable-decode-region (point-min) (point-max)) (with-temp-buffer (setq signature (current-buffer)) - (insert-buffer text) + (insert-buffer-substring text) (unless (mc-sign-generic (message-options-get 'message-sender) nil nil nil nil) (unless (> (point-max) (point-min)) @@ -76,7 +76,7 @@ (delete-region (point-min) (point-max)) (if headers (insert headers)) (insert "\n") - (insert-buffer signature) + (insert-buffer-substring signature) (goto-char (point-max))))) (defun mml1991-mailcrypt-encrypt (cont &optional sign) @@ -100,7 +100,7 @@ (mm-with-unibyte-current-buffer-mule4 (with-temp-buffer (setq cipher (current-buffer)) - (insert-buffer text) + (insert-buffer-substring text) (unless (mc-encrypt-generic (or (message-options-get 'message-recipients) @@ -121,7 +121,7 @@ ;;(insert "Content-Type: application/pgp-encrypted\n\n") ;;(insert "Version: 1\n\n") (insert "\n") - (insert-buffer cipher) + (insert-buffer-substring cipher) (goto-char (point-max)))))) ;;; gpg wrapper @@ -159,7 +159,7 @@ (delete-region (point-min) (point-max)) (if headers (insert headers)) (insert "\n") - (insert-buffer signature) + (insert-buffer-substring signature) (goto-char (point-max))))) (defun mml1991-gpg-encrypt (cont &optional sign) @@ -207,7 +207,7 @@ ;;(insert "Content-Type: application/pgp-encrypted\n\n") ;;(insert "Version: 1\n\n") (insert "\n") - (insert-buffer cipher) + (insert-buffer-substring cipher) (goto-char (point-max)))))) ;; pgg wrapper @@ -233,7 +233,7 @@ (pop-to-buffer pgg-errors-buffer) (error "Encrypt error")) (delete-region (point-min) (point-max)) - (insert-buffer pgg-output-buffer) + (insert-buffer-substring pgg-output-buffer) (goto-char (point-min)) (while (re-search-forward "\r+$" nil t) (replace-match "" t t)) @@ -265,7 +265,7 @@ ;;(insert "Content-Type: application/pgp-encrypted\n\n") ;;(insert "Version: 1\n\n") (insert "\n") - (insert-buffer pgg-output-buffer) + (insert-buffer-substring pgg-output-buffer) t)) ;;;###autoload diff --git a/lisp/mml2015.el b/lisp/mml2015.el index e61ce7d..34007f1 100644 --- a/lisp/mml2015.el +++ b/lisp/mml2015.el @@ -1,5 +1,5 @@ ;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP) -;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: PGP MIME MML @@ -381,7 +381,7 @@ (buffer-string))) (set-buffer cipher) (erase-buffer) - (insert-buffer plain) + (insert-buffer-substring plain) (goto-char (point-min)) (while (search-forward "\r\n" nil t) (replace-match "\n" t t)))) @@ -571,7 +571,7 @@ (goto-char (point-max)) (insert (format "\n--%s\n" boundary)) (insert "Content-Type: application/pgp-signature\n\n") - (insert-buffer signature) + (insert-buffer-substring signature) (goto-char (point-max)) (insert (format "--%s--\n" boundary)) (goto-char (point-max))))) @@ -625,7 +625,7 @@ (insert "Version: 1\n\n") (insert (format "--%s\n" boundary)) (insert "Content-Type: application/octet-stream\n\n") - (insert-buffer cipher) + (insert-buffer-substring cipher) (goto-char (point-max)) (insert (format "--%s--\n" boundary)) (goto-char (point-max)))))) @@ -702,7 +702,7 @@ (buffer-string)))) (progn (erase-buffer) - (insert-buffer pgg-output-buffer) + (insert-buffer-substring pgg-output-buffer) (goto-char (point-min)) (while (search-forward "\r\n" nil t) (replace-match "\n" t t)) @@ -773,11 +773,12 @@ (defun mml2015-pgg-clear-verify () (let ((pgg-errors-buffer mml2015-result-buffer) - (text (current-buffer))) + (text (buffer-string)) + (coding-system buffer-file-coding-system)) (if (condition-case err (prog1 (mm-with-unibyte-buffer - (insert-buffer text) + (insert (encode-coding-string text coding-system)) (pgg-verify-region (point-min) (point-max) nil t)) (goto-char (point-min)) (while (search-forward "\r\n" nil t) @@ -818,7 +819,7 @@ (goto-char (point-max)) (insert (format "\n--%s\n" boundary)) (insert "Content-Type: application/pgp-signature\n\n") - (insert-buffer pgg-output-buffer) + (insert-buffer-substring pgg-output-buffer) (goto-char (point-max)) (insert (format "--%s--\n" boundary)) (goto-char (point-max)))) @@ -846,7 +847,7 @@ (insert "Version: 1\n\n") (insert (format "--%s\n" boundary)) (insert "Content-Type: application/octet-stream\n\n") - (insert-buffer pgg-output-buffer) + (insert-buffer-substring pgg-output-buffer) (goto-char (point-max)) (insert (format "--%s--\n" boundary)) (goto-char (point-max)))) diff --git a/lisp/nnimap.el b/lisp/nnimap.el index bc576f4..6daace9 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -192,7 +192,7 @@ RFC2060 section 6.4.4." :type 'string) (defcustom nnimap-split-fancy nil - "Like the variable `nnmail-split-fancy', which see." + "Like the variable `nnmail-split-fancy'." :group 'nnimap :type 'sexp) diff --git a/lisp/nntp.el b/lisp/nntp.el index f3faa73..c45d6c4 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -107,8 +107,8 @@ The default is \"rsh\", but \"ssh\" is a popular alternative.") "*Switches given to the rlogin command `nntp-via-rlogin-command'. If you use \"ssh\" for `nntp-via-rlogin-command', you may set this to \(\"-C\") in order to compress all data connections, otherwise set this -to \(\"-t\") or (\"-C\" \"-t\") if the telnet command requires a pseudo-tty -allocation on an intermediate host.") +to \(\"-t\" \"-e\" \"none\") or (\"-C\" \"-t\" \"-e\" \"none\") if the telnet +command requires a pseudo-tty allocation on an intermediate host.") (defvoo nntp-via-telnet-command "telnet" "*Telnet command used to connect to an intermediate host. @@ -1782,7 +1782,15 @@ Please refer to the following variables to customize the connection: (nntp-wait-for-string "^\r*20[01]") (beginning-of-line) (delete-region (point-min) (point)) - proc))) + (process-send-string proc "\^]") + (nntp-wait-for-string "^r?telnet") + (process-send-string proc "mode character\n") + (accept-process-output proc 1) + (sit-for 1) + (goto-char (point-min)) + (forward-line 1) + (delete-region (point) (point-max))) + proc)) (defun nntp-open-via-telnet-and-telnet (buffer) "Open a connection to an nntp server through an intermediate host. diff --git a/lisp/pgg.el b/lisp/pgg.el index 407e5c1..f69298c 100644 --- a/lisp/pgg.el +++ b/lisp/pgg.el @@ -179,7 +179,7 @@ the region." (interactive "r") (let* ((buf (current-buffer)) (packet (cdr (assq 1 (with-temp-buffer - (insert-buffer buf) + (insert-buffer-substring buf) (pgg-decode-armor-region (point-min) (point-max)))))) (key (cdr (assq 'key-identifier packet))) diff --git a/lisp/spam.el b/lisp/spam.el index 7ba3503..ff63026 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -473,8 +473,8 @@ your main source of newsgroup names." (when (stringp group) ; this routine will do nothing ; without a valid group (dolist (article articles) - (when (spam-group-spam-mark-p gnus-newsgroup-name - (gnus-summary-article-mark article)) + (when (spam-group-ham-mark-p gnus-newsgroup-name + (gnus-summary-article-mark article)) (push article tomove))) ;; now do the actual move @@ -595,7 +595,7 @@ example like this: (: spam-split) See the Info node `(gnus)Fancy Mail Splitting' for more details." (interactive) - + (save-excursion (dolist (check spam-list-of-statistical-checks) (when (symbol-value check) (widen) @@ -612,7 +612,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (setq decision (funcall (cdr pair)))))) (if (eq decision t) nil - decision))) + decision)))) (defun spam-setup-widening () (dolist (check spam-list-of-statistical-checks) diff --git a/texi/ChangeLog b/texi/ChangeLog index b0e3b77..93b7209 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,48 @@ +2003-04-13 Lars Magne Ingebrigtsen + + * gnus.texi (Misc Article): Addition. + +2003-04-12 Lars Magne Ingebrigtsen + + * message.texi (Message Headers): Addition. + +2003-04-12 Jesper Harder + + * emacs-mime.texi (Encoding Customization): Update default for + mm-body-charset-encoding-alist. + +2003-04-08 Jesper Harder + + * emacs-mime.texi (Non-MIME): Add diff. + +2003-04-07 Jesper Harder + + * message.texi (Security): Fix typo. + +2003-04-06 Reiner Steib + + * gnus.texi: Changed ~/.gnus and .gnus.el to ~/.gnus.el + +2003-04-02 Reiner Steib + + * gnus.texi (Gnus Versions): Index. + (Summary Score Commands): Decribe keys in `*Score Trace*' buffer. + +2003-04-01 Reiner Steib + + * gnus.texi (Article Button Levels): Added + `gnus-button-ctan-directory-regexp' + +2003-04-01 Katsumi Yamaoka + + * gnus.texi (Indirect Functions): Fix examples for + nntp-via-rlogin-command-switches. + +2003-03-31 Reiner Steib + + * gnus.texi (Article Button Levels): New node. + (Article Buttons): Additions. + 2003-03-31 Lars Magne Ingebrigtsen * gnus.texi (Exiting Gnus): Removed gnus-unload. diff --git a/texi/emacs-mime.texi b/texi/emacs-mime.texi index f249157..a36c5b0 100644 --- a/texi/emacs-mime.texi +++ b/texi/emacs-mime.texi @@ -135,8 +135,8 @@ descend the message, following the structure, and return a tree of @vindex mm-uu-configure-list Gnus also understands some non-@sc{mime} attachments, such as -postscript, uuencode, binhex, yenc, shar, forward, gnatsweb, pgp. -Each of these features can be disabled by add an item into +postscript, uuencode, binhex, yenc, shar, forward, gnatsweb, pgp, +diff. Each of these features can be disabled by add an item into @code{mm-uu-configure-list}. For example, @lisp @@ -187,9 +187,17 @@ PGP public keys. @item emacs-sources @findex emacs-sources +@vindex mm-uu-emacs-sources-regexp Emacs source code. This item works only in the groups matching @code{mm-uu-emacs-sources-regexp}. +@item diff +@vindex diff +@vindex mm-uu-diff-groups-regexp +Patches. This is intended for groups where diffs of committed files +are automatically sent to. It only works in groups matching +@code{mm-uu-diff-groups-regexp}. + @end table @node Handles @@ -769,8 +777,17 @@ This plain text part is an attachment. Mapping from @sc{mime} charset to encoding to use. This variable is usually used except, e.g., when other requirements force a specific encoding (digitally signed messages require 7bit encodings). The -default is @code{((iso-2022-jp . 7bit) (iso-2022-jp-2 . 7bit))}. As -an example, if you do not want to have ISO-8859-1 characters +default is + +@lisp +((iso-2022-jp . 7bit) + (iso-2022-jp-2 . 7bit) + (utf-16 . base64) + (utf-16be . base64) + (utf-16le . base64)) +@end lisp + +As an example, if you do not want to have ISO-8859-1 characters quoted-printable encoded, you may add @code{(iso-8859-1 . 8bit)} to this variable. You can override this setting on a per-message basis by using the @code{encoding} MML tag (@pxref{MML Definition}). diff --git a/texi/gnus.texi b/texi/gnus.texi index e7370d1..2a0898c 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -33,7 +33,7 @@ \makeindex \begin{document} -\newcommand{\gnusversionname}{Oort Gnus v0.17} +\newcommand{\gnusversionname}{Oort Gnus v0.18} \newcommand{\gnuschaptername}{} \newcommand{\gnussectionname}{} @@ -387,7 +387,7 @@ can be gotten by any nefarious means you can think of---@sc{nntp}, local spool or your mbox file. All at the same time, if you want to push your luck. -This manual corresponds to Oort Gnus v0.17. +This manual corresponds to Oort Gnus v0.18. @end ifinfo @@ -608,6 +608,7 @@ Article Treatment * Article Washing:: Lots of way-neat functions to make life better. * Article Header:: Doing various header transformations. * Article Buttons:: Click on URLs, Message-IDs, addresses and the like. +* Article Button Levels:: Controlling appearance of buttons. * Article Date:: Grumble, UT! * Article Display:: Display various stuff---X-Face, Picons, Smileys * Article Signature:: What is a signature? @@ -760,7 +761,7 @@ Gnus Unplugged * Agent and IMAP:: How to use the Agent with IMAP. * Outgoing Messages:: What happens when you post/mail something? * Agent Variables:: Customizing is fun. -* Example Setup:: An example @file{.gnus.el} file for offline people. +* Example Setup:: An example @file{~/.gnus.el} file for offline people. * Batching Agents:: How to fetch news from a @code{cron} job. * Agent Caveats:: What you think it'll do and what it does. @@ -947,7 +948,7 @@ If you want to start Gnus in a different frame, you can use the command @kbd{M-x gnus-other-frame} instead. If things do not go smoothly at startup, you have to twiddle some -variables in your @file{~/.gnus} file. This file is similar to +variables in your @file{~/.gnus.el} file. This file is similar to @file{~/.emacs}, but is read when gnus starts. If you puzzle at any terms used in this manual, please refer to the @@ -1626,7 +1627,7 @@ in a while from the group buffer instead (@pxref{Group Maintenance}). If non-@code{nil}, the startup message won't be displayed. That way, your boss might not notice as easily that you are reading news instead of doing your job. Note that this variable is used before -@file{.gnus.el} is loaded, so it should be set in @file{.emacs} instead. +@file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead. @item gnus-no-groups-message @vindex gnus-no-groups-message @@ -3491,7 +3492,7 @@ Hot and bothered? If you want this permanently enabled, you should add that minor mode to the hook for the group mode. Put the following line in your -@file{~/.gnus} file: +@file{~/.gnus.el} file: @lisp (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) @@ -4260,7 +4261,7 @@ trick: @vindex gnus-init-file @cindex reading init file Re-read the init file (@code{gnus-init-file}, which defaults to -@file{~/.gnus}) (@code{gnus-group-read-init-file}). +@file{~/.gnus.el}) (@code{gnus-group-read-init-file}). @item s @kindex s (Group) @@ -4677,7 +4678,7 @@ You also have to instruct Gnus to display the data by changing the @code{gnus-summary-line-format} variable. In summary, you'd typically put something like the following in -@file{~/.gnus}: +@file{~/.gnus.el}: @lisp (setq gnus-extra-headers @@ -7905,6 +7906,7 @@ these articles easier. * Article Washing:: Lots of way-neat functions to make life better. * Article Header:: Doing various header transformations. * Article Buttons:: Click on URLs, Message-IDs, addresses and the like. +* Article Button Levels:: Controlling appearance of buttons. * Article Date:: Grumble, UT! * Article Display:: Display various stuff---X-Face, Picons, Smileys * Article Signature:: What is a signature? @@ -8611,9 +8613,9 @@ button on these references. @vindex gnus-button-man-handler Gnus adds @dfn{buttons} to certain standard references by default: -Well-formed URLs, mail addresses, Message-IDs, Info links and man pages. -This is controlled by two variables, one that handles article bodies and -one that handles article heads: +Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and +Emacs or Gnus related references. This is controlled by two variables, +one that handles article bodies and one that handles article heads: @table @code @@ -8632,7 +8634,7 @@ All text that match this regular expression (case insensitive) will be considered an external reference. Here's a typical regexp that matches embedded URLs: @samp{]*\\)>}. This can also be a variable containing a regexp, useful variables to use include -@code{gnus-button-url-regexp}. +@code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}. @item button-par Gnus has to know which parts of the matches is to be highlighted. This @@ -8642,7 +8644,11 @@ highlighted. If you want it all highlighted, you use 0 here. @item use-p This form will be @code{eval}ed, and if the result is non-@code{nil}, this is considered a match. This is useful if you want extra sifting to -avoid false matches. +avoid false matches. Often variables named +@code{gnus-button-@var{*}-level} are used here, @xref{Article Button +Levels}, but any other form may be used too. + +@c @code{use-p} is @code{eval}ed only if @code{regexp} matches. @item function This function will be called when you click on this button. @@ -8671,11 +8677,70 @@ used to say what headers to apply the buttonize coding to: @var{header} is a regular expression. +@subsubheading Related variables and functions + +@item gnus-button-@var{*}-level +@xref{Article Button Levels}. + +@c Stuff related to gnus-button-browse-level + @item gnus-button-url-regexp @vindex gnus-button-url-regexp A regular expression that matches embedded URLs. It is used in the default values of the variables above. +@c Stuff related to gnus-button-man-level + +@item gnus-button-man-handler +@vindex gnus-button-man-handler +The function to use for displaying man pages. It must take at least one +argument with a string naming the man page. + +@c Stuff related to gnus-button-message-level + +@item gnus-button-mid-or-mail-regexp +@vindex gnus-button-mid-or-mail-regexp +Regular expression that matches a message ID or a mail address. + +@item gnus-button-prefer-mid-or-mail +@vindex gnus-button-prefer-mid-or-mail +This variable determines what to do when the button on a string as +@samp{foo123@@bar.invalid} is pushed. Strings like this can be either a +message ID or a mail address. If it is one of the symbols @code{mid} or +@code{mail}, Gnus will always assume that the string is a message ID or +a mail address, respectivly. If this variable is set to the symbol +@code{ask}, always query the user what do do. If it is a function, this +function will be called with the string as it's only argument. The +function must return @code{mid}, @code{mail}, @code{invalid} or +@code{ask}. The default value is the function +@code{gnus-button-mid-or-mail-heuristic}. + +@item gnus-button-mid-or-mail-heuristic +@findex gnus-button-mid-or-mail-heuristic +Function that guesses whether it's argument is a message ID or a mail +address. Returns @code{mid} it's a message IDs, @code{mail} if it's a +mail address, @code{ask} if unsure and @code{invalid} if the string is +invalid. + +@item gnus-button-mid-or-mail-heuristic-alist +@vindex gnus-button-mid-or-mail-heuristic-alist +An alist of @code{(RATE . REGEXP)} pairs used by the function +@code{gnus-button-mid-or-mail-heuristic}. + +@c Stuff related to gnus-button-tex-level + +@item gnus-button-ctan-handler +@findex gnus-button-ctan-handler +The function to use for displaying CTAN links. It must take one +argument, the string naming the URL. + +@item gnus-ctan-url +@vindex gnus-ctan-url +Top directory of a CTAN (Comprehensive TeX Archive Network) archive used +by @code{gnus-button-ctan-handler}. + +@c Misc stuff + @item gnus-article-button-face @vindex gnus-article-button-face Face used on buttons. @@ -8689,6 +8754,74 @@ Face used when the mouse cursor is over a button. @xref{Customizing Articles}, for how to buttonize articles automatically. +@node Article Button Levels +@subsection Article button levels +@cindex button levels +The higher the value of the variables @code{gnus-button-@var{*}-level}, +the more buttons will appear. If the level is zero, no corresponding +buttons are displayed. With the default value (which is 5) you should +already see quite a lot of buttons. With higher levels, you will see +more buttons, but you may also get more false positives. To avoid them, +you can set the variables @code{gnus-button-@var{*}-level} local to +specific groups (@pxref{Group Parameters}). Here's an example for the +variable @code{gnus-parameters}: + +@lisp +;; increase `gnus-button-*-level' in some groups: +(setq gnus-parameters + '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10)) + ("\\" (gnus-button-man-level 10)) + ("\\" (gnus-button-tex-level 10)))) +@end lisp + +@table @code + +@item gnus-button-browse-level +@vindex gnus-button-browse-level +Controls the display of references to message IDs, mail addresses and +news URLs. Related variables and functions include +@code{gnus-button-url-regexp}, @code{browse-url}, and +@code{browse-url-browser-function}. + +@item gnus-button-emacs-level +@vindex gnus-button-emacs-level +Controls the display of Emacs or Gnus references. Related functions are +@code{gnus-button-handle-custom}, +@code{gnus-button-handle-describe-function}, +@code{gnus-button-handle-describe-variable}, +@code{gnus-button-handle-symbol}, +@code{gnus-button-handle-describe-key}, +@code{gnus-button-handle-apropos}, +@code{gnus-button-handle-apropos-command}, +@code{gnus-button-handle-apropos-variable}, +@code{gnus-button-handle-apropos-documentation}, and +@code{gnus-button-handle-library}. + +@item gnus-button-man-level +@vindex gnus-button-man-level +Controls the display of references to (Unix) man pages. +See @code{gnus-button-man-handler}. + +@item gnus-button-message-level +@vindex gnus-button-message-level +Controls the display of message IDs, mail addresses and news URLs. +Related variables and functions include +@code{gnus-button-mid-or-mail-regexp}, +@code{gnus-button-prefer-mid-or-mail}, +@code{gnus-button-mid-or-mail-heuristic}, and +@code{gnus-button-mid-or-mail-heuristic-alist}. + +@item gnus-button-tex-level +@vindex gnus-button-tex-level +Controls the display of references to TeX or LaTeX stuff, e.g. for CTAN +URLs. See the variables @code{gnus-ctan-url}, +@code{gnus-button-ctan-handler}, +@code{gnus-button-ctan-directory-regexp}, and +@code{gnus-button-handle-ctan-bogus-regexp}. + +@end table + + @node Article Date @subsection Article Date @@ -8759,7 +8892,7 @@ If you want to have this line updated continually, you can put (gnus-start-date-timer) @end lisp -in your @file{.gnus.el} file, or you can run it off of some hook. If +in your @file{~/.gnus.el} file, or you can run it off of some hook. If you want to stop the timer, you can use the @code{gnus-stop-date-timer} command. @@ -9131,7 +9264,7 @@ such unenlightened users, you can make live easier by adding @end lisp @noindent -to your @file{.gnus.el} file. +to your @file{~/.gnus.el} file. @end table @@ -9650,7 +9783,7 @@ Here's the same thread displayed in a vertical tree buffer: If you're using horizontal trees, it might be nice to display the trees side-by-side with the summary buffer. You could add something like the -following to your @file{.gnus.el} file: +following to your @file{~/.gnus.el} file: @lisp (setq gnus-use-trees t @@ -10418,6 +10551,7 @@ Browse the mailing list archive, if List-Archive field exists. @end table + @node Article Buffer @chapter Article Buffer @cindex article buffer @@ -10984,6 +11118,11 @@ Hook called in article mode buffers. Syntax table used in article buffers. It is initialized from @code{text-mode-syntax-table}. +@vindex gnus-article-over-scroll +@item gnus-article-over-scroll +If non-@code{nil}, allow scrolling the article buffer even when there +no more new text to scroll in. The default is @code{nil}. + @vindex gnus-article-mode-line-format @item gnus-article-mode-line-format This variable is a format string along the same lines as @@ -12499,8 +12638,9 @@ List of strings to be used as the switches to @code{nntp-via-rlogin-command}. The default is @code{nil}. If you use @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to @samp{("-C")} in order to compress all data connections, otherwise set -this to @samp{("-t")} or @samp{("-C" "-t")} if the telnet command -requires a pseudo-tty allocation on an intermediate host. +this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if +the telnet command requires a pseudo-tty allocation on an intermediate +host. @end table @item nntp-open-via-telnet-and-telnet @@ -12776,7 +12916,7 @@ mail back end of your choice into @code{gnus-secondary-select-methods}, and things will happen automatically. For instance, if you want to use @code{nnml} (which is a ``one file per -mail'' back end), you could put the following in your @file{.gnus.el} file: +mail'' back end), you could put the following in your @file{~/.gnus.el} file: @lisp (setq gnus-secondary-select-methods '((nnml ""))) @@ -13856,7 +13996,7 @@ However, if you change group parameters, you'd have to update @code{nnmail-split-fancy} manually. You can do it by running @code{gnus-group-split-update}. If you'd rather have it updated automatically, just tell @code{gnus-group-split-setup} to do it for -you. For example, add to your @file{.gnus.el}: +you. For example, add to your @file{~/.gnus.el}: @lisp (gnus-group-split-setup AUTO-UPDATE CATCH-ALL) @@ -13986,7 +14126,7 @@ By default, if you have auto expiry switched on, Gnus will mark all the articles you read as expirable, no matter if they were read or unread before. To avoid having articles marked as read marked as expirable automatically, you can put something like the following in your -@file{.gnus.el} file: +@file{~/.gnus.el} file: @vindex gnus-mark-article-hook @lisp @@ -15258,7 +15398,7 @@ lively discussion following the news articles. @code{nnslashdot} will let you read this forum in a convenient manner. The easiest way to read this source is to put something like the -following in your @file{.gnus.el} file: +following in your @file{~/.gnus.el} file: @lisp (setq gnus-secondary-select-methods @@ -15521,7 +15661,7 @@ entry in @code{gnus-secondary-select-methods}. With this, Gnus will manipulate mails stored on the @sc{imap} server. This is the kind of usage explained in this section. -A server configuration in @file{~/.gnus} with a few @sc{imap} servers +A server configuration in @file{~/.gnus.el} with a few @sc{imap} servers might look something like the following. (Note that for TLS/SSL, you need external programs and libraries, see below.) @@ -17001,7 +17141,7 @@ Of course, to use it as such, you have to learn a few new commands. * Agent and IMAP:: How to use the Agent with IMAP. * Outgoing Messages:: What happens when you post/mail something? * Agent Variables:: Customizing is fun. -* Example Setup:: An example @file{.gnus.el} file for offline people. +* Example Setup:: An example @file{~/.gnus.el} file for offline people. * Batching Agents:: How to fetch news from a @code{cron} job. * Agent Caveats:: What you think it'll do and what it does. @end menu @@ -17974,7 +18114,7 @@ ignores articles that have not been fetched), @code{unfetched} If you don't want to read this manual, and you have a fairly standard setup, you may be able to use something like the following as your -@file{.gnus.el} file to get started. +@file{~/.gnus.el} file to get started. @lisp ;;; Define how Gnus is to fetch news. We do this over @sc{nntp} @@ -18140,7 +18280,10 @@ Display the score of the current article @kindex V t (Summary) @findex gnus-score-find-trace Display all score rules that have been used on the current article -(@code{gnus-score-find-trace}). +(@code{gnus-score-find-trace}). In the @code{*Score Trace*} buffer, you +can use @kbd{q} to quit. @kbd{e} edits the corresponding score file. +When point is on a string within the match element, @kbd{e} will try to +bring you to this string in the score file. @item V w @kindex V w (Summary) @@ -19205,7 +19348,7 @@ Newsgroups} section of the manual, it's explained in greater detail what this mechanism does, but here's a cookbook example for @code{nnml} on how to allow scoring on the @samp{To} and @samp{Cc} headers. -Put the following in your @file{.gnus.el} file. +Put the following in your @file{~/.gnus.el} file. @lisp (setq gnus-extra-headers '(To Cc Newsgroups Keywords) @@ -20597,7 +20740,7 @@ you want to change the @code{article} setting, you could say: @end lisp You'd typically stick these @code{gnus-add-configuration} calls in your -@file{.gnus.el} file or in some startup hook---they should be run after +@file{~/.gnus.el} file or in some startup hook---they should be run after Gnus has been loaded. @vindex gnus-always-force-window-configuration @@ -20682,7 +20825,7 @@ satisfied. This will result in the new specs being byte-compiled, and you'll get top speed again. Gnus will save these compiled specs in the @file{.newsrc.eld} file. (User-defined functions aren't compiled by this function, though---you should compile them yourself by sticking -them into the @file{.gnus.el} file and byte-compiling that file.) +them into the @file{~/.gnus.el} file and byte-compiling that file.) @node Mode Lines @@ -20936,7 +21079,7 @@ seconds. This is 60 by default. If you change that variable, all the timings in the handlers will be affected.) So, if you want to add a handler, you could put something like this in -your @file{.gnus.el} file: +your @file{~/.gnus.el} file: @findex gnus-demon-add-handler @lisp @@ -20953,7 +21096,7 @@ Some ready-made functions to do this have been created: @code{gnus-demon-add-nntp-close-connection}, @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and @code{gnus-demon-add-scanmail}. Just put those functions in your -@file{.gnus.el} if you want those abilities. +@file{~/.gnus.el} if you want those abilities. @findex gnus-demon-init @findex gnus-demon-cancel @@ -21177,7 +21320,7 @@ buffers. Put (add-hook 'gnus-summary-mode-hook 'gnus-moderate) @end lisp -in your @file{.gnus.el} file. +in your @file{~/.gnus.el} file. If you are the moderator of @samp{rec.zoofle}, this is how it's supposed to work: @@ -21312,7 +21455,7 @@ Ordered list of suffixes on picon file names to try. Defaults to currently the only package that uses Smiley, it is documented here. In short---to use Smiley in Gnus, put the following in your -@file{.gnus.el} file: +@file{~/.gnus.el} file: @lisp (setq gnus-treat-display-smileys t) @@ -21422,7 +21565,7 @@ converts the file to X-Face format by using the @code{gnus-convert-image-to-x-face-command} shell command. Here's how you would typically use the first function. Put something -like the following in your @file{.gnus.el} file: +like the following in your @file{~/.gnus.el} file: @lisp (setq message-required-news-headers @@ -22592,7 +22735,7 @@ The filename used to store the dictionary. This defaults to @subsubsection Splitting mail using spam-stat In order to use @code{spam-stat} to split your mail, you need to add the -following to your @file{~/.gnus} file: +following to your @file{~/.gnus.el} file: @lisp (require 'spam-stat) @@ -22713,7 +22856,7 @@ spam-stat-split-fancy)} to @code{nnmail-split-fancy} @end defun Make sure you load the dictionary before using it. This requires the -following in your @file{~/.gnus} file: +following in your @file{~/.gnus.el} file: @lisp (require 'spam-stat) @@ -22768,10 +22911,10 @@ Most Gnus storage file and directory variables will be initialized from this variable, which defaults to the @samp{SAVEDIR} environment variable, or @file{~/News/} if that variable isn't set. -Note that Gnus is mostly loaded when the @file{.gnus.el} file is read. +Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read. This means that other directory variables that are initialized from this variable won't be set properly if you set this variable in -@file{.gnus.el}. Set this variable in @file{.emacs} instead. +@file{~/.gnus.el}. Set this variable in @file{.emacs} instead. @item gnus-default-directory @vindex gnus-default-directory @@ -22964,6 +23107,7 @@ renamed it back again to ``Gnus''. But in mixed case. ``Gnus'' vs. @cindex Pterodactyl Gnus @cindex Oort Gnus @cindex No Gnus +@cindex Gnus versions The first ``proper'' release of Gnus 5 was done in November 1995 when it was included in the Emacs 19.30 distribution (132 (ding) Gnus releases @@ -23362,13 +23506,21 @@ The following people have contributed many patches and suggestions: Christopher Davis, Andrew Eskilsson, Kai Grossjohann, +Kevin Greiner, +Jesper Harder, +Paul Jarc, +Simon Josefsson, David Kågedal, Richard Pieri, Fabrice Popineau, Daniel Quinlan, +Michael Shields, +Reiner Steib, Jason L. Tibbitts, III, +Jack Vinson, +Katsumi Yamaoka, @c Yamaoka and -Jack Vinson. +Teodor Zlatanov. Also thanks to the following for patches and stuff: @@ -23439,7 +23591,7 @@ D. Hall, Magnus Hammerin, Kenichi Handa, @c Handa Raja R. Harinath, -Yoshiki Hayashi, @c ? +Yoshiki Hayashi, @c Hayashi P. E. Jareth Hein, Hisashige Kenji, @c Hisashige Scott Hofmann, @@ -23449,7 +23601,7 @@ Richard Hoskins, Brad Howes, Miguel de Icaza, François Felix Ingrand, -Tatsuya Ichikawa, @c ? +Tatsuya Ichikawa, @c Ichikawa Ishikawa Ichiro, @c Ishikawa Lee Iverson, Iwamuro Motonori, @c Iwamuro @@ -23459,7 +23611,6 @@ Adam P. Jenkins, Randell Jesup, Fred Johansen, Gareth Jones, -Simon Josefsson, Greg Klanderman, Karl Kleinpaste, Michael Klingbeil, @@ -23563,7 +23714,6 @@ Barry A. Warsaw, Christoph Wedler, Joe Wells, Lee Willis, -Katsumi Yamaoka @c Yamaoka and Lloyd Zusman. @@ -23648,8 +23798,8 @@ manner, so it should be difficult to lose much data on what you have read if your machine should go down (@pxref{Auto Save}). @item -Gnus now has its own startup file (@file{.gnus.el}) to avoid cluttering up -the @file{.emacs} file. +Gnus now has its own startup file (@file{~/.gnus.el}) to avoid +cluttering up the @file{.emacs} file. @item You can set the process mark on both groups and articles and perform diff --git a/texi/message.texi b/texi/message.texi index 2acb991..3b86fb6 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1031,7 +1031,7 @@ $ openssl pkcs12 -in ns.p12 -clcerts -nodes > key+cert.pem The @file{key+cert.pem} file should be pointed to from the @code{smime-keys} variable. You should now be able to send signed mail. -@emph{Note!} Your private key is store unencrypted in the file, so take +@emph{Note!} Your private key is stored unencrypted in the file, so take care in handling it. @subsection Using PGP/MIME @@ -1364,6 +1364,17 @@ Specifies what to do when there are no recipients other than allowed. If it is @code{never}, the posting is not allowed. If it is @code{ask} (the default), you are prompted. +@item message-hidden-headers +@vindex message-hidden-headers +A regexp, a list of regexps, or a list where the first element is +@code{not} and the rest are regexps. It says which headers to keep +hidden when composing a message. + +@lisp +(setq message-hidden-headers + '(not "From" "Subject" "To" "Cc" "Newsgroups")) +@end lisp + @end table