cd lisp; $(MAKE) EMACS=$(EMACS) some
info:
- cd texi; $(MAKE) all
+ cd texi; $(MAKE) EMACS=$(EMACS) all
+Mon Jul 10 10:44:46 1995 Lars Magne Ingebrigtsen <lingebri@sunscipw.cern.ch>
+
+ * gnus-ems.el (gnus-ems-redefine): Redefine for XEmacs.
+
+ * gnus.el (gnus-summary-expire-articles-now): New function and
+ keystrokem by popular demand.
+ (gnus-summary-exit-hook): New variable.
+
+ * gnus-vis.el (gnus-visual-turn-off-edit-menus): New function.
+
+ * nnml.el (nnml-request-expire-articles): When you have found one
+ new article, the rest are probably also new, so stop checking,
+ already.
+ * nnbabyl.el (nnbabyl-request-expire-articles): Ditto.
+ * nnfolder.el (nnfolder-request-expire-articles): Ditto.
+ * nnmh.el (nnmh-request-expire-articles): Ditto.
+ * nnmbox.el (nnmbox-request-expire-articles): Ditto.
+
+ * gnus-ems.el: Setq gnus-display-type and gnus-background-mode for
+ XEmacs.
+
+ * gnus-vis.el (gnus-summary-highlight): Defvarred twice.
+
+ * gnus-uu.el (gnus-uu-uustrip-article): Remove any non-body line
+ after the begin line.
+
+Sun Jul 9 15:01:58 1995 Lars Magne Ingebrigtsen <lingebri@sunscipw.cern.ch>
+
+ * gnus-uu.el (gnus-uu-get-actions): Substitute "file" for
+ "gnus-uu-archive".
+
+ * gnus-vis.el (gnus-group-make-menu-bar): Disable the Edit menu in
+ all Gnus modes.
+
+ * gnus-msg.el (gnus-insert-mime-headers): New function.
+ (gnus-inews-insert-headers): Make deletable headers italic.
+ (gnus-inews-check-post): Stricter From header checks.
+
+ * gnus.el (gnus-subject-equal): Would bug out on numerical
+ gather-limits.
+ (gnus-limit-string): New function.
+ (gnus-score-score-files): Translate the ":" to "/".
+ (gnus-score-find-bnews): Ditto.
+ ('gnus-startup-hook): Remove all hilit hooks by default.
+
+ * gnus-score.el (gnus-default-adaptive-score-alist): Don't let
+ ticks affect adaptive score.
+
+ * gnus-msg.el ('rmail): Require rmail.
+
+ * gnus-mh.el (gnus-mail-reply-using-mhe): Make sure the To isn't
+ empty.
+
+ * gnus-msg.el (gnus-inews-news): Don't restore window config if
+ article is rejected.
+
+ * gnus.el (gnus-summary-show-article): Now takes a prefix.
+ (gnus-browse-exit): List all groups on exit.
+ (gnus-summary-edit-article): Make sure the article buffer is the
+ selected window before editing.
+
Sat Jul 8 16:57:03 1995 Lars Magne Ingebrigtsen <lingebri@sunscipw.cern.ch>
+ * gnus.el: 0.92 is released.
+
* gnus.el (gnus-summary-fetch-faq): Get the real name.
(gnus-summary-fetch-faq): Don't do the config thing unless the
fetch is successful.
"Names of light colors.")
(defvar gnus-face-dark-name-list
- '("violetred3" "violetred2" "violetred1" "violetred3" "deepskyblue3" "deepskyblue2" "deepskyblue1" "deepskyblue"
- "dark salmon" "firebrick"
+ '("dark salmon" "firebrick"
"dark green" "dark orange" "dark khaki" "dark violet"
"dark turquoise")
"Names of dark colors.")
((string-match "XEmacs\\|Lucid" emacs-version)
;; XEmacs definitions.
+ (defvar gnus-summary-highlight
+ '(((> score default) . bold)
+ ((< score default) . italic))
+ "*Alist of `(FORM . FACE)'.
+Summary lines are highlighted with the FACE for the first FORM which
+evaluate to a non-nil value.
+
+Point will be at the beginning of the line when FORM is evaluated.
+The following can be used for convenience:
+
+score: (gnus-summary-article-score)
+default: gnus-summary-default-score
+below: gnus-summary-mark-below
+
+To check for marks, e.g. to underline replied articles, use
+`gnus-summary-article-mark':
+
+ ((= (gnus-summary-article-mark) gnus-replied-mark) . underline)")
+
(setq gnus-mouse-2 [button2])
(setq gnus-easymenu 'auc-menu)
(if props
(put-text-property start end (car props) (cdr props) buffer)
(remove-text-properties start end ())))))
+
+ (defvar gnus-header-face-alist
+ '(("" bold italic)))
(or (fboundp 'make-overlay) (fset 'make-overlay 'make-extent))
(or (fboundp 'overlay-put) (fset 'overlay-put 'set-extent-property))
(or (boundp 'standard-display-table) (setq standard-display-table nil))
(or (boundp 'read-event) (fset 'read-event 'next-command-event))
+ (setq gnus-display-type
+ (let ((display-resource
+ (x-get-resource ".displayType" "DisplayType" 'string)))
+ (cond (display-resource (intern (downcase display-resource)))
+ ((x-display-color-p) 'color)
+ ((x-display-grayscale-p) 'grayscale)
+ (t 'mono))))
+
+ (setq gnus-background-mode
+ (let ((bg-resource
+ (x-get-resource ".backgroundMode" "BackgroundMode" 'string))
+ (params (frame-parameters)))
+ (cond (bg-resource (intern (downcase bg-resource)))
+; ((< (apply '+ (x-color-values
+; (cdr (assq 'background-color params))))
+; (/ (apply '+ (x-color-values "white")) 3))
+; 'dark)
+ (t 'light))))
+
(if (not gnus-visual)
()
(setq gnus-group-mode-hook
(cond
((string-match "XEmacs\\|Lucid" emacs-version)
;; XEmacs definitions.
- (fset 'gnus-set-mouse-face (lambda (string) string))
-
+ (fset 'gnus-set-mouse-face 'identity)
(fset 'gnus-summary-make-display-table (lambda () nil))
+ (fset 'gnus-visual-turn-off-edit-menu 'identity)
(defun gnus-highlight-selected-summary ()
;; Added by Per Abrahamsen <amanda@iesd.auc.dk>.
nil)
(kill-buffer tmp-buf)))))))
+ (defun gnus-summary-insert-pseudos (pslist &optional not-view)
+ (let ((buffer-read-only nil)
+ (article (gnus-summary-article-number))
+ b)
+ (or (gnus-summary-goto-subject article)
+ (error (format "No such article: %d" article)))
+ (or gnus-newsgroup-headers-hashtb-by-number
+ (gnus-make-headers-hashtable-by-number))
+ (gnus-summary-position-cursor)
+ ;; If all commands are to be bunched up on one line, we collect
+ ;; them here.
+ (if gnus-view-pseudos-separately
+ ()
+ (let ((ps (setq pslist (sort pslist 'gnus-pseudos<)))
+ files action)
+ (while ps
+ (setq action (cdr (assq 'action (car ps))))
+ (setq files (list (cdr (assq 'name (car ps)))))
+ (while (and ps (cdr ps)
+ (string= (or action "1")
+ (or (cdr (assq 'action (car (cdr ps)))) "2")))
+ (setq files (cons (cdr (assq 'name (car (cdr ps)))) files))
+ (setcdr ps (cdr (cdr ps))))
+ (if (not files)
+ ()
+ (if (not (string-match "%s" action))
+ (setq files (cons " " files)))
+ (setq files (cons " " files))
+ (and (assq 'execute (car ps))
+ (setcdr (assq 'execute (car ps))
+ (funcall (if (string-match "%s" action)
+ 'format 'concat)
+ action
+ (mapconcat (lambda (f) f) files " ")))))
+ (setq ps (cdr ps)))))
+ (if (and gnus-view-pseudos (not not-view))
+ (while pslist
+ (and (assq 'execute (car pslist))
+ (gnus-execute-command (cdr (assq 'execute (car pslist)))
+ (eq gnus-view-pseudos 'not-confirm)))
+ (setq pslist (cdr pslist)))
+ (save-excursion
+ (while pslist
+ (gnus-summary-goto-subject (or (cdr (assq 'article (car pslist)))
+ (gnus-summary-article-number)))
+ (forward-line 1)
+ (setq b (point))
+ (insert " " (file-name-nondirectory
+ (cdr (assq 'name (car pslist))))
+ ": " (or (cdr (assq 'execute (car pslist))) "") "\n")
+ (add-text-properties
+ b (1+ b) (list 'gnus-number gnus-reffed-article-number
+ 'gnus-mark gnus-unread-mark
+ 'gnus-level 0
+ 'gnus-pseudo (car pslist)))
+ (remove-text-properties (b) (gnus-point-at-eol)
+ '(gnus-number nil gnus-mark nil gnus-level nil))
+ (forward-line -1)
+ (gnus-sethash (int-to-string gnus-reffed-article-number)
+ (car pslist) gnus-newsgroup-headers-hashtb-by-number)
+ (setq gnus-reffed-article-number (1- gnus-reffed-article-number))
+ (setq pslist (cdr pslist)))))))
+
)
(setq buffer (current-buffer))
(save-excursion
(save-restriction
- (or gnus-user-login-name ; we need this
+ (or gnus-user-login-name ; we need this
(setq gnus-user-login-name (or (getenv "USER")
(getenv "LOGNAME"))))
- (gnus-article-show-all-headers) ;; so colors are happy
+ (gnus-article-show-all-headers);; so colors are happy
;; lots of junk to avoid mh-send deleting other windows
(setq from (gnus-fetch-field "from")
subject (let ((subject (or (gnus-fetch-field "subject")
(setq mh-show-buffer buffer)))
(mh-find-path)
- (mh-send-sub to (or cc "")
- (or subject "(None)") config) ;; Erik Selberg 1/23/94
+ (mh-send-sub (or to "") (or cc "")
+ (or subject "(None)") config);; Erik Selberg 1/23/94
(let ((draft (current-buffer))
(gnus-mail-buffer (current-buffer))
(gnus-configure-windows 'reply)
(gnus-configure-windows 'reply-yank))
(setq mail-buf gnus-mail-buffer)
- (pop-to-buffer mail-buf) ;; always in the display, so won't have window probs
+ (pop-to-buffer mail-buf);; always in the display, so won't have window probs
(switch-to-buffer draft)
- (kill-buffer mail-buf) ;; mh-e don't use it!
+ (kill-buffer mail-buf);; mh-e don't use it!
)
;; (mh-send to (or cc "") subject);; shouldn't use according to mhe
(setq mh-previous-window-config config)
)
- ;; Then, yank original article if requested.
+ ;; Then, yank original article if requested.
(if yank
(let ((last (point)))
(mh-yank-cur-msg)
(let* ((to (read-string "To: "))
(cc (read-string "Cc: "))
(buffer (or buffer gnus-article-buffer))
- (config (current-window-configuration)) ;; need to add this - erik
+ (config (current-window-configuration));; need to add this - erik
(subject (gnus-forward-make-subject buffer)))
(setq mh-show-buffer buffer)
(mh-find-path)
- (mh-send-sub to (or cc "") (or subject "(None)") config) ;; Erik Selberg 1/23/94
+ (mh-send-sub to (or cc "") (or subject "(None)") config);; Erik Selberg 1/23/94
(let ((draft (current-buffer))
(gnus-mail-buffer (current-buffer))
mail-buf)
(gnus-configure-windows 'reply-yank)
(setq mail-buf (eval (cdr (assq 'mail gnus-window-to-buffer))))
- (pop-to-buffer mail-buf) ;; always in the display, so won't have window probs
+ (pop-to-buffer mail-buf);; always in the display, so won't have window probs
(switch-to-buffer draft)
)
(save-excursion
(require 'gnus)
(require 'sendmail)
(require 'gnus-ems)
+(require 'rmail)
(defvar gnus-organization-file "/usr/lib/news/organization"
"*Local news organization file.")
(or server-running
(gnus-close-server (gnus-find-method-for-group gnus-newsgroup-name)))
(let ((conf gnus-prev-winconf))
- (bury-buffer)
- ;; Restore last window configuration.
- (and conf (not error) (set-window-configuration conf)))))
+ (if (not error)
+ (progn
+ (bury-buffer)
+ ;; Restore last window configuration.
+ (and conf (set-window-configuration conf)))))))
(defun gnus-inews-check-post ()
"Check whether the post looks ok."
(save-excursion
(let* ((case-fold-search t)
(from (mail-fetch-field "from")))
- (or (not from)
- (and (string-match "@" from)
- (string-match "@[^\\.]*\\." from))
- (gnus-yes-or-no-p
- (format "The From looks strange: \"%s\". Really post? "
- from)))))))))
+ (cond
+ ((not from)
+ (gnus-yes-or-no-p "There is no From line. Really post? "))
+ ((not (string-match "@[^\\.]*\\." from))
+ (gnus-yes-or-no-p
+ (format
+ "The address looks strange: \"%s\". Really post? " from)))
+ ((string-match "(.*).*(.*)")
+ (gnus-yes-or-no-p
+ (format
+ "The From header looks strange: \"%s\". Really post? "
+ from)))))))
+ )))
;; Check for long lines.
(or (gnus-check-before-posting 'long-lines)
(save-excursion
(goto-char (point-min))
(and (re-search-forward
(concat "^" (symbol-name (car headers)) ": *") nil t)
- (get-text-property (1+ (match-end 0)) 'gnus-deletable)
+ (get-text-property (1+ (match-beginning 0)) 'gnus-deletable)
(gnus-delete-line))
(setq headers (cdr headers))))
;; Insert new Sender if the From is strange.
(read-from-minibuffer
(format "Empty header for %s; enter value: " header))))
;; Finally insert the header.
- (if (bolp)
- (save-excursion
- (goto-char (point-max))
- (insert (symbol-name header) ": ")
- ;; Add the deletable property to the headers that require it.
- (if (memq header gnus-deletable-headers)
- (add-text-properties
- (point) (progn (insert value) (point))
- '(gnus-deletable t) (current-buffer))
- (insert value))
- (insert "\n"))
- (replace-match value t t))))
+ (save-excursion
+ (if (bolp)
+ (progn
+ (goto-char (point-max))
+ (insert (symbol-name header) ": " value "\n")
+ (forward-line -1))
+ (replace-match value t t))
+ ;; Add the deletable property to the headers that require it.
+ (and (memq header gnus-deletable-headers)
+ (progn (beginning-of-line) (looking-at "[^:]+: "))
+ (add-text-properties
+ (point) (match-end 0)
+ '(gnus-deletable t face italic) (current-buffer))))))
(setq headers (cdr headers)))))
(defun gnus-inews-insert-signature ()
(goto-char (point-max))
(or (bolp) (insert "\n"))))))))
+;; Written by "Mr. Per Persson" <pp@solace.mh.se>.
+(defun gnus-inews-insert-mime-headers ()
+ (or (mail-position-on-field "Mime-Version")
+ (insert "1.0")
+ (cond ((save-excursion
+ (beginning-of-buffer)
+ (re-search-forward "[\200-\377]" nil t))
+ (or (mail-position-on-field "Content-Type")
+ (insert "text/plain; charset=ISO-8859-1"))
+ (or (mail-position-on-field "Content-Transfer-Encoding")
+ (insert "8bit")))
+ (t (or (mail-position-on-field "Content-Type")
+ (insert "text/plain; charset=US-ASCII"))
+ (or (mail-position-on-field "Content-Transfer-Encoding")
+ (insert "7bit"))))))
+
(defun gnus-inews-do-fcc ()
"Process FCC: fields in current article buffer.
Unless the first character of the field is `|', the article is saved
(defvar gnus-default-adaptive-score-alist
'((gnus-unread-mark)
- (gnus-ticked-mark (from 4))
+ (gnus-ticked-mark)
(gnus-dormant-mark (from 5))
(gnus-del-mark (from -4) (subject -1))
(gnus-read-mark (from 4) (subject 2))
(defun gnus-summary-header (header)
;; Return HEADER for current articles, or error.
(let ((article (gnus-summary-article-number))
- header)
+ headers)
(if article
- (if (setq header (gnus-get-header-by-number article))
- (aref header (nth 1 (assoc header gnus-header-index)))
+ (if (setq headers (gnus-get-header-by-number article))
+ (aref headers (nth 1 (assoc header gnus-header-index)))
(error "Pseudo-articles can't be scored"))
(error "No article on current line"))))
(setq name (cdr (assq 'name (car files))))
(and
(setq action (gnus-uu-get-action name))
- (setcar files (nconc (list (cons 'action action)
+ (setcar files (nconc (list (if (string= action "gnus-uu-archive")
+ (cons 'action "file")
+ (cons 'action action))
(cons 'execute (if (string-match "%" action)
(format action name)
(concat action " " name))))
(if (looking-at gnus-uu-begin-string)
(progn
- (setq name-end (match-end 1))
-
+ (setq name-end (match-end 1)
+ name-beg (match-beginning 1))
+ ;; Remove any non gnus-uu-body-line right after start.
+ (forward-line 1)
+ (or (looking-at gnus-uu-body-line)
+ (gnus-delete-line))
+
; Replace any slashes and spaces in file names before decoding
- (goto-char (setq name-beg (match-beginning 1)))
+ (goto-char name-beg)
(while (re-search-forward "/" name-end t)
(replace-match ","))
(goto-char name-beg)
;; Go through FILES and look for files to unpack.
(let* ((totfiles (gnus-uu-ls-r gnus-uu-work-dir))
(ofiles files)
- file did-unpack)
- (gnus-uu-add-file totfiles)
+ file did-unpack file-entry)
+ (gnus-uu-add-file totfiles)
(while files
- (setq file (cdr (assq 'name (car files))))
+ (setq file (cdr (setq file-entry (assq 'name (car files)))))
(if (and (not (member file ignore))
(equal (gnus-uu-get-action (file-name-nondirectory file))
"gnus-uu-archive"))
(list "Subject" nil
(custom-face-lookup "red" nil nil t t nil))
(list "Newsgroups:.*," nil
- (custom-face-lookup "firebrick" nil nil t t nil))
- (list "" 'bold
+ (custom-face-lookup "yellow" nil nil t t nil))
+ (list ""
+ (custom-face-lookup "cyan" nil nil t nil nil)
(custom-face-lookup "green" nil nil nil t nil))))
(t
(list (list "From" nil
- (custom-face-lookup "red" nil nil t t nil))
+ (custom-face-lookup "RoyalBlue" nil nil t t nil))
(list "Subject" nil
(custom-face-lookup "firebrick" nil nil t t nil))
(list "Newsgroups:.*," nil
- (custom-face-lookup "firebrick" nil nil t t nil))
- (list "" 'bold
+ (custom-face-lookup "dark orange" nil nil t t nil))
+ (list ""
+ (custom-face-lookup "purple" nil nil t nil nil)
(custom-face-lookup "DarkGreen" nil nil nil t nil)))))
"Alist of headers and faces used for highlighting them.
The entries in the list has the form `(REGEXP NAME CONTENT)', where
'highlight)
"Face used when the mouse is over the button.")
-(defvar gnus-summary-highlight
- '(((> score default) . bold)
- ((< score default) . italic))
- "*Alist of `(FORM . FACE)'.
-Summary lines are highlighted with the FACE for the first FORM which
-evaluate to a non-nil value.
-
-Point will be at the beginning of the line when FORM is evaluated.
-The following can be used for convenience:
-
-score: (gnus-summary-article-score)
-default: gnus-summary-default-score
-below: gnus-summary-mark-below
-
-To check for marks, e.g. to underline replied articles, use
-`gnus-summary-article-mark':
-
- ((= (gnus-summary-article-mark) gnus-replied-mark) . underline)")
-
(defvar gnus-signature-face 'italic
"Face used for signature.")
;;; gnus-menu
;;;
+(defun gnus-visual-turn-off-edit-menu (type)
+ (define-key (symbol-value (intern (format "gnus-%s-mode-map" type)))
+ [menu-bar edit] 'undefined))
+
;; Newsgroup buffer
(defun gnus-group-make-menu-bar ()
+ (gnus-visual-turn-off-edit-menu 'group)
+
(easy-menu-define
gnus-group-reading-menu
gnus-group-mode-map
;; Server mode
(defun gnus-server-make-menu-bar ()
+ (gnus-visual-turn-off-edit-menu 'server)
+
(easy-menu-define
gnus-server-menu
gnus-server-mode-map
;; Browse mode
(defun gnus-browse-make-menu-bar ()
+ (gnus-visual-turn-off-edit-menu 'browse)
+
(easy-menu-define
gnus-browse-menu
gnus-browse-mode-map
;; Summary buffer
(defun gnus-summary-make-menu-bar ()
+ (gnus-visual-turn-off-edit-menu 'summary)
(easy-menu-define
gnus-summary-mark-menu
;; Article buffer
(defun gnus-article-make-menu-bar ()
+ (gnus-visual-turn-off-edit-menu 'summary)
(easy-menu-define
gnus-article-article-menu
(defvar gnus-article-mode-hook nil
"*A hook for Gnus article mode.")
+(defun gnus-summary-exit-hook nil
+ "*A hook called on exit from the summary buffer.
+It calls `gnus-summary-expire-articles' by default.")
+(add-hook 'gnus-summary-exit-hook 'gnus-summary-expire-articles)
+
(defvar gnus-open-server-hook nil
"*A hook called just before opening connection to the news server.")
The hook is intended to mark an article as read (or unread)
automatically when it is selected.")
+;; Remove any hilit infestation.
+(add-hook 'gnus-startup-hook
+ (lambda ()
+ (remove-hook 'gnus-summary-prepare-hook
+ 'hilit-rehighlight-buffer-quietly)
+ (remove-hook 'gnus-summary-prepare-hook 'hilit-install-line-hooks)
+ (setq gnus-mark-article-hook '(gnus-summary-mark-unread-as-read))
+ (remove-hook 'gnus-article-prepare-hook
+ 'hilit-rehighlight-buffer-quietly)))
+
+
\f
;; Internal variables
(defvar gnus-have-read-active-file nil)
-(defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls & Boys)"
+(defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
"The mail address of the Gnus maintainers.")
-(defconst gnus-version "(ding) Gnus v0.92"
+(defconst gnus-version "(ding) Gnus v0.93"
"Version number for this version of Gnus.")
(defvar gnus-info-nodes
(defun gnus-truncate-string (str width)
(substring str 0 width))
+;; Added by Geoffrey T. Dairiki <dairiki@u.washington.edu>. A safe way
+;; to limit the length of a string. This function is necessary since
+;; `(substr "abc" 0 30)' pukes with "Args out of range".
+(defsubst gnus-limit-string (str width)
+ (if (> (length str) width)
+ (substring str 0 width)
+ str))
+
(defsubst gnus-simplify-subject-re (subject)
"Remove \"Re:\" from subject lines."
(let ((case-fold-search t))
(defun gnus-format-max-width (form length)
(let* ((val (eval form))
(valstr (if (numberp val) (int-to-string val) val)))
- (if (> (length valstr) length)
- (substring valstr 0 length)
- valstr)))
+ (gnus-limit-string valstr length)))
(defun gnus-set-mouse-face (string)
;; Set mouse face property on STRING.
written by
Masanobu UMEDA
- A Praxis Release
+ A Praxis Release
larsi@ifi.uio.no
"
gnus-version))
(kill-buffer (current-buffer)))
(if gnus-browse-return-buffer
(gnus-configure-windows 'server)
- (gnus-configure-windows 'group)))
+ (gnus-configure-windows 'group)
+ (gnus-group-list-groups nil)))
(defun gnus-browse-describe-briefly ()
"Give a one line description of the group mode commands."
(define-prefix-command 'gnus-summary-backend-map)
(define-key gnus-summary-mode-map "B" 'gnus-summary-backend-map)
(define-key gnus-summary-backend-map "e" 'gnus-summary-expire-articles)
+ (define-key gnus-summary-backend-map "\M-\C-e"
+ 'gnus-summary-expire-articles-now)
(define-key gnus-summary-backend-map "\177" 'gnus-summary-delete-article)
(define-key gnus-summary-backend-map "m" 'gnus-summary-move-article)
(define-key gnus-summary-backend-map "r" 'gnus-summary-respool-article)
(goto-char (point-min))
(run-hooks 'gnus-summary-prepare-hook)))
-(defun gnus-subject-equal (s1 s2)
- (cond
- ((numberp gnus-summary-gather-subject-limit)
- (string= (if (> (length s1) gnus-summary-gather-subject-limit)
- (substring s1 0 gnus-summary-gather-subject-limit)
- s1)
- (if (> (length s2) gnus-summary-gather-subject-limit)
- (substring s2 0 gnus-summary-gather-subject-limit)
- s2)))
- ((eq 'fuzzy gnus-summary-gather-subject-limit)
- (string= (gnus-simplify-subject-fuzzy s1)
- (gnus-simplify-subject-fuzzy s2)))
- (t
- (string= s1 s2))))
-
(defun gnus-gather-threads (threads)
"Gather threads that have lost their roots."
(if (not gnus-summary-make-false-root)
gnus-unread-mark))
(or (not subject)
(and (setq psubject (gnus-summary-subject-string))
- (gnus-subject-eq subject psubject))))))
+ (gnus-subject-equal subject psubject))))))
(if backward (if (bobp) nil (forward-char -1) t)
(if (eobp) nil (forward-char 1) t)))))
(if did
(get-text-property (point) 'gnus-number)
(gnus-summary-position-cursor)))))
-(defun gnus-subject-eq (s1 s2)
+(defun gnus-subject-equal (s1 s2)
(cond
((null gnus-summary-gather-subject-limit)
(equal (gnus-simplify-subject-re s1)
(equal (gnus-simplify-subject-fuzzy s1)
(gnus-simplify-subject-fuzzy s2)))
((numberp gnus-summary-gather-subject-limit)
- (equal (substring s1 gnus-summary-gather-subject-limit)
- (substring s2 gnus-summary-gather-subject-limit)))
+ (equal (gnus-limit-string s1 gnus-summary-gather-subject-limit)
+ (gnus-limit-string s2 gnus-summary-gather-subject-limit)))
(t
(equal s1 s2))))
(mode major-mode)
(buf (current-buffer)))
(gnus-summary-update-info) ; Make all changes in this group permanent.
+ (set-buffer buf)
+ (run-hooks 'gnus-summary-exit-hook)
+ (and gnus-use-cache (gnus-cache-possibly-remove-articles))
;; Make sure where I was, and go to next newsgroup.
+ (set-buffer gnus-group-buffer)
(or quit-config
(progn
(gnus-group-jump-to-group group)
(gnus-group-next-unread-group 1)))
- (and gnus-use-cache (gnus-cache-possibly-remove-articles))
(if temporary
nil ;Nothing to do.
;; We set all buffer-local variables to nil. It is unclear why
(set-buffer gnus-summary-buffer)
(if (or (null gnus-current-article)
(null gnus-article-current)
+ (null (get-buffer gnus-article-buffer))
(not (eq article (cdr gnus-article-current)))
(not (equal (car gnus-article-current) gnus-newsgroup-name))
force)
(goto-char (point-max))
(and gnus-break-pages (gnus-narrow-to-page))))
-(defun gnus-summary-show-article ()
- "Force re-fetching of the current article."
- (interactive)
+(defun gnus-summary-show-article (no-refetch)
+ "Force re-fetching of the current article.
+If the prefix argument NO-REFETCH is non-nil, no actual refetch will
+be performed. The current article will simply be redisplayed."
+ (interactive "P")
(gnus-set-global-variables)
- (gnus-summary-select-article gnus-have-all-headers t))
+ (if (not no-refetch)
+ (gnus-summary-select-article gnus-have-all-headers t)
+ (or gnus-current-article
+ (error "There is no current article"))
+ (gnus-summary-goto-subject gnus-current-article)
+ (gnus-configure-windows 'article)
+ (gnus-summary-position-cursor)))
(defun gnus-summary-verbose-headers (arg)
"Toggle permanent full header display.
(gnus-summary-mark-as-read (car expirable) gnus-canceled-mark))
(setq expirable (cdr expirable))))))
+(defun gnus-summary-expire-articles-now ()
+ "Expunge all expirable articles in the current group.
+This means that *all* articles that are marked as expirable will be
+deleted forever, right now."
+ (interactive)
+ (or gnus-expert-user
+ (gnus-y-or-n-p
+ "Are you really, really, really sure you want to expunge? ")
+ (error "Phew!"))
+ (let ((nnmail-expiry-wait 0)
+ (nnmail-expiry-wait-function nil))
+ (gnus-summary-expire-articles)))
+
;; Suggested by Jack Vinson <vinson@unagi.cis.upenn.edu>.
(defun gnus-summary-delete-article (n)
"Delete the N next (mail) articles.
'request-replace-article gnus-newsgroup-name)
(error "The current newsgroup does not support article editing."))
(gnus-summary-select-article t)
- (other-window 1)
+ (gnus-configure-windows 'article)
+ (select-window (get-buffer-window gnus-article-buffer))
(gnus-message 6 "C-c C-c to end edits")
(setq buffer-read-only nil)
(text-mode)
"Display all the hidden articles that are marked as dormant."
(interactive)
(let ((buffer-read-only nil))
- (goto-char (point-min))
(let ((dormant gnus-newsgroup-dormant)
headers h)
(while dormant
(setq headers (cons h headers))))
(setq dormant (cdr dormant)))
(or headers (error "No dormant articles hidden."))
+ (goto-char (point-min))
(save-excursion
(gnus-summary-update-lines
(point)
(setq dir (expand-file-name
(concat gnus-kill-files-directory
(gnus-replace-chars-in-string group ?. ?/))))
+ (setq dir (gnus-replace-chars-in-string dir ?: ?/))
(setq suffix (car suffixes)
suffixes (cdr suffixes))
(if (file-exists-p (concat dir "/" suffix))
(delete-region (1+ (point)) (point-min)))
;; If short file names were used, we have to translate slashes.
(goto-char (point-min))
- (while (search-forward "/" nil t)
+ (while (re-search-forward "[/:]" nil t)
(replace-match "." t t))
;; Translate "all" to ".*".
(while (search-forward "all" nil t)
(defalias 'nnbabyl-request-post-buffer 'nnmail-request-post-buffer)
-(defun nnbabyl-request-expire-articles (articles newsgroup &optional server force)
+(defun nnbabyl-request-expire-articles
+ (articles newsgroup &optional server force)
(nnbabyl-possibly-change-newsgroup newsgroup)
(let* ((days (or (and nnmail-expiry-wait-function
(funcall nnmail-expiry-wait-function newsgroup))
nnmail-expiry-wait))
+ (is-old t)
rest)
(save-excursion
(set-buffer nnbabyl-mbox-buffer)
(goto-char (point-min))
(if (search-forward (nnbabyl-article-string (car articles)) nil t)
(if (or force
- (> (nnmail-days-between
- (current-time-string)
- (buffer-substring
- (point) (progn (end-of-line) (point))))
- days))
+ (setq is-old
+ (> (nnmail-days-between
+ (current-time-string)
+ (buffer-substring
+ (point) (progn (end-of-line) (point))))
+ days)))
(progn
(and gnus-verbose-backends
(message "Deleting: %s" (car articles)))
(setcar active (1+ (car active)))
(goto-char (point-min))))
(nnmail-save-active nnbabyl-group-alist nnbabyl-active-file)
- rest)))
+ (nconc rest articles))))
(defun nnbabyl-request-move-article
(article group server accept-form &optional last)
(defalias 'nnfolder-request-post-buffer 'nnmail-request-post-buffer)
-(defun nnfolder-request-expire-articles (articles newsgroup &optional server force)
+(defun nnfolder-request-expire-articles
+ (articles newsgroup &optional server force)
(nnfolder-possibly-change-group newsgroup)
(let* ((days (or (and nnmail-expiry-wait-function
(funcall nnmail-expiry-wait-function newsgroup))
nnmail-expiry-wait))
+ (is-old t)
rest)
(save-excursion
(set-buffer nnfolder-current-buffer)
(goto-char (point-min))
(if (search-forward (nnfolder-article-string (car articles)) nil t)
(if (or force
- (> (nnmail-days-between
- (current-time-string)
- (buffer-substring
- (point) (progn (end-of-line) (point))))
- days))
+ (setq is-old
+ (> (nnmail-days-between
+ (current-time-string)
+ (buffer-substring
+ (point) (progn (end-of-line) (point))))
+ days)))
(progn
(and gnus-verbose-backends
(message "Deleting: %s" (car articles)))
(match-end 0))))))
(setcar active activemin))
(nnmail-save-active nnfolder-group-alist nnfolder-active-file)
- rest)))
+ (nconc rest articles))))
(defun nnfolder-request-move-article
(article group server accept-form &optional last)
(let* ((days (or (and nnmail-expiry-wait-function
(funcall nnmail-expiry-wait-function newsgroup))
nnmail-expiry-wait))
+ (is-old t)
rest)
(save-excursion
(set-buffer nnmbox-mbox-buffer)
(goto-char (point-min))
(if (search-forward (nnmbox-article-string (car articles)) nil t)
(if (or force
- (> (nnmail-days-between
- (current-time-string)
- (buffer-substring
- (point) (progn (end-of-line) (point))))
- days))
+ (setq is-old
+ (> (nnmail-days-between
+ (current-time-string)
+ (buffer-substring
+ (point) (progn (end-of-line) (point))))
+ days)))
(progn
(and gnus-verbose-backends
(message "Deleting: %s" (car articles)))
(setcar active (1+ (car active)))
(goto-char (point-min))))
(nnmail-save-active nnmbox-group-alist nnmbox-active-file)
- rest)))
+ (nconc rest articles))))
(defun nnmbox-request-move-article
(article group server accept-form &optional last)
(string-to-int name)))
(directory-files nnmh-current-directory nil "^[0-9]+$" t)))
(max-article (and active-articles (apply 'max active-articles)))
+ (is-old t)
article rest mod-time)
- (while articles
+ (while (and articles is-old)
(setq article (concat nnmh-current-directory
(int-to-string (car articles))))
(if (setq mod-time (nth 5 (file-attributes article)))
(not (= (car articles) max-article)))
(not (equal mod-time '(0 0)))
(or force
- (> (nnmail-days-between
- (current-time-string)
- (current-time-string mod-time))
- days)))
+ (setq is-old
+ (> (nnmail-days-between
+ (current-time-string)
+ (current-time-string mod-time))
+ days))))
(progn
(and gnus-verbose-backends (message "Deleting %s..." article))
(condition-case ()
(setq rest (cons (car articles) rest))))
(setq articles (cdr articles)))
(message "")
- rest))
+ (nconc rest articles)))
(defun nnmh-close-group (group &optional server)
t)
(message "nnmh: Reading incoming mail..."))
(setq incoming
(nnmail-move-inbox
- (car spools) (concat nnmh-directory "Incoming")))
+ (car spools) (concat (file-name-as-directory nnmh-directory)
+ "Incoming")))
(setq incomings (cons incoming incomings))
(setq group (nnmail-get-split-group (car spools) group-in))
(nnmail-split-incoming incoming 'nnmh-save-mail nil group)))
(string-to-int name)))
(directory-files nnml-current-directory nil "^[0-9]+$" t)))
(max-article (and active-articles (apply 'max active-articles)))
+ (is-old t)
article rest mod-time)
- (while articles
+ (while (and articles is-old)
(setq article (concat nnml-current-directory
(int-to-string (car articles))))
(if (setq mod-time (nth 5 (file-attributes article)))
(not (= (car articles) max-article)))
(not (equal mod-time '(0 0)))
(or force
- (> (nnmail-days-between
- (current-time-string)
- (current-time-string mod-time))
- days)))
+ (setq is-old
+ (> (nnmail-days-between
+ (current-time-string)
+ (current-time-string mod-time))
+ days))))
(progn
(and gnus-verbose-backends (message "Deleting %s..." article))
(condition-case ()
(nnmail-save-active nnml-group-alist nnml-active-file))
(nnml-save-nov)
(message "")
- rest))
+ (nconc rest articles)))
(defun nnml-request-move-article
(article group server accept-form &optional last)
(defun nntp-request-group (group &optional server dont-check)
"Select GROUP."
- (and nntp-async-articles (nntp-async-request-group group))
(nntp-send-command "^.*\r?\n" "GROUP" group)
(save-excursion
(set-buffer nntp-server-buffer)
(looking-at "[23]")))
(defun nntp-request-asynchronous (group &optional server articles)
+ (and nntp-async-articles (nntp-async-request-group group))
(and
nntp-async-number
(if (not (or (nntp-async-server-opened)
TEXI2DVI=texi2dvi
-MAKEINFO=emacs -batch -q -no-site-file gnus.texi -l texinfmt -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer
+EMACS=emacs
+MAKEINFO=$(EMACS) -batch -q -no-site-file gnus.texi -l texinfmt -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer
# MAKEINFO=makeinfo -o gnus gnus.texi
all: gnus
@item
Kevin Davidson came up with the name @dfn{ding}, so blame him.
@item
-Stainless Steel Rat, Jack Vinson, Daniel Quinlan, Ilja Weis, Frank D. Cringle
- and Andrew Eskilsson have all contributed code and suggestions.
+Stainless Steel Rat, Jack Vinson, Daniel Quinlan, Ilja Weis, Frank D.
+Cringle, Geoffrey T. Dairiki and Andrew Eskilsson have all contributed
+code and suggestions.
@end itemize
@c Written by Sudish Joseph
-@code{gnus-visual} can be used to highlight the summary buffer. It
+@code{gnus-vis} can be used to highlight the summary buffer. It
offers far more flexibility than hilit (since it has access to more
data; eg. the article score) in deciding how to highlight a given
article. Also, hilit gets confused by the way Gnus manipulates the
looking for any hilit-specific functions in the @code{*Backtrace*}
buffer. If such a reference exists, you should be using the code below.
-You can also get @code{gnus-visual} to highlight the article buffer, so
+You can also get @code{gnus-vis} to highlight the article buffer, so
you should get rid of all hilit-specific Gnus calls.
Add the code below to your @file{.gnus} file to remove all the hilit
@lisp
(add-hook 'gnus-startup-hook
'(lambda ()
- ;; gnus-visual is far better for summary highlighting
+ ;; gnus-vis is far better for summary highlighting
;; also, hilit cannot handle a (ding) summary and will
;; crash on you
(remove-hook 'gnus-summary-prepare-hook
the incoming mail in, append @code{nnmail-procmail-suffix} to the group
name. The mail backends will read the mail from these files.
-@vindex nnail-resplit-incoming
+@vindex nnmail-resplit-incoming
When Gnus reads a file called @file{mail.misc.spool}, this mail will be
put in the @code{mail.misc}, as one would expect. However, if you want
Gnus to split the mail the normal way, you could set
-@code{nnail-resplit-incoming} to @code{t}.
+@code{nnmail-resplit-incoming} to @code{t}.
+
+@vindex nnmail-keep-last-article
+If you use @code{procmail}, you should set
+@code{nnmail-keep-last-article} to non-@code{nil}, to prevent Gnus from
+ever expiring the final article in a mail newsgroup. This is quite,
+quite important.
+
@node Expiring Old Mail Articles
@subsubsection Expiring Old Mail Articles
* Paging the Article:: Scrolling the current article.
* Reply Followup and Post:: Posting articles.
* Canceling and Superseding:: "Whoops, I shouldn't have called him that."
-* Ticking and Marking:: Marking articles as read, expirable, etc.
+* Marking Articles:: Marking articles as read, expirable, etc.
* Threading:: How threads are made.
* Asynchronous Fetching:: Gnus might be able to pre-fetch articles.
* Article Caching:: You may store articles in a cache.
you don't want to spell-check by hand, you could add automatic
spell-checking via the @code{ispell} package:
+@vindex news-inews-hook
@lisp
(add-hook 'news-inews-hook 'ispell-message) ;For news posts
(add-hook 'mail-send-hook 'ispell-message) ;for mail posts via sendmail
@end lisp
+@findex gnus-inews-insert-mime-headers
+If you want to insert some @sc{mime} headers into the articles you post,
+without doing any actual encoding, you could add
+@code{gnus-inews-insert-mime-headers} to @code{gnus-inews-article-hook}.
+
+
@node Canceling and Superseding
@section Canceling Articles
@cindex canceling articles
Just remember, kids: There is no 'c' in 'supersede'.
-@node Ticking and Marking
-@section Ticking and Marking
+@node Marking Articles
+@section Marking Articles
@cindex article marking
@cindex article ticking
@cindex marks
@kindex q (Summary)
@findex gnus-summary-exit
Exit the current group and update all information on the group
-(@code{gnus-summary-exit}).
+(@code{gnus-summary-exit}). @code{gnus-summary-exit-hook} is called
+before doing much of the exiting, and calls
+@code{gnus-summary-expire-articles} by default.
@item Z E
@itemx Q
@kindex Z E (Summary)
@item A g
@kindex A g (Summary)
@findex gnus-summary-show-article
-Select the current article (@code{gnus-summary-show-article}).
+(Re)fetch the current article (@code{gnus-summary-show-article}). If
+given a prefix, don't actually refetch any articles, just jump to the
+current article and configure the windows to display the current
+article.
@item A t
@kindex A t (Summary)
@findex gnus-summary-toggle-header
Expire all expirable articles in the group
(@code{gnus-summary-expire-articles}).
+@item B M-C-e
+@kindex B M-C-e (Summary)
+@findex gnus-summary-expire-articles-now
+Expunge all the expirable articles in the group
+(@code{gnus-summary-expire-articles-now}). This means that @strong{all}
+articles that are eligeble for expiry in the current group will
+disappear forever into that big @file{/dev/null} in the sky.
+
@item B DEL
@kindex B DEL (Summary)
@findex gnus-summary-delete-articles