+2003-04-13 01:12:01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no>
+
+ * gnus.el: Oort Gnus v0.18 is released.
+
+2003-04-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-draft.el (gnus-draft-send): Add message-hidden-headers.
+
+2003-04-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * 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 <harder@ifa.au.dk>
+
+ * 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 <kgreiner@xpediantsolutions.com>
+
+ * 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 <harder@ifa.au.dk>
+
+ * gnus-sum.el (gnus-summary-make-menu-bar): Disable "Encrypt
+ body" entry in read only groups.
+
+2003-04-09 Jesper Harder <harder@ifa.au.dk>
+
+ * gnus-sum.el (gnus-summary-make-menu-bar): Disable "Import file"
+ and "Create article" items in non-editable groups.
+
+2003-04-09 Kevin Greiner <kgreiner@xpediantsolutions.com>
+
+ * 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 <harder@ifa.au.dk>
+
+ * mm-uu.el (mm-uu-copy-to-buffer): buffer-file-coding-system
+ might be unbound in non-MULE XEmacsen.
+
+2003-04-08 Jesper Harder <harder@ifa.au.dk>
+
+ * 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 <harder@ifa.au.dk>
+
+ * 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 <yamaoka@jpl.org>
+
+ * mm-bodies.el (mm-decode-body): Silence XEmacs when compiling.
+
+2003-04-06 Jesper Harder <harder@ifa.au.dk>
+
+ * 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 <tzz@lifelogs.com>
+
+ * 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 <shields@msrl.com>)
+
+2003-04-05 Steve Youngs <youngs@xemacs.org>
+
+ * 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 <kgreiner@xpediantsolutions.com>
+
+ * 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 <harder@ifa.au.dk>
+
+ * gnus-audio.el (gnus-audio-au-player, gnus-audio-wav-player):
+ Fix customization type.
+
+2003-04-04 Kevin Greiner <kgreiner@xpediantsolutions.com>
+
+ * 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 <harder@ifa.au.dk>
+
+ * 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 <harder@ifa.au.dk>
+
+ * earcon.el (earcon-regexp-alist): catmeow is a wav file.
+
+2003-04-03 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-art.el (gnus-button-ctan-directory-regexp): Changed meaning
+ and value.
+ (gnus-button-alist): Use it.
+
+2003-04-03 Jesper Harder <harder@ifa.au.dk>
+
+ * 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 <yamaoka@jpl.org>
+
+ * lpath.el: Fbind Info-directory and Info-menu.
+
+2003-04-02 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * 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 <Reiner.Steib@gmx.de>
+
+ * 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 <yamaoka@jpl.org>
+
+ * nntp.el (nntp-via-rlogin-command-switches): Doc fix.
+ (nntp-open-via-rlogin-and-telnet): Disable the telnet linemode.
+
+2003-03-31 Kevin Greiner <kgreiner@xpediantsolutions.com>
+
+ * 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 <Reiner.Steib@gmx.de>
+
+ * 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 <larsi@gnus.org>
+
+ * gnus.el (gnus-version-number): Bump.
+
2003-03-31 20:08:19 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no>
* gnus.el: Oort Gnus v0.17 is released.
2003-03-28 Vasily Korytov <deskpot@myrealbox.com>
* 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 <larsi@gnus.org>
2003-03-18 Jesper Harder <harder@ifa.au.dk>
* 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 <yamaoka@jpl.org>
;;; 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 <steve@miranova.com>
("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")
(require 'gnus)
(require 'gnus-cache)
+(require 'nnmail)
(require 'nnvirtual)
(require 'gnus-sum)
(require 'gnus-score)
: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)
(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
;;;
(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))
(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)))
;;; 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))
(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))
(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)
(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)
(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."
(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
;; 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
(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
(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
(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 ()
(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))
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile
+ (require 'cl)
+ (defvar tool-bar-map))
(require 'gnus)
(require 'gnus-sum)
(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")
: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
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)
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
: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)
: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\\(<?[a-z0-9][^<>\")!;:,{}\n\t ]*@"
gnus-button-valid-fqdn-regexp
(-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]")
;;
(defvar gnus-button-handle-describe-prefix "^\\(C-h\\|<?[Ff]1>?\\)")
+;; 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
(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
(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
: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)
- ("\\(<URL: *\\)mailto: *\\([^> \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)
+ ("\\(<URL: *\\)mailto: *\\([^> \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\\|<?[Ff]1>?\\)[ \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
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\\|<?[Ff]1>?\\)[ \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\\|<?[Ff]1>?\\)[ \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\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^']+\\)\\)'" 1
+ ("`\\(\\b\\(C-h\\|<?[Ff]1>?\\)[ \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...
- ("<URL: *\\([^<>]*\\)>" 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)...
+ ("<URL: *\\([^<>]*\\)>"
+ 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
(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
"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."
"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;
(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
(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
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.
"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))
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile
+ (require 'cl)
+ (defvar tool-bar-map))
(require 'gnus)
(require 'gnus-start)
(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)
(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.
(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
(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))
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile
+ (require 'cl)
+ (defvar tool-bar-map))
(require 'gnus)
(require 'gnus-group)
;; 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)))
["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]
["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))]
(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)))
(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))
: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
(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))
: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)
(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
(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
: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.
* `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
(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.
;; 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:
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"
(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)))
(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
(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
(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))
;;; 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 <larsi@gnus.org>
(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")
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)
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."
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)))
"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.
(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.")
;;; 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 <zsh@cs.rochester.edu>
;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp
(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-"
"^;;;?[ \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.
"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))))
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))
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")
(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\"; "
(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))
;;;
(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)
(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
(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))
(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)
(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)
;;(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
(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)
;;(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
(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))
;;(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
;;; 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 <zsh@cs.rochester.edu>
;; Keywords: PGP MIME MML
(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))))
(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)))))
(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))))))
(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))
(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)
(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))))
(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))))
: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)
"*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.
(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.
(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)))
(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
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)
(setq decision (funcall (cdr pair))))))
(if (eq decision t)
nil
- decision)))
+ decision))))
(defun spam-setup-widening ()
(dolist (check spam-list-of-statistical-checks)
+2003-04-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus.texi (Misc Article): Addition.
+
+2003-04-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * message.texi (Message Headers): Addition.
+
+2003-04-12 Jesper Harder <harder@ifa.au.dk>
+
+ * emacs-mime.texi (Encoding Customization): Update default for
+ mm-body-charset-encoding-alist.
+
+2003-04-08 Jesper Harder <harder@ifa.au.dk>
+
+ * emacs-mime.texi (Non-MIME): Add diff.
+
+2003-04-07 Jesper Harder <harder@ifa.au.dk>
+
+ * message.texi (Security): Fix typo.
+
+2003-04-06 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus.texi: Changed ~/.gnus and .gnus.el to ~/.gnus.el
+
+2003-04-02 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus.texi (Gnus Versions): Index.
+ (Summary Score Commands): Decribe keys in `*Score Trace*' buffer.
+
+2003-04-01 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus.texi (Article Button Levels): Added
+ `gnus-button-ctan-directory-regexp'
+
+2003-04-01 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus.texi (Indirect Functions): Fix examples for
+ nntp-via-rlogin-command-switches.
+
+2003-03-31 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus.texi (Article Button Levels): New node.
+ (Article Buttons): Additions.
+
2003-03-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Exiting Gnus): Removed gnus-unload.
@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
@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
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}).
\makeindex
\begin{document}
-\newcommand{\gnusversionname}{Oort Gnus v0.17}
+\newcommand{\gnusversionname}{Oort Gnus v0.18}
\newcommand{\gnuschaptername}{}
\newcommand{\gnussectionname}{}
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
* 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?
* 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.
@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
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
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)
@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)
@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
* 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?
@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
considered an external reference. Here's a typical regexp that matches
embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}. 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
@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.
@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.
@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))
+ ("\\<unix\\>" (gnus-button-man-level 10))
+ ("\\<tex\\>" (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
(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.
@end lisp
@noindent
-to your @file{.gnus.el} file.
+to your @file{~/.gnus.el} file.
@end table
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
@end table
+
@node Article Buffer
@chapter Article Buffer
@cindex article buffer
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
@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
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 "")))
@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)
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
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
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.)
* 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
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}
@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)
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)
@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
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
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
@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
(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:
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)
@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
@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)
@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)
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
@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
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:
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,
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
Randell Jesup,
Fred Johansen,
Gareth Jones,
-Simon Josefsson,
Greg Klanderman,
Karl Kleinpaste,
Michael Klingbeil,
Christoph Wedler,
Joe Wells,
Lee Willis,
-Katsumi Yamaoka @c Yamaoka
and
Lloyd Zusman.
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
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
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