-Tue Jan 16 21:14:44 1996 Lars Magne Ingebrigtsen <larsi@narfi.ifi.uio.no>
+Wed Jan 17 22:58:05 1996 Lars Magne Ingebrigtsen <larsi@narfi.ifi.uio.no>
+
+ * gnus.el (gnus-article-hide-header): Hide boring headers
+ selectively.
+ (gnus-article-hide-header): Didn't hide anything.
+
+ * nntp.el: Make sure `open-network-stream' has the right
+ definition.
+
+Wed Jan 17 19:34:31 1996 Lars Ingebrigtsen <lars@eyesore.no>
+
+ * nntp.el (tcp): Require tcp.
+
+ * gnus.el (gnus-update-marks): Ignore dead groups.
+
+ * gnus-cus.el: Changed `gnus-button-url' variable.
+
+Wed Jan 17 19:27:36 1996 Marc Auslander <marc@watson.ibm.com>
+
+ * gnus.el (gnus-summary-mark-below): Would infloop.
+
+Wed Jan 17 19:00:02 1996 Lars Ingebrigtsen <lars@eyesore.no>
+
+ * gnus-srvr.el (gnus-server-mode-map): Keymap was buggy.
+
+ * gnus-score.el (gnus-score-check-syntax): Would bug out on Lines
+ headers.
+
+ * gnus.el (gnus-info-find-node): Configure to the info buffer.
+
+ * nnvirtual.el (nnvirtual-create-mapping): Division by zero.
+
+Wed Jan 17 18:53:50 1996 Ulrich Pfeifer <pfeifer@buster.informatik.uni-dortmund.de>
+
+ * gnus.el (gnus-summary-move-article): Reversed checks.
+ (gnus-summary-move-article): Would try to remove mark from nil.
+
+Wed Jan 17 18:37:45 1996 Lars Ingebrigtsen <lars@eyesore.no>
+
+ * gnus.el (gnus-summary-update-article): Totally bugged out.
+
+ * nnml.el (nnml-request-article): Didn't fetch by Message-ID.
+
+Tue Jan 16 17:25:28 1996 Steven L. Baur <steve@miranova.com>
+
+ * nnfolder.el (nnfolder-read-folder): Too many parameters for
+ find-file-noselect for XEmacs.
+
+ * nnbabyl.el (nnbabyl-read-mbox): Too many parameters for
+ find-file-noselect for XEmacs.
+
+ * nnmbox.el (nnmbox-possibly-change-newsgroup): Too many parameters
+ for find-file-noselect for XEmacs.
+
+ * gnus-xmas.el (insert-file-contents-literally): Restored from
+ v0.26 nnheader.el since XEmacs 19.13 doesn't have this function.
+
+ * gnus-msg.el (gnus-bug): (emacs-version) does not take a parameter
+ in XEmacs.
+
+ * gnus-nocem.el (gnus-nocem-scan-groups): make-vector takes two
+ parameters.
+
+Wed Jan 17 05:46:51 1996 Lars Ingebrigtsen <lars@eyesore.no>
+
+ * gnus-xmas.el (gnus-xmas-find-file-noselect): Moved to this
+ file.
+
+ * gnus-msg.el (gnus-forward-included-headers): New variable.
+ (gnus-forward-insert-buffer): Use it.
+
+ * gnus-score.el (gnus-score-adaptive): Use `mail-header-*' instead
+ of `gnus-header-*'.
+
+ * gnus.el (gnus-list-groups-with-ticked-articles): New variable.
+ (gnus-group-prepare-flat): Use it.
+ (gnus-header-from): Put back in again.
+ (gnus-article-hide-boring-headers): Don't bug out on articles with
+ no From header.
+
+ * gnus-topic.el (gnus-topic-find-groups): Ditto.
+
+ * gnus-msg.el (gnus-debug): Be more lenient with malformed files.
+
+Wed Jan 17 05:29:17 1996 Kai Grossjohann <grossjoh@ls6.informatik.uni-dortmund.de>
+
+ * gnus-msg.el (gnus-inews-insert-gcc): Go through all Gcc'd
+ groups.
+
+Wed Jan 17 02:26:21 1996 Lars Ingebrigtsen <lars@eyesore.no>
+
+ * gnus-msg.el (gnus-inews-domain-name): Also use
+ mail-host-address.
+
+ * nndoc.el (nndoc-guess-type): Guess `news' when it's news.
+
+ * gnus-msg.el (gnus-debug): Only insert "environment" line if the
+ environment follows.
+ (gnus-inews-check-post): Check empty articles.
+
+ * gnus.el (gnus-summary-edit-article-done): Run display hook.
+ (gnus-newsrc-to-gnus-format): Group names can be just numbers.
+
+ * nnmail.el (nnmail-check-duplication): Allow
+ `nnmail-treat-duplicates' to be a function.
+
+ * nnheader.el (nnheader-functionp): New function.
+
+ * gnus-salt.el (gnus-pick-mode-map): Added `gnus-uu-mark-over'.
+
+ * gnus-uu.el (gnus-uu-mark-over): New command and keystroke.
+
+ * gnus.el (gnus-find-new-newsgroups): Allow a prefix to force
+ `ask-server'.
+
+Wed Jan 17 02:14:22 1996 Jason L. Tibbitts, III <tibbs@sina.hpc.uh.edu>
+
+ * gnus.el (gnus-simplify-buffer-fuzzy): Didn't work for adaptive
+ scoring.
+ (gnus-summary-select-article): Allow scrolling up.
+
+Tue Jan 16 22:28:41 1996 Lars Magne Ingebrigtsen <larsi@narfi.ifi.uio.no>
+
+ * gnus.el: Applied typo fix patches from eggert@twinsun.COM (Paul
+ Eggert).
+
+Tue Jan 16 21:14:44 1996 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: 0.27 is released.
+
+ * nnvirtual.el (nnvirtual-retrieve-headers): Would bug out on
+ canceled articles.
* gnus.el (gnus-message-archive-method): Never get new mail.
(defun gnus-cache-enter-remove-article (article)
"Mark ARTICLE for later possible removal."
- (push article gnus-cache-removeable-articles))
+ (push article gnus-cache-removable-articles))
(defun gnus-cache-possibly-remove-articles ()
"Possibly remove some of the removable articles."
(if (not (gnus-virtual-group-p gnus-newsgroup-name))
(gnus-cache-possibly-remove-articles-1)
- (let ((arts gnus-cache-removeable-articles)
+ (let ((arts gnus-cache-removable-articles)
ga)
(while arts
(setq ga (nnvirtual-find-group-art gnus-newsgroup-name (pop arts)))
- (let ((gnus-cache-removeable-articles (list (cdr ga)))
+ (let ((gnus-cache-removable-articles (list (cdr ga)))
(gnus-newsgroup-name (car ga)))
(gnus-cache-possibly-remove-articles-1))))
- (setq gnus-cache-removeable-articles nil)))
+ (setq gnus-cache-removable-articles nil)))
(defun gnus-cache-possibly-remove-articles-1 ()
"Possibly remove some of the removable articles."
(unless (eq gnus-use-cache 'passive)
- (let ((articles gnus-cache-removeable-articles)
+ (let ((articles gnus-cache-removable-articles)
(cache-articles gnus-newsgroup-cached)
article)
(gnus-cache-change-buffer gnus-newsgroup-name)
(let ((buffer-read-only nil)
(alist gnus-cite-prefix-alist)
(inhibit-point-motion-hooks t)
+ (props (nconc (list 'gnus-type 'cite)
+ gnus-hidden-properties))
numbers number)
(while alist
(setq numbers (cdr (car alist))
(goto-line number)
(or (assq number gnus-cite-attribution-alist)
(add-text-properties
- (point) (progn (forward-line 1) (point))
- (nconc (list 'gnus-type 'cite)
- gnus-hidden-properties)))))))))
+ (point) (progn (forward-line 1) (point)) props))))))))
(defun gnus-article-hide-citation-maybe (&optional arg force)
"Toggle hiding of cited text that has an attribution line.
;; loose attribution lines, otherwise the first prefix will be used.
;;
;; If AFTER is non-nil, only citations after the attribution line
- ;; will be concidered.
+ ;; will be considered.
;;
;; If FUN is non-nil, it will be called with the arguments (WROTE
;; PREFIX TAG) and expected to return a regular expression. Only
;; citations whose prefix matches the regular expression will be
- ;; concidered.
+ ;; considered.
;;
;; WROTE is the attribution line number.
;; PREFIX is the attribution line prefix.
(custom-declare '()
'((tag . "GNUS")
(doc . "\
-The coffe-brewing, all singing, all dancing, kitchen sink newsreader.")
+The coffee-brewing, all singing, all dancing, kitchen sink newsreader.")
(type . group)
(data ((tag . "Visual")
(doc . "\
WWW Browser to call when clicking on an URL button in the article buffer.
You can choose between one of the predefined browsers, or `Other'.")
- (name . gnus-button-url)
+ (name . browse-url-browser-function)
(calculate . (cond ((boundp 'browse-url-browser-function)
browse-url-browser-function)
((fboundp 'w3-fetch)
(default . w3-fetch))
((tag . "Netscape")
(type . const)
- (default . gnus-netscape-open-url))
+ (default . browse-url-netscape))
((prompt . "Other")
(doc . "\
You must specify the name of a Lisp function here. The lisp function
underscore will be displayed as a single underlined letter. This
technique was developed for old line printers (think about it), and is
still in use on some newsgroups, in particular the ClariNet
-hierearchy.
+hierarchy.
")
(type . const)
(default .
(default . gnus-article-display-x-face))
((tag . "Unquote Printable")
(doc . "\
-Tranform MIME quoted printable into 8-bit characters.
+Transform MIME quoted printable into 8-bit characters.
Quoted printable is often seen by strings like `=EF' where you would
expect a non-English letter.
(default . gnus-article-highlight-some))
((tag . "Highlight Headers")
(doc . "\
-Highlight headers as specified by `Article Header Highligting'.
+Highlight headers as specified by `Article Header Highlighting'.
")
(type . const)
(default .
(type . face))
((tag . "Summary Line Highlighting")
(doc . "\
-Controls the higlighting of summary buffer lines.
+Controls the highlighting of summary buffer lines.
Below is a list of `Form'/`Face' pairs. When deciding how a a
particular summary line should be displayed, each form is
)))))
(defun gnus-custom-import-cite-face-list (custom alist)
- ;; Backward compatible groking of light and dark.
+ ;; Backward compatible grokking of light and dark.
(cond ((eq alist 'light)
(setq alist (mapcar 'gnus-make-face gnus-face-light-name-list)))
((eq alist 'dark)
When you have finished reading a group GNUS can automatically create
new score entries based on which articles you read and which you
-skipped. This is normally controled by the two global variables
+skipped. This is normally controlled by the two global variables
`gnus-use-adaptive-scoring' and `gnus-default-adaptive-score-alist',
The first determines whether adaptive scoring should be enabled or
not, while the second determines what score entries should be created.
You can overwrite the setting of `gnus-use-adaptive-scoring' by
selecting `Enable' or `Disable' by pressing the `Adapt' button.
-Selecting `Custom' will allow you to specify the exact adaption
+Selecting `Custom' will allow you to specify the exact adaptation
rules (overwriting `gnus-default-adaptive-score-alist').")
(type . choice)
(data ((tag . "Default")
(defvar gnus-signature-before-forwarded-message t
"*If non-nil, put the signature before any included forwarded message.")
+(defvar gnus-forward-included-headers gnus-visible-headers
+ "*Regexp matching headers to be included in forwarded messages.")
+
(defvar gnus-required-headers
'(From Date Newsgroups Subject Message-ID Organization Lines X-Newsreader)
"*Headers to be generated or prompted for when posting an article.
(defvar gnus-check-before-posting
'(subject-cmsg multiple-headers sendsys message-id from
long-lines control-chars size new-text
- redirected-followup signature approved sender)
+ redirected-followup signature approved sender empty)
"In non-nil, Gnus will attempt to run some checks on outgoing posts.
If this variable is t, Gnus will check everything it can. If it is a
list, then those elements in that list will be checked.")
(or (bolp)
(eobp)
(gnus-y-or-n-p
- (format
- "You have lines longer than 79 characters. Really post? ")))))
+ "You have lines longer than 79 characters. Really post? "))))
+ ;; Check whether the article is empty.
+ (or (gnus-check-before-posting 'empty)
+ (save-excursion
+ (goto-char (point-min))
+ (re-search-forward
+ (concat "^" (regexp-quote mail-header-separator) "$"))
+ (forward-line 1)
+ (or (re-search-forward "[^ \n\t]" nil t)
+ (gnus-y-or-n-p "Empty article. Really post?"))))
;; Check for control characters.
(or (gnus-check-before-posting 'control-chars)
(save-excursion
(domain
(or (if (stringp genericfrom) genericfrom)
(getenv "DOMAINNAME")
+ mail-host-address
gnus-local-domain
;; Function `system-name' may return full internet name.
;; Suggested by Mike DeCorte <mrd@sun.soe.clarkson.edu>.
;; You might for example insert a "." somewhere (not next to another dot
;; or string boundary), or modify the newsreader name to "Ding".
(defun gnus-inews-unique-id ()
- ;; Dont use microseconds from (current-time), they may be unsupported.
+ ;; Don't use microseconds from (current-time), they may be unsupported.
;; Instead we use this randomly inited counter.
(setq gnus-unique-id-char
(% (1+ (or gnus-unique-id-char (logand (random t) (1- (lsh 1 20)))))
(defun gnus-forward-insert-buffer (buffer)
(save-excursion
(save-restriction
+ ;; Put point where we want it before inserting the forwarded
+ ;; message.
(if gnus-signature-before-forwarded-message
(goto-char (point-max))
(goto-char (point-min))
(insert-buffer-substring buffer)
(goto-char (point-max))
(insert gnus-forward-end-separator)
+ ;; Remove all unwanted headers.
+ (goto-char (point-min))
+ (save-restriction
+ (narrow-to-region (point) (if (search-forward "\n\n" nil t)
+ (1- (point))
+ (point)))
+ (delete-non-matching-lines gnus-forward-included-headers))
;; Delete any invisible text.
(goto-char (point-min))
(let (beg)
(re-search-forward (concat "^" (regexp-quote mail-header-separator) "$"))
(forward-line 1)
(insert (gnus-version) "\n")
- (emacs-version t)
+ (insert (emacs-version))
(insert "\n\n\n\n\n")
(gnus-debug)
(goto-char (point-min))
(setq dirs nil)
(insert-file-contents file)
(goto-char (point-min))
- (or (re-search-forward "^;;* *Internal variables" nil t)
- (error "Malformed sources in file %s" file))
- (narrow-to-region (point-min) (point))
- (goto-char (point-min))
- (while (setq expr (condition-case ()
- (read (current-buffer)) (error nil)))
- (condition-case ()
- (and (eq (car expr) 'defvar)
- (stringp (nth 3 expr))
- (or (not (boundp (nth 1 expr)))
- (not (equal (eval (nth 2 expr))
- (symbol-value (nth 1 expr)))))
- (setq olist (cons (nth 1 expr) olist)))
- (error nil)))))
+ (if (not (re-search-forward "^;;* *Internal variables" nil t))
+ (message "Malformed sources in file %s" file)
+ (narrow-to-region (point-min) (point))
+ (goto-char (point-min))
+ (while (setq expr (condition-case ()
+ (read (current-buffer)) (error nil)))
+ (condition-case ()
+ (and (eq (car expr) 'defvar)
+ (stringp (nth 3 expr))
+ (or (not (boundp (nth 1 expr)))
+ (not (equal (eval (nth 2 expr))
+ (symbol-value (nth 1 expr)))))
+ (setq olist (cons (nth 1 expr) olist)))
+ (error nil))))))
(setq files (cdr files)))
(kill-buffer (current-buffer)))
- (insert "------------------- Environment follows -------------------\n\n")
- (setq olist (nreverse olist))
+ (when (setq olist (nreverse olist))
+ (insert "------------------ Environment follows ------------------\n\n"))
(while olist
(if (boundp (car olist))
(insert "(setq " (symbol-name (car olist))
group))))
(when gcc
(insert "Gcc: "
- (if (stringp group) group
- (mapconcat 'identity group " "))
+ (if (stringp gcc) gcc
+ (mapconcat 'identity gcc " "))
"\n"))))))
(defun gnus-inews-insert-archive-gcc ()
group gnus-newsrc-hashtb))))))
;; Ok, there are new articles in this group, se we fetch the
;; headers.
- (let ((gnus-newsgroup-dependencies (make-vector 10))
+ (let ((gnus-newsgroup-dependencies (make-vector 10 nil))
headers)
(setq headers
(if (eq 'nov
" " gnus-summary-mark-as-processable
"u" gnus-summary-unmark-as-processable
"U" gnus-summary-unmark-all-processable
+ "v" gnus-uu-mark-over
"r" gnus-uu-mark-region
"R" gnus-uu-unmark-region
"e" gnus-uu-mark-by-regexp
nil)
(t
(let ((a alist)
- sr err s)
+ sr err s type)
(while (and a (not err))
(setq
err
((not (listp (setq sr (cdr (car a)))))
(format "Illegal header match %s in %s" (nth 1 (car a)) file))
(t
+ (setq type (caar a))
(while (and sr (not err))
(setq s (pop sr))
(setq
err
(cond
- ((not (stringp (car s)))
+ ((if (member (downcase type) '("lines" "chars"))
+ (not (numberp (car s)))
+ (not (stringp (car s))))
(format "Illegal match %s in %s" (car s) file))
((and (cadr s) (not (integerp (cadr s))))
(format "Non-integer score %s in %s" (cadr s) file))
(if last
(progn
;; Insert the line, with a text property on the
- ;; terminating newline refering to the articles with
+ ;; terminating newline referring to the articles with
;; this line.
(insert last ?\n)
(put-text-property (1- (point)) (point) 'articles alike)))
(defun gnus-score-string (score-list header now expire &optional trace)
;; Score ARTICLES according to HEADER in SCORE-LIST.
- ;; Update matches entries to NOW and remove unmatched entried older
+ ;; Update matching entries to NOW and remove unmatched entries older
;; than EXPIRE.
;; Insert the unique article headers in the buffer.
(if last
(progn
;; Insert the line, with a text property on the
- ;; terminating newline refering to the articles with
+ ;; terminating newline referring to the articles with
;; this line.
(insert last ?\n)
(put-text-property (1- (point)) (point) 'articles alike)))
(setcar (car elem)
`(lambda (h)
(,(intern
- (concat "gnus-header-"
+ (concat "mail-header-"
(if (eq (car (car elem)) 'followup)
"message-id"
(downcase (symbol-name (car (car elem)))))))
suffix (or gnus-kill-files-directory "~/News")))
((gnus-use-long-file-name 'not-score)
;; Append ".SCORE" to newsgroup name.
- (expand-file-name (concat (gnus-newsgroup-saveable-name newsgroup)
+ (expand-file-name (concat (gnus-newsgroup-savable-name newsgroup)
"." suffix)
(or gnus-kill-files-directory "~/News")))
(t
(gnus-define-keys
gnus-server-mode-map
- " " 'gnus-server-read-server
- "\r" 'gnus-server-read-server
- gnus-mouse-2 'gnus-server-pick-server
- "q" 'gnus-server-exit
- "l" 'gnus-server-list-servers
- "k" 'gnus-server-kill-server
- "y" 'gnus-server-yank-server
- "c" 'gnus-server-copy-server
- "a" 'gnus-server-add-server
- "e" 'gnus-server-edit-server
-
- "O" 'gnus-server-open-server
- "C" 'gnus-server-close-server
- "D" 'gnus-server-deny-server
- "R" 'gnus-server-remove-denials))
+ " " gnus-server-read-server
+ "\r" gnus-server-read-server
+ gnus-mouse-2 gnus-server-pick-server
+ "q" gnus-server-exit
+ "l" gnus-server-list-servers
+ "k" gnus-server-kill-server
+ "y" gnus-server-yank-server
+ "c" gnus-server-copy-server
+ "a" gnus-server-add-server
+ "e" gnus-server-edit-server
+
+ "O" gnus-server-open-server
+ "C" gnus-server-close-server
+ "D" gnus-server-deny-server
+ "R" gnus-server-remove-denials))
(defun gnus-server-mode ()
"Major mode for listing and editing servers.
(and gnus-group-list-inactive-groups
(eq unread t))
(> unread 0)
- (cdr (assq 'tick (gnus-info-marks info))) ; Has right readedness.
+ (and gnus-list-groups-with-ticked-articles
+ (cdr (assq 'tick (gnus-info-marks info))))
+ ; Has right readedness.
;; Check for permanent visibility.
(and gnus-permanently-visible-groups
(string-match gnus-permanently-visible-groups group))
Default is \"/tmp/\".")
(defvar gnus-uu-do-not-unpack-archives nil
- "*Non-nil means that gnus-uu won't peek inside archives looking for files to dispay.
+ "*Non-nil means that gnus-uu won't peek inside archives looking for files to display.
Default is nil.")
(defvar gnus-uu-view-and-save nil
"p" gnus-summary-mark-as-processable
"u" gnus-summary-unmark-as-processable
"U" gnus-summary-unmark-all-processable
+ "v" gnus-uu-mark-over
"s" gnus-uu-mark-series
"r" gnus-uu-mark-region
"R" gnus-uu-mark-by-regexp
(> (gnus-summary-thread-level) level))))
(gnus-summary-position-point))
+(defun gnus-uu-mark-over (score)
+ "Mark all articles with a score over SCORE (the prefix.)"
+ (interactive "P")
+ (let ((score (gnus-score-default score))
+ (data gnus-newsgroup-data))
+ (save-excursion
+ (while data
+ (when (> (or (cdr (assq (gnus-data-number (caar data))
+ gnus-newsgroup-scored))
+ gnus-summary-default-score 0)
+ score)
+ (gnus-summary-set-process-mark (caar data)))
+ (setq data (cdr data))))
+ (gnus-summary-position-point)))
+
(defun gnus-uu-mark-sparse ()
"Mark all series that have some articles marked."
(interactive)
["Set mark" gnus-summary-mark-as-processable t]
["Remove mark" gnus-summary-unmark-as-processable t]
["Remove all marks" gnus-summary-unmark-all-processable t]
+ ["Mark above" gnus-uu-mark-over t]
["Mark series" gnus-uu-mark-series t]
["Mark region" gnus-uu-mark-region t]
["Mark by regexp" gnus-uu-mark-by-regexp t]
(fset 'set-text-properties 'gnus-xmas-set-text-properties)
+ (fset 'nnheader-find-file-noselect 'gnus-xmas-find-file-noselect)
+
(or (boundp 'standard-display-table) (setq standard-display-table nil))
(defvar gnus-mouse-face-prop 'highlight)
(set-specifier (symbol-value gnus-use-toolbar)
(cons (current-buffer) gnus-summary-toolbar))))
+;; Written by Erik Naggum <erik@naggum.no>.
+;; Saved by Steve Baur <steve@miranova.com>.
+(defun insert-file-contents-literally (filename &optional visit beg end replace)
+ "Like `insert-file-contents', q.v., but only reads in the file.
+A buffer may be modified in several ways after reading into the buffer due
+to advanced Emacs features, such as file-name-handlers, format decoding,
+find-file-hooks, etc.
+ This function ensures that none of these modifications will take place."
+ (let ( ; (file-name-handler-alist nil)
+ (format-alist nil)
+ (after-insert-file-functions nil)
+ (find-buffer-file-type-function
+ (if (fboundp 'find-buffer-file-type)
+ (symbol-function 'find-buffer-file-type)
+ nil)))
+ (unwind-protect
+ (progn
+ (fset 'find-buffer-file-type (lambda (filename) t))
+ (insert-file-contents filename visit beg end replace))
+ (if find-buffer-file-type-function
+ (fset 'find-buffer-file-type find-buffer-file-type-function)
+ (fmakunbound 'find-buffer-file-type)))))
+
+(defun gnus-xmas-find-file-noselect (filename &optional nowarn rawfile)
+ "Read file FILENAME into a buffer and return the buffer.
+If a buffer exists visiting FILENAME, return that one, but
+verify that the file has not changed since visited or saved.
+The buffer is not selected, just returned to the caller."
+ (setq filename
+ (abbreviate-file-name
+ (expand-file-name filename)))
+ (if (file-directory-p filename)
+ (if find-file-run-dired
+ (dired-noselect filename)
+ (error "%s is a directory." filename))
+ (let* ((buf (get-file-buffer filename))
+ (truename (abbreviate-file-name (file-truename filename)))
+ (number (nthcdr 10 (file-attributes truename)))
+ ;; Find any buffer for a file which has same truename.
+ (other (and (not buf)
+ (if (fboundp 'find-buffer-visiting)
+ (find-buffer-visiting filename)
+ (get-file-buffer filename))))
+ error)
+ ;; Let user know if there is a buffer with the same truename.
+ (if other
+ (progn
+ (or nowarn
+ (string-equal filename (buffer-file-name other))
+ (message "%s and %s are the same file"
+ filename (buffer-file-name other)))
+ ;; Optionally also find that buffer.
+ (if (or (and (boundp 'find-file-existing-other-name)
+ find-file-existing-other-name)
+ find-file-visit-truename)
+ (setq buf other))))
+ (if buf
+ (or nowarn
+ (verify-visited-file-modtime buf)
+ (cond ((not (file-exists-p filename))
+ (error "File %s no longer exists!" filename))
+ ((yes-or-no-p
+ (if (string= (file-name-nondirectory filename)
+ (buffer-name buf))
+ (format
+ (if (buffer-modified-p buf)
+ "File %s changed on disk. Discard your edits? "
+ "File %s changed on disk. Reread from disk? ")
+ (file-name-nondirectory filename))
+ (format
+ (if (buffer-modified-p buf)
+ "File %s changed on disk. Discard your edits in %s? "
+ "File %s changed on disk. Reread from disk into %s? ")
+ (file-name-nondirectory filename)
+ (buffer-name buf))))
+ (save-excursion
+ (set-buffer buf)
+ (revert-buffer t t)))))
+ (save-excursion
+;;; The truename stuff makes this obsolete.
+;;; (let* ((link-name (car (file-attributes filename)))
+;;; (linked-buf (and (stringp link-name)
+;;; (get-file-buffer link-name))))
+;;; (if (bufferp linked-buf)
+;;; (message "Symbolic link to file in buffer %s"
+;;; (buffer-name linked-buf))))
+ (setq buf (create-file-buffer filename))
+ ;; (set-buffer-major-mode buf)
+ (set-buffer buf)
+ (erase-buffer)
+ (if rawfile
+ (condition-case ()
+ (nnheader-insert-file-contents-literally filename t)
+ (file-error
+ ;; Unconditionally set error
+ (setq error t)))
+ (condition-case ()
+ (insert-file-contents filename t)
+ (file-error
+ ;; Run find-file-not-found-hooks until one returns non-nil.
+ (or t ; (run-hook-with-args-until-success 'find-file-not-found-hooks)
+ ;; If they fail too, set error.
+ (setq error t)))))
+ ;; Find the file's truename, and maybe use that as visited name.
+ (setq buffer-file-truename truename)
+ (setq buffer-file-number number)
+ ;; On VMS, we may want to remember which directory in a search list
+ ;; the file was found in.
+ (and (eq system-type 'vax-vms)
+ (let (logical)
+ (if (string-match ":" (file-name-directory filename))
+ (setq logical (substring (file-name-directory filename)
+ 0 (match-beginning 0))))
+ (not (member logical find-file-not-true-dirname-list)))
+ (setq buffer-file-name buffer-file-truename))
+ (if find-file-visit-truename
+ (setq buffer-file-name
+ (setq filename
+ (expand-file-name buffer-file-truename))))
+ ;; Set buffer's default directory to that of the file.
+ (setq default-directory (file-name-directory filename))
+ ;; Turn off backup files for certain file names. Since
+ ;; this is a permanent local, the major mode won't eliminate it.
+ (and (not (funcall backup-enable-predicate buffer-file-name))
+ (progn
+ (make-local-variable 'backup-inhibited)
+ (setq backup-inhibited t)))
+ (if rawfile
+ nil
+ (after-find-file error (not nowarn)))))
+ buf)))
+
+
;;; gnus-xmas.el ends here
This means that they will still be listed when there are no unread
articles in the groups.")
+(defvar gnus-list-groups-with-ticked-articles t
+ "*If non-nil, list groups that have only ticked articles.
+If nil, only list groups that have unread articles.")
+
(defvar gnus-group-default-list-level gnus-level-subscribed
"*Default listing level.
Ignored if `gnus-group-use-permanent-levels' is non-nil.")
(article 1.0 point)))
(info
(vertical 1.0
- (nil 1.0 point)))
+ (info 1.0 point)))
(summary-faq
(vertical 1.0
(summary 0.25)
(faq . gnus-faq-buffer)
(picons . "*Picons*")
(tree . gnus-tree-buffer)
+ (info . gnus-info-buffer)
(draft . gnus-draft-buffer))
"Mapping from short symbols to buffer names or buffer variables.")
"gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
"The mail address of the Gnus maintainers.")
-(defconst gnus-version "September Gnus v0.27"
+(defconst gnus-version "September Gnus v0.28"
"Version number for this version of Gnus.")
(defvar gnus-info-nodes
;;; Let the byte-compiler know that we know about this variable.
(defvar rmail-default-rmail-file)
-(defvar gnus-cache-removeable-articles nil)
+(defvar gnus-cache-removable-articles nil)
(defvar gnus-dead-summary nil)
;;; Various macros and substs.
+(defun gnus-header-from (header)
+ (mail-header-from header))
+
(defmacro gnus-eval-in-buffer-window (buffer &rest forms)
"Pop to BUFFER, evaluate FORMS, and then return to the original window."
`(let ((GnusStartBufferWindow (selected-window)))
(defun gnus-newsgroup-directory-form (newsgroup)
"Make hierarchical directory name from NEWSGROUP name."
- (let ((newsgroup (gnus-newsgroup-saveable-name newsgroup))
+ (let ((newsgroup (gnus-newsgroup-savable-name newsgroup))
(len (length newsgroup))
idx)
;; If this is a foreign group, we don't want to translate the
(setq idx (1+ idx)))
newsgroup))
-(defun gnus-newsgroup-saveable-name (group)
+(defun gnus-newsgroup-savable-name (group)
;; Replace any slashes in a group name (eg. an ange-ftp nndoc group)
;; with dots.
(nnheader-replace-chars-in-string group ?/ ?.))
;; Written by Stainless Steel Rat <ratinox@ccs.neu.edu>.
(defun gnus-simplify-buffer-fuzzy ()
(goto-char (point-min))
+ (re-search-forward "^[ \t]*\\(re\\|fwd\\)[[{(^0-9]*[])}]?[:;][ \t]*" nil t)
+ (goto-char (match-beginning 0))
(while (or
(looking-at "^[ \t]*\\(re\\|fwd\\)[[{(^0-9]*[])}]?[:;][ \t]*")
(looking-at "^[[].*:[ \t].*[]]$"))
"Find Info documentation of Gnus."
(interactive)
;; Enlarge info window if needed.
- (let ((mode major-mode))
- (gnus-configure-windows 'info)
- (Info-goto-node (car (cdr (assq mode gnus-info-nodes))))))
+ (let ((mode major-mode)
+ gnus-info-buffer)
+ (Info-goto-node (car (cdr (assq mode gnus-info-nodes))))
+ (setq gnus-info-buffer (current-buffer))
+ (gnus-configure-windows 'info)))
(defun gnus-days-between (date1 date2)
;; Return the number of days between date1 and date2.
(defun gnus-message (level &rest args)
(if (<= level gnus-verbose)
(apply 'message args)
- ;; We have to do this format thingie here even if the result isn't
+ ;; We have to do this format thingy here even if the result isn't
;; shown - the return value has to be the same as the return value
;; from `message'.
(apply 'format args)))
startup level. If ARG is non-nil and not a positive number, Gnus will
prompt the user for the name of an NNTP server to use."
(interactive "P")
+
(if (get-buffer gnus-group-buffer)
(progn
(switch-to-buffer gnus-group-buffer)
;; Go to the first group with unread articles.
(gnus-group-search-forward nil nil nil t)
;; Find the right group to put point on. If the current group
- ;; has disapeared in the new listing, try to find the next
+ ;; has disappeared in the new listing, try to find the next
;; one. If no next one can be found, just leave point at the
;; first newsgroup in the buffer.
(if (not (gnus-goto-char
(and gnus-group-list-inactive-groups
(eq unread t)) ; We list unactivated groups
(> unread 0) ; We list groups with unread articles
- (cdr (assq 'tick (gnus-info-marks info)))
+ (and gnus-list-groups-with-ticked-articles
+ (cdr (assq 'tick (gnus-info-marks info))))
; And groups with tickeds
;; Check for permanent visibility.
(and gnus-permanently-visible-groups
(run-hooks 'gnus-group-prepare-hook)))
(defun gnus-group-prepare-flat-list-dead (groups level mark regexp)
- ;; List zombies and killed lists somehwat faster, which was
+ ;; List zombies and killed lists somewhat faster, which was
;; suggested by Jack Vinson <vinson@unagi.cis.upenn.edu>. It does
;; this by ignoring the group format specification altogether.
(let (group beg)
(when method-only-group
(unless entry
(error "Trying to change non-existent group %s" method-only-group))
- ;; We have recevied parts of the actual group info - either the
+ ;; We have received parts of the actual group info - either the
;; select method or the group parameters. We first check
;; whether we have to extend the info, and if so, do that.
(let ((len (length info))
(defun gnus-summary-update-article (article)
"Update ARTICLE in the summary buffer."
(let ((id (mail-header-id (gnus-summary-article-header article))))
- (setcar (car (gnus-id-to-thread id)) nil)
+ (setcar (gnus-id-to-thread id) nil)
(gnus-summary-insert-subject id)))
(defun gnus-rebuild-thread (id)
(info (gnus-get-info gnus-newsgroup-name))
(uncompressed '(score bookmark killed))
var type list newmarked symbol)
- ;; Add all marks lists that are non-nil to the list of marks lists.
- (while types
- (setq type (pop types))
- (when (setq list (symbol-value
- (setq symbol
- (intern (format "gnus-newsgroup-%s"
- (car type))))))
- (push (cons (cdr type)
- (if (memq (cdr type) uncompressed) list
- (gnus-compress-sequence (set symbol (sort list '<)) t)))
- newmarked)))
-
- ;; Enter these new marks into the info of the group.
- (if (nthcdr 3 info)
- (setcar (nthcdr 3 info) newmarked)
- ;; Add the marks lists to the end of the info.
- (when newmarked
- (setcdr (nthcdr 2 info) (list newmarked))))
-
- ;; Cut off the end of the info if there's nothing else there.
- (let ((i 5))
- (while (and (> i 2)
- (not (nth i info)))
- (when (nthcdr (decf i) info)
- (setcdr (nthcdr i info) nil))))))
+ (when info
+ ;; Add all marks lists that are non-nil to the list of marks lists.
+ (while types
+ (setq type (pop types))
+ (when (setq list (symbol-value
+ (setq symbol
+ (intern (format "gnus-newsgroup-%s"
+ (car type))))))
+ (push (cons (cdr type)
+ (if (memq (cdr type) uncompressed) list
+ (gnus-compress-sequence (set symbol (sort list '<)) t)))
+ newmarked)))
+
+ ;; Enter these new marks into the info of the group.
+ (if (nthcdr 3 info)
+ (setcar (nthcdr 3 info) newmarked)
+ ;; Add the marks lists to the end of the info.
+ (when newmarked
+ (setcdr (nthcdr 2 info) (list newmarked))))
+
+ ;; Cut off the end of the info if there's nothing else there.
+ (let ((i 5))
+ (while (and (> i 2)
+ (not (nth i info)))
+ (when (nthcdr (decf i) info)
+ (setcdr (nthcdr i info) nil)))))))
(defun gnus-add-marked-articles (group type articles &optional info force)
;; Add ARTICLES of TYPE to the info of GROUP.
;; crossposted article that has a higher number than
;; Gnus believes possible. So we re-activate this
;; group as well. This might mean doing the
- ;; crossposting thingie will *increase* the number
+ ;; crossposting thingy will *increase* the number
;; of articles in some groups. Tsk, tsk.
(setq active (or (gnus-activate-group group) active))))
(if (or (> id (cdr active))
(setq did article))
(if (or all-headers gnus-show-all-headers)
(gnus-article-show-all-headers))
- t))
+ nil))
(if did
(gnus-article-set-window-start
(cdr (assq article gnus-newsgroup-bookmarks)))))))
(gnus-set-global-variables)
;; Check whether the source group supports the required functions.
(cond ((and (eq action 'move)
- (gnus-check-backend-function
- 'request-move-article gnus-newsgroup-name))
+ (not (gnus-check-backend-function
+ 'request-move-article gnus-newsgroup-name)))
(error "The current group does not support article moving"))
((and (eq action 'crosspost)
- (gnus-check-backend-function
- 'request-replace-article gnus-newsgroup-name))
+ (not (gnus-check-backend-function
+ 'request-replace-article gnus-newsgroup-name)))
(error "The current group does not support article editing")))
(let ((articles (gnus-summary-work-articles n))
(prefix (gnus-group-real-prefix gnus-newsgroup-name))
(gnus-summary-goto-subject article)
(gnus-summary-mark-article article gnus-canceled-mark))
- (gnus-summary-remove-process-mark (car articles)))
+ (gnus-summary-remove-process-mark article))
(gnus-kill-buffer copy-buf)
(gnus-set-mode-line 'summary)))
expirable gnus-newsgroup-name)))
(or total (setq gnus-newsgroup-expirable es))
;; We go through the old list of expirable, and mark all
- ;; really expired articles as non-existant.
+ ;; really expired articles as nonexistent.
(unless (eq es expirable) ;If nothing was expired, we don't mark.
(let ((gnus-use-cache nil))
(while expirable
(buffer-disable-undo (current-buffer))
(gnus-configure-windows 'summary)
(gnus-summary-update-article (cdr gnus-article-current)))
+ (run-hooks 'gnus-article-display-hook)
(and (gnus-visual-p 'summary-highlight 'highlight)
(run-hooks 'gnus-visual-mark-article-hook)))))
(save-excursion
(set-buffer gnus-summary-buffer)
(goto-char (point-min))
- (while (not (eobp))
- (and (< (gnus-summary-article-score) score)
- (gnus-summary-mark-article nil mark))
- (gnus-summary-find-next))))
+ (while
+ (progn
+ (and (< (gnus-summary-article-score) score)
+ (gnus-summary-mark-article nil mark))
+ (gnus-summary-find-next)))))
(defun gnus-summary-kill-below (&optional score)
"Mark articles with score below SCORE as read."
(defun gnus-article-hide-headers-if-wanted ()
"Hide unwanted headers if `gnus-have-all-headers' is nil.
-Provided for backwards compatability."
+Provided for backwards compatibility."
(or (save-excursion (set-buffer gnus-summary-buffer) gnus-have-all-headers)
gnus-inhibit-hiding
(gnus-article-hide-headers)))
If given a negative prefix, always show; if given a positive prefix,
always hide."
(interactive "P")
- (unless (gnus-article-check-hidden-text 'headers arg)
+ (unless (gnus-article-check-hidden-text 'boring-headers arg)
(save-excursion
(set-buffer gnus-article-buffer)
(save-restriction
(mail-fetch-field "newsgroups"))
(gnus-article-hide-header "followup-to")))
((eq elem 'reply-to)
- (when (equal (nth 1 (mail-extract-address-components
- (mail-fetch-field "from")))
- (nth 1 (mail-extract-address-components
- (mail-fetch-field "reply-to"))))
- (gnus-article-hide-header "reply-to")))
+ (let ((from (mail-fetch-field "from"))
+ (reply-to (mail-fetch-field "reply-to")))
+ (when (and
+ from reply-to
+ (equal
+ (nth 1 (mail-extract-address-components from))
+ (nth 1 (mail-extract-address-components reply-to))))
+ (gnus-article-hide-header "reply-to"))))
((eq elem 'date)
(let ((date (mail-fetch-field "date")))
(when (and date
4))
(gnus-article-hide-header "date")))))))))))
-(defun gnus-article-hide-header (&optional header)
- (when header
+(defun gnus-article-hide-header (header)
+ (save-excursion
(goto-char (point-min))
- (re-search-forward (concat "^" header ":") nil t))
- (when (or (not header)
- (match-beginning 0))
- (add-text-properties
- (progn (beginning-of-line) (point))
- (if (re-search-forward "^[^ \t]" nil t)
- (match-beginning 0)
- (point-max))
- (nconc (list 'gnus-type 'headers)
- gnus-hidden-properties))))
+ (when (re-search-forward (concat "^" header ":") nil t)
+ (add-text-properties
+ (progn (beginning-of-line) (point))
+ (progn
+ (end-of-line)
+ (if (re-search-forward "^[^ \t]" nil t)
+ (match-beginning 0)
+ (point-max)))
+ (nconc (list 'gnus-type 'boring-headers)
+ gnus-hidden-properties)))))
;; Written by Per Abrahamsen <amanda@iesd.auc.dk>.
(defun gnus-article-treat-overstrike ()
(or gnus-kill-files-directory "~/News")))
((gnus-use-long-file-name 'not-kill)
;; Append ".KILL" to newsgroup name.
- (expand-file-name (concat (gnus-newsgroup-saveable-name newsgroup)
+ (expand-file-name (concat (gnus-newsgroup-savable-name newsgroup)
"." gnus-kill-file-name)
(or gnus-kill-files-directory "~/News")))
(t
(gnus-server-opened gnus-select-method))
(gnus-check-bogus-newsgroups))))
-(defun gnus-find-new-newsgroups ()
+(defun gnus-find-new-newsgroups (&optional arg)
"Search for new newsgroups and add them.
Each new newsgroup will be treated with `gnus-subscribe-newsgroup-method.'
-The `-n' option line from .newsrc is respected."
- (interactive)
- (unless (gnus-check-first-time-used)
- (if (or (consp gnus-check-new-newsgroups)
- (eq gnus-check-new-newsgroups 'ask-server))
- (gnus-ask-server-for-new-groups)
- (let ((groups 0)
- group new-newsgroups)
- (gnus-message 5 "Looking for new newsgroups...")
- (or gnus-have-read-active-file (gnus-read-active-file))
- (setq gnus-newsrc-last-checked-date (current-time-string))
- (if (not gnus-killed-hashtb) (gnus-make-hashtable-from-killed))
- ;; Go though every newsgroup in `gnus-active-hashtb' and compare
- ;; with `gnus-newsrc-hashtb' and `gnus-killed-hashtb'.
- (mapatoms
- (lambda (sym)
- (if (or (null (setq group (symbol-name sym)))
- (not (boundp sym))
- (null (symbol-value sym))
- (gnus-gethash group gnus-killed-hashtb)
- (gnus-gethash group gnus-newsrc-hashtb))
- ()
- (let ((do-sub (gnus-matches-options-n group)))
- (cond
- ((eq do-sub 'subscribe)
- (setq groups (1+ groups))
- (gnus-sethash group group gnus-killed-hashtb)
- (funcall gnus-subscribe-options-newsgroup-method group))
- ((eq do-sub 'ignore)
- nil)
- (t
- (setq groups (1+ groups))
- (gnus-sethash group group gnus-killed-hashtb)
- (if gnus-subscribe-hierarchical-interactive
- (setq new-newsgroups (cons group new-newsgroups))
- (funcall gnus-subscribe-newsgroup-method group)))))))
- gnus-active-hashtb)
- (if new-newsgroups
- (gnus-subscribe-hierarchical-interactive new-newsgroups))
- ;; Suggested by Per Abrahamsen <amanda@iesd.auc.dk>.
- (if (> groups 0)
- (gnus-message 6 "%d new newsgroup%s arrived."
- groups (if (> groups 1) "s have" " has"))
- (gnus-message 6 "No new newsgroups."))))))
+The `-n' option line from .newsrc is respected.
+If ARG (the prefix), use the `ask-server' method to query
+the server for new groups."
+ (interactive "P")
+ (let ((check (if (or (and arg (not (listp gnus-check-new-newsgroups)))
+ (null gnus-read-active-file)
+ (eq gnus-read-active-file 'some))
+ 'ask-server gnus-check-new-newsgroups)))
+ (unless (gnus-check-first-time-used)
+ (if (or (consp check)
+ (eq check 'ask-server))
+ (gnus-ask-server-for-new-groups)
+ (let ((groups 0)
+ group new-newsgroups)
+ (gnus-message 5 "Looking for new newsgroups...")
+ (or gnus-have-read-active-file (gnus-read-active-file))
+ (setq gnus-newsrc-last-checked-date (current-time-string))
+ (if (not gnus-killed-hashtb) (gnus-make-hashtable-from-killed))
+ ;; Go though every newsgroup in `gnus-active-hashtb' and compare
+ ;; with `gnus-newsrc-hashtb' and `gnus-killed-hashtb'.
+ (mapatoms
+ (lambda (sym)
+ (if (or (null (setq group (symbol-name sym)))
+ (not (boundp sym))
+ (null (symbol-value sym))
+ (gnus-gethash group gnus-killed-hashtb)
+ (gnus-gethash group gnus-newsrc-hashtb))
+ ()
+ (let ((do-sub (gnus-matches-options-n group)))
+ (cond
+ ((eq do-sub 'subscribe)
+ (setq groups (1+ groups))
+ (gnus-sethash group group gnus-killed-hashtb)
+ (funcall gnus-subscribe-options-newsgroup-method group))
+ ((eq do-sub 'ignore)
+ nil)
+ (t
+ (setq groups (1+ groups))
+ (gnus-sethash group group gnus-killed-hashtb)
+ (if gnus-subscribe-hierarchical-interactive
+ (setq new-newsgroups (cons group new-newsgroups))
+ (funcall gnus-subscribe-newsgroup-method group)))))))
+ gnus-active-hashtb)
+ (if new-newsgroups
+ (gnus-subscribe-hierarchical-interactive new-newsgroups))
+ ;; Suggested by Per Abrahamsen <amanda@iesd.auc.dk>.
+ (if (> groups 0)
+ (gnus-message 6 "%d new newsgroup%s arrived."
+ groups (if (> groups 1) "s have" " has"))
+ (gnus-message 6 "No new newsgroups.")))))))
(defun gnus-matches-options-n (group)
- ;; Returns `subscribe' if the group is to be uncoditionally
+ ;; Returns `subscribe' if the group is to be unconditionally
;; subscribed, `ignore' if it is to be ignored, and nil if there is
;; no match for the group.
((or (eq symbol options-symbol)
(eq symbol Options-symbol))
(setq gnus-newsrc-options
- ;; This concatting is quite inefficient, but since our
+ ;; This concating is quite inefficient, but since our
;; thorough studies show that approx 99.37% of all
;; .newsrc files only contain a single options line, we
;; don't give a damn, frankly, my dear.
(point)))))
(forward-line -1))
(symbol
+ ;; Group names can be just numbers.
+ (when (numberp symbol)
+ (setq symbol (intern (int-to-string symbol) gnus-active-hashtb)))
(or (boundp symbol) (set symbol nil))
;; It was a group name.
(setq subscribed (= (following-char) ?:)
;; If FORCE, delete article no matter how many X-Gnus-Newsgroup
;; headers there are. If LEAVE-DELIM, don't delete the Unix mbox
-;; delimeter line.
+;; delimiter line.
(defun nnbabyl-delete-mail (&optional force leave-delim)
;; Delete the current X-Gnus-Newsgroup line.
(or force
(let ((delim (concat "^" nnbabyl-mail-delimiter))
start end)
(set-buffer (setq nnbabyl-mbox-buffer
- (find-file-noselect nnbabyl-mbox-file nil 'raw)))
+ (nnheader-find-file-noselect
+ nnbabyl-mbox-file nil 'raw)))
;; Save buffer mode.
(setq nnbabyl-previous-buffer-mode
(cons (cons (point-min) (point-max))
((looking-at "\^A\^A\^A\^A$")
'mmdf)
((looking-at "^Path:.*\n")
+ 'news)
+ ((looking-at "#! *rnews")
'rnews)
((re-search-forward "\^_\^L *\n" nil t)
'babyl)
((let ((case-fold-search nil))
(re-search-forward "^\t[^a-z]+ ([^a-z]+) --" nil t))
'clari-briefs)
- ((re-search-forward "^Path: .*!" nil t)
- 'news)
(t
'digest)))
nneething-group-alist)))))))
(defun nneething-map-file ()
- ;; We make sure that the .neething directory exists.
+ ;; We make sure that the .nneething directory exists.
(or (file-exists-p nneething-map-file-directory)
(make-directory nneething-map-file-directory 'parents))
;; We store it in a special directory under the user's home dir.
(concat (file-name-as-directory nnfolder-directory) "active")
"The name of the active file.")
-;; I renamed this variable to somehting more in keeping with the general GNU
+;; I renamed this variable to something more in keeping with the general GNU
;; style. -SLB
(defvar nnfolder-ignore-active-file nil
;; accidentally gotten new mail with something other than Gnus (but why
;; would _that_ ever happen? :-). In that case, we will be in the middle of
;; processing the file, ready to add new X-Gnus article number markers, and
-;; we'll run accross a message with no ID yet - the active list _may_not_ be
+;; we'll run across a message with no ID yet - the active list _may_not_ be
;; ready for us yet.
;; To handle this, I'm modifying this routine to maintain the maximum ID seen
;; and add it if it isn't.
;;(if (not (assoc nnfoler-current-group nnfolder-group-alist)
(set-buffer (setq nnfolder-current-buffer
- (find-file-noselect file nil 'raw)))
+ (nnheader-find-file-noselect file nil 'raw)))
(buffer-disable-undo (current-buffer))
(let ((delim (concat "^" rmail-unix-mail-delimiter))
(marker (concat "\n" nnfolder-article-marker))
activenumber activemin start end)
(goto-char (point-min))
;;
- ;; Anytime the active number is 1 or 0, it is supect. In that case,
+ ;; Anytime the active number is 1 or 0, it is suspect. In that case,
;; search the file manually to find the active number. Or, of course,
;; if we're being paranoid. (This would also be the place to build
;; other lists from the header markers, such as expunge lists, etc., if
(cond ((null file) "")
((numberp file) (int-to-string file))
(t file))))
+
+(defun nnheader-functionp (form)
+ "Return non-nil if FORM is funcallable."
+ (or (and (symbolp form) (fboundp form))
+ (and (listp form) (eq (car form) 'lambda))))
+
+(fset 'nnheader-find-file-noselect 'find-file-noselect)
(provide 'nnheader)
"Select article by message number."
(nnkiboze-possibly-change-newsgroups newsgroup)
(if (not (numberp article))
- ;; This is a real cludge. It might not work at times, but it
+ ;; This is a real kludge. It might not work at times, but it
;; does no harm I think. The only alternative is to offer no
;; article fetching by message-id at all.
(nntp-request-article article newsgroup gnus-nntp-server buffer)
(defvar nnmail-message-id-cache-length 1000
"*The approximate number of Message-IDs nnmail will keep in its cache.
If this variable is nil, no checking on duplicate messages will be
-perfomed.")
+performed.")
(defvar nnmail-message-id-cache-file "~/.nnmail-cache"
"*The file name of the nnmail Message-ID cache.")
Three values are legal: nil, which means that nnmail is not to keep a
Message-ID cache; `warn', which means that nnmail should insert extra
headers to warn the user about the duplication (this is the default);
-and `delete', which means that nnmail will delete duplicated mails.")
+and `delete', which means that nnmail will delete duplicated mails.
+
+This variable can also be a function. It will be called from a buffer
+narrowed to the article in question with the Message-ID as a
+parameter. It should return nil, `warn' or `delete'.")
;;; Internal variables.
(if exit-func (funcall exit-func))
(kill-buffer (current-buffer)))))
-;; Mail crossposts syggested by Brian Edmonds <edmonds@cs.ubc.ca>.
+;; Mail crossposts suggested by Brian Edmonds <edmonds@cs.ubc.ca>.
(defun nnmail-article-group (func)
"Look at the headers and return an alist of groups that match.
FUNC will be called with the group name to determine the article number."
"Error in `nnmail-split-methods'; using `bogus' mail group")
(sit-for 1)
'("bogus")))))
- ;; Go throught the split methods to find a match.
+ ;; Go through the split methods to find a match.
(while (and methods (or nnmail-crosspost (not group-art)))
(goto-char (point-max))
(setq method (pop methods))
(nnmail-split-it nnmail-split-fancy))
(defvar nnmail-split-cache nil)
-;; Alist of split expresions their equivalent regexps.
+;; Alist of split expressions their equivalent regexps.
(defun nnmail-split-it (split)
;; Return a list of groups matching SPLIT.
(defun nnmail-check-duplication (message-id func)
;; If this is a duplicate message, then we do not save it.
- (let ((duplication (nnmail-cache-id-exists-p message-id)))
+ (let* ((duplication (nnmail-cache-id-exists-p message-id))
+ (action (when duplication
+ (if (nnheader-functionp nnmail-treat-duplicates)
+ (funcall nnmail-treat-duplicates message-id)
+ nnmail-treat-duplicates))))
(cond
((not duplication)
(nnmail-cache-insert message-id)
(funcall func))
- ((eq nnmail-treat-duplicates 'delete)
+ ((eq action 'delete)
(delete-region (point-min) (point-max)))
- (t
+ ((eq action 'warn)
;; We insert a warning.
(let ((case-fold-search t)
(newid (nnmail-message-id)))
(insert "Gnus-Warning: This is a duplication of message "
message-id "\n")
(nnmail-cache-insert newid)
- (funcall func))))))
+ (funcall func)))
+ (t
+ (funcall func)))))
;;; Get new mail.
;; If FORCE, delete article no matter how many X-Gnus-Newsgroup
;; headers there are. If LEAVE-DELIM, don't delete the Unix mbox
-;; delimeter line.
+;; delimiter line.
(defun nnmbox-delete-mail (&optional force leave-delim)
;; Delete the current X-Gnus-Newsgroup line.
(or force
(not (buffer-name nnmbox-mbox-buffer)))
(save-excursion
(set-buffer (setq nnmbox-mbox-buffer
- (find-file-noselect nnmbox-mbox-file nil 'raw)))
+ (nnheader-find-file-noselect
+ nnmbox-mbox-file nil 'raw)))
(buffer-disable-undo (current-buffer))))
(if (not nnmbox-group-alist)
(nnmail-activate 'nnmbox))
(and
(nnmail-activate 'nnmh)
;; We trick the choosing function into believing that only one
- ;; group is availiable.
+ ;; group is available.
(let ((nnmail-split-methods (list (list group ""))))
(car (nnmh-save-mail noinsert))))
(and
(when (and (setq group-num (nnml-find-group-number id))
(setq file (cdr
(assq (cdr group-num)
- (setq gpath
- (nnheader-article-to-file-alist
+ (nnheader-article-to-file-alist
+ (setq gpath
(nnmail-group-pathname
(car group-num)
nnml-directory)))))))
(and
(nnmail-activate 'nnml)
;; We trick the choosing function into believing that only one
- ;; group is availiable.
+ ;; group is available.
(let ((nnmail-split-methods (list (list group ""))))
(setq result (car (nnml-save-mail))))
(progn
(require 'sendmail)
(require 'nnheader)
+(eval-and-compile
+ (unless (fboundp 'open-network-stream)
+ (require 'tcp)))
+
(eval-when-compile (require 'cl))
(eval-and-compile
(accept-process-output)
;; On some Emacs versions the preceding function has
;; a tendency to change the buffer. Perhaps. It's
- ;; quite difficult to reporduce, because it only
+ ;; quite difficult to reproduce, because it only
;; seems to happen once in a blue moon.
(set-buffer buf)
(while (progn
(list (caddr article)) cgroup))
(set-buffer nntp-server-buffer)
(if (zerop (buffer-size))
- (nconc (assq cgroup unfetched) (caddr article))
+ (nconc (assq cgroup unfetched) (list (caddr article)))
;; If we got HEAD headers, we convert them into NOV
;; headers. This is slow, inefficient and, come to think
;; of it, downright evil. So sue me. I couldn't be
(push (cons 'cache (gnus-cache-articles-in-group g))
marks))
(when active
- (setq div (/ (float (car active)) (cdr active)))
+ (setq div (/ (float (car active))
+ (if (zerop (cdr active))
+ 1 (cdr active))))
(mapcar (lambda (n)
(list (* div (- n (car active)))
g n (and (memq n unreads) t)
+Wed Jan 17 02:26:15 1996 Lars Ingebrigtsen <lars@eyesore.no>
+
+ * gnus.texi (Group Maintenance): Addition.
+ (Setting Process Marks): Addition.
+ (Reading Mail): Addition.
+ (Mail & Post): Change.
+ (Post): Addition.
+ (Listing Groups): Addition.
+ (Mail): Addition.
+ (Emacsen): Change.
+
Tue Jan 16 15:33:04 1996 Lars Ingebrigtsen <lars@eyesore.no>
* gnus.texi (Article Hiding): Fix.
@itemize @bullet
@item
-Emacs 19.26 and up.
+Emacs 19.30 and up.
@item
-XEmacs 19.12 and up.
+XEmacs 19.13 and up.
@item
-Mule versions based on Emacs 19.26 and up.
+Mule versions based on Emacs 19.30 and up.
@end itemize
@vindex nnmail-spool-file
@cindex POP mail
+@cindex MAILHOST
@code{nnmail-spool-file} says where to look for new mail. If this
variable is @code{nil}, the mail backends will never attempt to fetch
mail by themselves. If you are using a POP mail server and your name is
default), and @code{nnmail} won't delete duplicate mails. Instead it
will generate a brand new @code{Message-ID} for the mail and insert a
warning into the head of the mail saying that it thinks that this is a
-duplicate of a different message. Or you can turn this feature off
-completely by setting the variable to @code{nil}.
+duplicate of a different message.
+
+This variable can also be a function. If that's the case, the function
+will be called from a buffer narrowed to the message in question with
+the @code{Message-ID} as a parameter. The function must return either
+@code{nil}, @code{warn}, or @code{delete}.
+
+You can turn this feature off completely by setting the variable to
+@code{nil}.
Here's a neat feature: If you know that the recipient reads her mail
with Gnus, and that she has @code{nnmail-treat-duplicates} set to
add the @code{visible} element to the group parameters in question to
get the same effect.
+@vindex gnus-list-groups-with-ticked-articles
+Groups that have just ticked articles in it are normally listed in the
+group buffer. If @code{gnus-list-groups-with-ticked-articles} is
+@code{nil}, these groups will be treated just like totally empty
+groups. It is @code{t} by default.
+
+
@node Sorting Groups
@section Sorting Groups
@cindex sorting groups
@item F
@kindex F (Group)
@findex gnus-find-new-newsgroups
-Find new groups and process them (@code{gnus-find-new-newsgroups}).
+Find new groups and process them (@code{gnus-find-new-newsgroups}). If
+given a prefix, use the @code{ask-server} method to query the server for
+new groups.
@item C-c C-x
@kindex C-c C-x (Group)
@item gnus-forward-end-separator
Delimiter inserted after forwarded messages.
-@findex gnus-signature-before-forwarded-message
+@vindex gnus-signature-before-forwarded-message
@item gnus-signature-before-forwarded-message
If this variable is @code{t}, which it is by default, your personal
signature will be inserted before the forwarded message. If not, the
forwarded message will be inserted first in the new mail.
+@item gnus-forward-included-headers
+@vindex gnus-forward-included-headers
+Regexp matching header lines to be included in forwarded messages. It
+usese the same regexp as @code{gnus-visible-headers} by default.
+
@end table
@kindex C-c C-c (Mail)
If non-@code{nil}, Gnus will attempt to check the legality of the
headers, as well as some other stuff, before posting. You can control
the granularity of the check by adding or removing elements from this
-list. Legal elemetents are:
+list. Legal elements are:
@table @code
@item subject-cmsg
@item approved
Check whether the article has an @code{Approved} header, which is
something only moderators should include.
+@item empty
+Check whether the article is empty.
@end table
@end table
When you are replying to or following up an article, you normally want
to quote the person you are answering. Inserting quoted text is done by
@dfn{yanking}, and each quoted line you yank will have
-@code{mail-yank-prefix} prepended to it. This is @samp{ } by default,
-which isn't very pretty. Most everybody prefers that lines are
-prepended with @samp{> }, so @code{(setq mail-yank-prefix "> ")} in your
-@file{.emacs} file.
+@code{mail-yank-prefix} prepended to it. This is @code{nil} by default,
+which isn't very pretty---the prefix will just be some spaces. Most
+everybody prefers that lines are prepended with @samp{> }, so
+@code{(setq mail-yank-prefix "> ")} in your @file{.emacs} file.
@item mail-yank-ignored-headers
@vindex mail-yank-ignored-headers
Unmark all articles in the current (sub)thread
(@code{gnus-uu-unmark-thread}).
+@item M P v
+@kindex M P v (Summary)
+@findex gnus-uu-mark-over
+Mark all articles that have a score above the prefix argumnet
+(@code{gnus-uu-mark-over}).
+
@item M P s
@kindex M P s (Summary)
@findex gnus-uu-mark-series