+Sat Mar 9 01:58:10 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+
+ * gnus-msg.el (gnus-tokenize-header): Wouldn't do the right thing
+ under XEmacs.
+
+Sat Mar 9 00:16:54 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no>
+
+ * gnus-topic.el (gnus-topic-change-level): Insert groups in the
+ proper topic.
+ (gnus-topic-group-indentation): New function.
+ (gnus-topic-prepare-topic): Would do incorrect tallies.
+
+Fri Mar 8 23:15:05 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no>
+
+ * nnvirtual.el (nnvirtual-create-mapping): Would enter each
+ article twice into the marks lists, possibly.
+ (nnvirtual-update-marked): Would "forget" marks.
+
+ * gnus.el (gnus-select-newsgroup): Create unsingle article buffer
+ on group entry.
+
+ * gnus-cache.el (gnus-cache-remove-article): Move forwards.
+ (gnus-cache-retrieve-headers): Would retrieve wrong headers.
+
+Fri Mar 8 19:18:29 1996 Lars Magne Ingebrigtsen <lars@eyesore.no>
+
+ * gnus-score.el (gnus-summary-increase-score): Defaults were used
+ incorrectly.
+ (gnus-score-edit-current-scores): Changed name.
+
+ * gnus.el (gnus-gnus-to-quick-newsrc-format): Don't crete so much
+ string garbage.
+
+ * gnus-xmas.el (gnus-xmas-menu-add): New macro.
+
Fri Mar 8 00:03:14 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
* gnus.el (gnus-group-yank-group): Would bug out on groups with
"Retrieve the headers for ARTICLES in GROUP."
(let* ((cached
(setq gnus-newsgroup-cached (gnus-cache-articles-in-group group)))
- (articles (gnus-sorted-complement articles cached))
+ (uncached-articles (gnus-sorted-intersection
+ (gnus-sorted-complement articles cached)
+ articles))
(cache-file (gnus-cache-file-name group ".overview"))
type)
;; We first retrieve all the headers that we don't have in
;; the cache.
(let ((gnus-use-cache nil))
(setq type (and articles
- (gnus-retrieve-headers articles group fetch-old))))
+ (gnus-retrieve-headers
+ uncached-articles group fetch-old))))
(gnus-cache-save-buffers)
;; Then we insert the cached headers.
(save-excursion
type)
(t
;; We braid HEADs.
- (gnus-cache-braid-heads group cached)
+ (gnus-cache-braid-heads group (gnus-sorted-intersection
+ cached articles))
type)))))
(defun gnus-cache-enter-article (&optional n)
(push article out))
(gnus-summary-remove-process-mark article)
(gnus-summary-update-secondary-mark article))
+ (gnus-summary-next-subject 1)
(gnus-summary-position-point)
(nreverse out)))
summary-menu group-menu article-menu
tree-highlight menu highlight
browse-menu server-menu
- page-marker))
+ page-marker tree-menu binary-menu pick-menu
+ grouplens-menu))
(name . gnus-visual)
(type . toggle))
((tag . "WWW Browser")
buffer."
(interactive "P")
(let ((gnus-newsgroup-name nil)
- (group (unless arg (gnus-group-group-name)))
- subject)
+ (group (unless arg (gnus-group-group-name))))
;; We might want to prompt here.
(when (and gnus-interactive-post
(not gnus-expert-user))
;; Mail the message if To, Bcc or Cc exists.
(let* ((types '("to" "bcc" "cc"))
(ty types)
- (buffer (current-buffer))
- fcc)
+ (buffer (current-buffer)))
(save-restriction
(widen)
(gnus-inews-narrow-to-headers)
(let* ((beg 0)
(separator (or separator ","))
(regexp
- (format "[ \t]*\\([^%s]+\\)?\\(%s\\|\\'\\)" separator separator))
+ (format "[ \t]*\\([^%s]+\\)?\\([%s]+\\|\\'\\)" separator separator))
elems)
(while (and (string-match regexp header beg)
(< beg (length header)))
(interactive "sResend message to: ")
(gnus-summary-select-article)
(save-excursion
- (let (resent beg)
+ (let (beg)
;; We first set up a normal mail buffer.
(nnheader-set-temp-buffer " *Gnus resend*")
;; This code from sendmail.el
(let ((group (gnus-group-real-name (or group gnus-newsgroup-name)))
(cur (cons (current-buffer) (cdr gnus-article-current)))
(winconf (current-window-configuration))
- from subject date reply-to message-of
- references message-id sender follow-to sendto elt
+ from subject date message-of
+ references message-id follow-to sendto elt
followup-to distribution newsgroups gnus-warning)
(set-buffer (get-buffer-create gnus-post-news-buffer))
(news-reply-mode)
(interactive)
(let ((reply gnus-article-reply)
(winconf gnus-prev-winconf)
- (group gnus-newsgroup-name)
- buf)
+ (group gnus-newsgroup-name))
(or (and group (not (gnus-group-read-only-p group)))
(setq group (read-string "Put in group: " nil
(nnheader-narrow-to-headers)
(let ((gcc (or gcc (mail-fetch-field "gcc" nil t)))
(cur (current-buffer))
- end groups group method)
+ groups group method)
(when gcc
(nnheader-remove-header "gcc")
(widen)
(gnus-set-global-variables)
(unless (equal gnus-newsgroup-name (gnus-draft-group))
(error "This function can only be used in the draft buffer"))
- (let (buf point)
+ (let (buf)
(if (not (setq buf (gnus-request-restore-buffer
(gnus-summary-article-number) gnus-newsgroup-name)))
(error "Couldn't restore the article")
- (setq point (point))
(switch-to-buffer buf)
(gnus-inews-modify-mail-mode-map)
(when (eq major-mode 'news-reply-mode)
(unless (boundp 'gnus-tree-menu)
(easy-menu-define
gnus-tree-menu gnus-tree-mode-map ""
- '("Tree"))))
+ '("Tree"
+ ["Select article" gnus-tree-select-article t]))))
(defun gnus-tree-mode ()
"Major mode for displaying thread trees."
(let* ((dummy (stringp (car thread)))
(do (or dummy
(memq (mail-header-number (car thread)) gnus-tmp-limit)))
- col beg)
+ beg)
(if (not do)
;; We don't want this article.
(setq thread (cdr thread))
"m" gnus-score-set-mark-below
"x" gnus-score-set-expunge-below
"R" gnus-summary-rescore
- "e" gnus-score-edit-alist
+ "e" gnus-score-edit-current-scores
"f" gnus-score-edit-file
"t" gnus-score-find-trace
"C" gnus-score-customize)
(aref (symbol-name gnus-score-default-type) 0)))
(pchar (and gnus-score-default-duration
(aref (symbol-name gnus-score-default-duration) 0)))
- entry temporary end type match)
+ entry temporary type match)
;; First we read the header to score.
(while (not hchar)
(when (/= (downcase hchar) hchar)
;; This was a majuscle, so we end reading and set the defaults.
(if mimic (message "%c %c" prefix hchar) (message ""))
- (setq tchar (or gnus-score-default-type ?s)
- pchar (or gnus-score-default-duration ?t)))
+ (setq tchar (or tchar ?s)
+ pchar (or pchar ?t)))
;; We continue reading - the type.
(while (not tchar)
;; It was a majuscle, so we end reading and the the default.
(if mimic (message "%c %c %c" prefix hchar tchar)
(message ""))
- (setq pchar (or gnus-score-default-duration ?p)))
+ (setq pchar (or pchar ?p)))
;; We continue reading.
(while (not pchar)
(gnus-score-load-file file)
(gnus-set-mode-line 'summary))
-(defun gnus-score-edit-alist (file)
+(defun gnus-score-edit-current-scores (file)
"Edit the current score alist."
(interactive (list gnus-current-score-file))
(let ((winconf (current-window-configuration)))
If LOWEST is non-nil, list all newsgroups of level LOWEST or higher."
(set-buffer gnus-group-buffer)
(let ((buffer-read-only nil)
- (lowest (or lowest 1))
- tlist info)
+ (lowest (or lowest 1)))
+
+ (setq gnus-topic-tallied-groups nil)
(unless gnus-topic-alist
(gnus-topic-check-topology))
gnus-level-killed ?K
regexp))
- (setq gnus-topic-tallied-groups nil)
;; Use topics.
(when (< lowest gnus-level-zombie)
(if list-topic
(car entry) (gnus-info-method info)))))
(when (and (listp entry)
(numberp (car entry))
- (not (member (gnus-info-group info)
+ (not (member (gnus-info-group (setq info (nth 2 entry)))
gnus-topic-tallied-groups)))
(push (gnus-info-group info) gnus-topic-tallied-groups)
(incf unread (car entry))))
(visiblep (eq (nth 1 type) 'visible))
(all-entries entries)
(unread 0)
- info entry end)
+ entry)
;; Tally any sub-topics.
(while topic
(incf unread (gnus-topic-update-topic-line (pop topic) (1+ level))))
;; Tally all the groups that belong in this topic.
- (while (setq info (nth 2 (setq entry (pop entries))))
+ (while (setq entry (pop entries))
(when (numberp (car entry))
(incf unread (car entry))))
;; Insert the topic line.
gnus-have-read-active-file))))
(let ((gnus-read-active-file t))
(gnus-read-active-file)))
- (let (topology groups alist)
+ (let (groups)
;; Get a list of all groups available.
(mapatoms (lambda (g) (when (symbol-value g)
(push (symbol-name g) groups)))
(defun gnus-topic-grok-active-1 (topology groups)
(let* ((name (caar topology))
(prefix (concat "^" (regexp-quote name)))
- tgroups nprefix ntopology group)
+ tgroups ntopology group)
(while (and groups
(string-match prefix (setq group (car groups))))
(if (not (string-match "\\." group (match-end 0)))
'gnus-topic-goto-next-group)
(setq gnus-group-change-level-function 'gnus-topic-change-level)
(setq gnus-goto-missing-group-function 'gnus-topic-goto-missing-group)
+ (make-local-variable 'gnus-group-indentation-function)
+ (setq gnus-group-indentation-function
+ 'gnus-topic-group-indentation)
;; We check the topology.
(gnus-topic-check-topology)
(run-hooks 'gnus-topic-mode-hook))
(completing-read "Copy to topic: " gnus-topic-alist nil t)))
(gnus-topic-move-group n topic t))
+(defun gnus-topic-group-indentation ()
+ (make-string
+ (* gnus-topic-indent-level
+ (or (save-excursion
+ (gnus-topic-goto-topic (gnus-group-parent-topic))
+ (gnus-group-topic-level)) 0)) ? ))
+
(defun gnus-topic-change-level (group level oldlevel)
"Run when changing levels to enter/remove groups from topics."
(when (and gnus-topic-mode
;; If the group is subscribed. then we enter it into the topics.
(when (and (< level gnus-level-zombie)
(>= oldlevel gnus-level-zombie))
- (let ((entry (assoc (caar gnus-topic-topology) gnus-topic-alist)))
- (setcdr entry (cons group (cdr entry)))))))
+ (let* ((prev (gnus-group-group-name))
+ (gnus-topic-inhibit-change-level t)
+ (gnus-group-indentation
+ (make-string
+ (* gnus-topic-indent-level
+ (or (save-excursion
+ (gnus-topic-goto-topic (gnus-group-parent-topic))
+ (gnus-group-topic-level)) 0)) ? ))
+ (yanked (list group))
+ alist)
+ ;; Then we enter the yanked groups into the topics they belong
+ ;; to.
+ (setq alist (assoc (save-excursion
+ (forward-line -1)
+ (gnus-group-parent-topic))
+ gnus-topic-alist))
+ (when (stringp yanked)
+ (setq yanked (list yanked)))
+ (if (not prev)
+ (nconc alist yanked)
+ (if (not (cdr alist))
+ (setcdr alist (nconc yanked (cdr alist)))
+ (while (cdr alist)
+ (when (equal (cadr alist) prev)
+ (setcdr alist (nconc yanked (cdr alist)))
+ (setq alist nil))
+ (setq alist (cdr alist))))))
+ (gnus-topic-update-topic))))
(defun gnus-topic-goto-next-group (group props)
"Go to group or the next group after group."
(or (save-excursion
(gnus-topic-goto-topic (gnus-group-parent-topic))
(gnus-group-topic-level)) 0)) ? ))
- yanked group alist)
+ yanked alist)
;; We first yank the groups the normal way...
(setq yanked (gnus-group-yank-group arg))
;; Then we enter the yanked groups into the topics they belong
;; Go through FILES and look for files to unpack.
(let* ((totfiles (gnus-uu-ls-r gnus-uu-work-dir))
(ofiles files)
- file did-unpack file-entry)
+ file did-unpack)
(gnus-uu-add-file totfiles)
(while files
- (setq file (cdr (setq file-entry (assq 'name (car files)))))
+ (setq file (cdr (assq 'name (car files))))
(if (and (not (member file ignore))
(equal (gnus-uu-get-action (file-name-nondirectory file))
"gnus-uu-archive"))
(select-window lowest-window)
(setq window-search nil)))))))
+(defmacro gnus-xmas-menu-add (type &rest menus)
+ `(gnus-xmas-menu-add-1 ',type ',menus))
+(put 'gnus-xmas-menu-add 'lisp-indent-function 1)
+(put 'gnus-xmas-menu-add 'lisp-indent-hook 1)
+
+(defun gnus-xmas-menu-add-1 (type menus)
+ (when (and menu-bar-mode
+ (gnus-visual-p (intern (format "%s-menu" type)) 'menu))
+ (while menus
+ (easy-menu-add (symbol-value (pop menus))))))
+
(defun gnus-xmas-group-menu-add ()
- (easy-menu-add gnus-group-reading-menu)
- (easy-menu-add gnus-group-group-menu)
- (easy-menu-add gnus-group-misc-menu))
+ (gnus-xmas-menu-add group
+ gnus-group-reading-menu gnus-group-group-menu gnus-group-misc-menu))
(defun gnus-xmas-summary-menu-add ()
- (easy-menu-add gnus-summary-article-menu)
- (easy-menu-add gnus-summary-thread-menu)
- (easy-menu-add gnus-summary-misc-menu)
- (easy-menu-add gnus-summary-post-menu)
- (easy-menu-add gnus-summary-kill-menu))
+ (gnus-xmas-menu-add summary
+ gnus-summary-article-menu gnus-summary-thread-menu
+ gnus-summary-misc-menu gnus-summary-post-menu gnus-summary-kill-menu))
(defun gnus-xmas-article-menu-add ()
- (easy-menu-add gnus-article-article-menu)
- (easy-menu-add gnus-article-treatment-menu))
+ (gnus-xmas-menu-add article
+ gnus-article-article-menu gnus-article-treatment-menu))
(defun gnus-xmas-pick-menu-add ()
- (easy-menu-add gnus-pich-menu))
+ (gnus-xmas-menu-add pick
+ gnus-pick-menu))
(defun gnus-xmas-binary-menu-add ()
- (easy-menu-add gnus-binary-menu))
+ (gnus-xmas-menu-add binary
+ gnus-binary-menu))
(defun gnus-xmas-tree-menu-add ()
- (easy-menu-add gnus-tree-menu))
+ (gnus-xmas-menu-add tree
+ gnus-tree-menu))
(defun gnus-xmas-grouplens-menu-add ()
- (easy-menu-add gnus-grouplens-menu))
+ (gnus-xmas-menu-add grouplens
+ gnus-grouplens-menu))
(defun gnus-xmas-read-event-char ()
"Get the next event."
(defvar gnus-topic-active-topology nil)
(defvar gnus-topic-active-alist nil)
+(defvar gnus-group-indentation-function nil)
+
(defvar gnus-topic-indentation "") ;; Obsolete variable.
(defvar gnus-goto-missing-group-function nil)
"gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
"The mail address of the Gnus maintainers.")
-(defconst gnus-version "September Gnus v0.50"
+(defconst gnus-version "September Gnus v0.51"
"Version number for this version of Gnus.")
(defvar gnus-info-nodes
(let ((split (if (symbolp setting)
(cadr (assq setting gnus-buffer-configuration))
setting))
- (in-buf (current-buffer))
- rule val w height hor ohor heights sub jump-buffer
- rel total to-buf all-visible)
+ all-visible)
(setq gnus-frame-split-p nil)
(setq lowest-buf buf)))))
(setq buffers (cdr buffers)))
;; Remove windows on *all* summary buffers.
- (let (wins)
- (walk-windows
- (lambda (win)
- (let ((buf (window-buffer win)))
- (if (string-match "^\\*Summary" (buffer-name buf))
- (progn
- (setq bufs (cons buf bufs))
- (pop-to-buffer buf)
- (if (or (not lowest)
- (< (gnus-window-top-edge) lowest))
- (progn
- (setq lowest-buf buf)
- (setq lowest (gnus-window-top-edge))))))))))
+ (walk-windows
+ (lambda (win)
+ (let ((buf (window-buffer win)))
+ (if (string-match "^\\*Summary" (buffer-name buf))
+ (progn
+ (setq bufs (cons buf bufs))
+ (pop-to-buffer buf)
+ (if (or (not lowest)
+ (< (gnus-window-top-edge) lowest))
+ (progn
+ (setq lowest-buf buf)
+ (setq lowest (gnus-window-top-edge)))))))))
(and lowest-buf
(progn
(pop-to-buffer lowest-buf)
;; 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)
+ (let (group)
(if regexp
;; This loop is used when listing groups that match some
;; regexp.
(setcar (nthcdr 2 entry) info)
(when (and (not (eq (car entry) t))
(gnus-active (gnus-info-group info)))
- (let ((marked (gnus-info-marks info)))
- (setcar entry (length (gnus-list-of-unread-articles
- (car info)))))))
+ (setcar entry (length (gnus-list-of-unread-articles (car info))))))
(error "No such group: %s" (gnus-info-group info)))))
(defun gnus-group-set-method-info (group select-method)
(widen)
(let ((ident (gnus-intern-safe group gnus-active-hashtb))
(loc (point-min))
- found buffer-read-only visible)
+ found buffer-read-only)
;; Enter the current status into the dribble buffer.
(let ((entry (gnus-gethash group gnus-newsrc-hashtb)))
(if (and entry (not (gnus-ephemeral-group-p group)))
(defun gnus-group-group-indentation ()
"Get the indentation of the newsgroup on the current line."
- (or (get-text-property (gnus-point-at-bol) 'gnus-indentation) ""))
+ (or (get-text-property (gnus-point-at-bol) 'gnus-indentation)
+ (and gnus-group-indentation-function
+ (funcall gnus-group-indentation-function))
+ ""))
(defun gnus-group-group-unread ()
"Get the number of unread articles of the newsgroup on the current line."
(defun gnus-summary-article-parent (&optional number)
(let* ((data (gnus-data-find-list (or number (gnus-summary-article-number))
(gnus-data-list t)))
- (level (gnus-data-level (car data)))
- l)
+ (level (gnus-data-level (car data))))
(if (zerop level)
() ; This is a root.
;; We search until we find an article with a level less than
(make-local-variable (car elem))
(set (car elem) (eval (nth 1 elem))))))))
-(defun gnus-summary-read-group
- (group &optional show-all no-article kill-buffer no-display)
+(defun gnus-summary-read-group (group &optional show-all no-article
+ kill-buffer no-display)
"Start reading news in newsgroup GROUP.
If SHOW-ALL is non-nil, already read articles are also listed.
If NO-ARTICLE is non-nil, no article is selected initially.
(regexp-quote id))))
(or found (beginning-of-line 2)))
(when found
- (let (ref)
- (beginning-of-line)
- (and
- (setq header (gnus-nov-parse-line
- (read (current-buffer)) deps))
- (gnus-parent-id (mail-header-references header))))))
+ (beginning-of-line)
+ (and
+ (setq header (gnus-nov-parse-line
+ (read (current-buffer)) deps))
+ (gnus-parent-id (mail-header-references header)))))
(when header
(let ((number (mail-header-number header)))
(push number gnus-newsgroup-limit)
(defun gnus-rebuild-thread (id)
"Rebuild the thread containing ID."
- (let ((dep gnus-newsgroup-dependencies)
- (buffer-read-only nil)
- current headers refs thread art data)
+ (let ((buffer-read-only nil)
+ current thread data)
(if (not gnus-show-threads)
(setq thread (list (car (gnus-id-to-thread id))))
;; Get the thread this article is part of.
;; All the loose roots are now one solid root.
(setq thread (car roots))
(setq thread (cons subject (gnus-sort-threads roots))))))
- (let ((beg (point))
- threads)
+ (let (threads)
;; We then insert this thread into the summary buffer.
(let (gnus-newsgroup-data gnus-newsgroup-threads)
(gnus-summary-prepare-threads (list thread))
(defun gnus-remove-thread (id &optional dont-remove)
"Remove the thread that has ID in it."
(let ((dep gnus-newsgroup-dependencies)
- headers thread prev last-id)
+ headers thread last-id)
;; First go up in this thread until we find the root.
(setq last-id (gnus-root-id id))
(setq headers (list (car (gnus-id-to-thread last-id))
;; Check whether auto-expire is to be done in this group.
(setq gnus-newsgroup-auto-expire
(gnus-group-auto-expirable-p group))
+ ;; Set up the article buffer now, if necessary.
+ (unless gnus-single-article-buffer
+ (gnus-article-setup-buffer))
;; First and last article in this newsgroup.
(and gnus-newsgroup-headers
(setq gnus-newsgroup-begin
(let ((types gnus-article-mark-lists)
(info (gnus-get-info gnus-newsgroup-name))
(uncompressed '(score bookmark killed))
- var type list newmarked symbol)
+ type list newmarked symbol)
(when info
;; Add all marks lists that are non-nil to the list of marks lists.
(while types
(defun gnus-create-xref-hashtb (from-newsgroup headers unreads)
"Go through the HEADERS list and add all Xrefs to a hash table.
The resulting hash table is returned, or nil if no Xrefs were found."
- (let* ((from-method (gnus-find-method-for-group from-newsgroup))
- (virtual (gnus-virtual-group-p from-newsgroup))
+ (let* ((virtual (gnus-virtual-group-p from-newsgroup))
(prefix (if virtual "" (gnus-group-real-prefix from-newsgroup)))
(xref-hashtb (make-vector 63 0))
start group entry number xrefs header)
(save-excursion
(set-buffer nntp-server-buffer)
(let ((case-fold-search t)
- in-reply-to header number p lines)
+ in-reply-to header p lines)
(goto-char (point-min))
;; Search to the beginning of the next header. Error messages
;; do not begin with 2 or 3.
If BACKWARD, the previous article is selected instead of the next."
(interactive "P")
(gnus-set-global-variables)
- (let (header)
- (cond
- ;; Is there such an article?
- ((and (gnus-summary-search-forward unread subject backward)
- (or (gnus-summary-display-article (gnus-summary-article-number))
- (eq (gnus-summary-article-mark) gnus-canceled-mark)))
- (gnus-summary-position-point))
- ;; If not, we try the first unread, if that is wanted.
- ((and subject
- gnus-auto-select-same
- (or (gnus-summary-first-unread-article)
- (eq (gnus-summary-article-mark) gnus-canceled-mark)))
- (gnus-summary-position-point)
- (gnus-message 6 "Wrapped"))
- ;; Try to get next/previous article not displayed in this group.
- ((and gnus-auto-extend-newsgroup
- (not unread) (not subject))
- (gnus-summary-goto-article
- (if backward (1- gnus-newsgroup-begin) (1+ gnus-newsgroup-end))
- nil t))
- ;; Go to next/previous group.
- (t
- (or (gnus-ephemeral-group-p gnus-newsgroup-name)
- (gnus-summary-jump-to-group gnus-newsgroup-name))
- (let ((cmd last-command-char)
- (group
- (if (eq gnus-keep-same-level 'best)
- (gnus-summary-best-group gnus-newsgroup-name)
- (gnus-summary-search-group backward gnus-keep-same-level))))
- ;; For some reason, the group window gets selected. We change
- ;; it back.
- (select-window (get-buffer-window (current-buffer)))
- ;; Select next unread newsgroup automagically.
- (cond
- ((not gnus-auto-select-next)
- (gnus-message 7 "No more%s articles" (if unread " unread" "")))
- ((or (eq gnus-auto-select-next 'quietly)
- (and (eq gnus-auto-select-next 'slightly-quietly)
- push)
- (and (eq gnus-auto-select-next 'almost-quietly)
- (gnus-summary-last-article-p)))
- ;; Select quietly.
- (if (gnus-ephemeral-group-p gnus-newsgroup-name)
- (gnus-summary-exit)
- (gnus-message 7 "No more%s articles (%s)..."
- (if unread " unread" "")
- (if group (concat "selecting " group)
- "exiting"))
- (gnus-summary-next-group nil group backward)))
- (t
- (gnus-summary-walk-group-buffer
- gnus-newsgroup-name cmd unread backward))))))))
+ (cond
+ ;; Is there such an article?
+ ((and (gnus-summary-search-forward unread subject backward)
+ (or (gnus-summary-display-article (gnus-summary-article-number))
+ (eq (gnus-summary-article-mark) gnus-canceled-mark)))
+ (gnus-summary-position-point))
+ ;; If not, we try the first unread, if that is wanted.
+ ((and subject
+ gnus-auto-select-same
+ (or (gnus-summary-first-unread-article)
+ (eq (gnus-summary-article-mark) gnus-canceled-mark)))
+ (gnus-summary-position-point)
+ (gnus-message 6 "Wrapped"))
+ ;; Try to get next/previous article not displayed in this group.
+ ((and gnus-auto-extend-newsgroup
+ (not unread) (not subject))
+ (gnus-summary-goto-article
+ (if backward (1- gnus-newsgroup-begin) (1+ gnus-newsgroup-end))
+ nil t))
+ ;; Go to next/previous group.
+ (t
+ (or (gnus-ephemeral-group-p gnus-newsgroup-name)
+ (gnus-summary-jump-to-group gnus-newsgroup-name))
+ (let ((cmd last-command-char)
+ (group
+ (if (eq gnus-keep-same-level 'best)
+ (gnus-summary-best-group gnus-newsgroup-name)
+ (gnus-summary-search-group backward gnus-keep-same-level))))
+ ;; For some reason, the group window gets selected. We change
+ ;; it back.
+ (select-window (get-buffer-window (current-buffer)))
+ ;; Select next unread newsgroup automagically.
+ (cond
+ ((not gnus-auto-select-next)
+ (gnus-message 7 "No more%s articles" (if unread " unread" "")))
+ ((or (eq gnus-auto-select-next 'quietly)
+ (and (eq gnus-auto-select-next 'slightly-quietly)
+ push)
+ (and (eq gnus-auto-select-next 'almost-quietly)
+ (gnus-summary-last-article-p)))
+ ;; Select quietly.
+ (if (gnus-ephemeral-group-p gnus-newsgroup-name)
+ (gnus-summary-exit)
+ (gnus-message 7 "No more%s articles (%s)..."
+ (if unread " unread" "")
+ (if group (concat "selecting " group)
+ "exiting"))
+ (gnus-summary-next-group nil group backward)))
+ (t
+ (gnus-summary-walk-group-buffer
+ gnus-newsgroup-name cmd unread backward)))))))
(defun gnus-summary-walk-group-buffer (from-group cmd unread backward)
(let ((keystrokes '((?\C-n (gnus-group-next-unread-group 1))
(gnus-set-global-variables)
(let ((buffer-read-only nil)
(start (point))
- (article (gnus-summary-article-number))
- end)
+ (article (gnus-summary-article-number)))
(goto-char start)
;; Go forward until either the buffer ends or the subthread
;; ends.
(when (and (not (eobp))
(or (zerop (gnus-summary-next-thread 1 t))
(goto-char (point-max))))
- (setq end (point))
(prog1
(if (and (> (point) start)
(search-backward "\n" start t))
(defun gnus-read-header (id)
"Read the headers of article ID and enter them into the Gnus system."
(let ((group gnus-newsgroup-name)
- (headers gnus-newsgroup-headers)
header where)
;; First we check to see whether the header in question is already
;; fetched.
((and gnus-visible-headers
(listp gnus-visible-headers))
(mapconcat 'identity gnus-visible-headers "\\|"))))
- want-list beg want-l)
+ want-list beg)
;; First we narrow to just the headers.
(widen)
(goto-char (point-min))
(interactive)
(save-excursion
(set-buffer gnus-article-buffer)
- (let ((buffer-read-only nil)
- p)
+ (let ((buffer-read-only nil))
(widen)
(goto-char (point-min))
(search-forward "\n\n" nil t)
(defun gnus-article-hidden-text-p (type)
"Say whether the current buffer contains hidden text of type TYPE."
- (let ((pos (text-property-any (point-min) (point-max) 'gnus-type type))
- prop)
+ (let ((pos (text-property-any (point-min) (point-max) 'gnus-type type)))
(when pos
(if (get-text-property pos 'invisible)
'hidden
info (gnus-find-method-for-group (gnus-info-group info))))
(gnus-activate-group (gnus-info-group info)))
(let* ((range (gnus-info-read info))
- (num 0)
- (marked (gnus-info-marks info)))
+ (num 0))
;; If a cache is present, we may have to alter the active info.
(when (and gnus-use-cache info)
(gnus-cache-possibly-alter-active (gnus-info-group info) active))
(let* ((active (or gnus-newsgroup-active (gnus-active group)))
(entry (gnus-gethash group gnus-newsrc-hashtb))
(info (nth 2 entry))
- (marked (gnus-info-marks info))
(prev 1)
(unread (sort (copy-sequence unread) '<))
read)
(if (equal method gnus-select-method)
(gnus-make-hashtable
(count-lines (point-min) (point-max)))
- (gnus-make-hashtable 4096))))))
- (flag-hashtb (gnus-make-hashtable 60)))
+ (gnus-make-hashtable 4096)))))))
;; Delete unnecessary lines.
(goto-char (point-min))
(while (search-forward "\nto." nil t)
(while variables
(when (and (boundp (setq variable (pop variables)))
(symbol-value variable))
- (insert "(setq " (symbol-name variable) " '"
- (prin1-to-string (symbol-value variable)) ")\n")))))
+ (insert "(setq " (symbol-name variable) " '")
+ (prin1 (symbol-value variable) (current-buffer))
+ (insert ")\n")))))
(defun gnus-gnus-to-newsrc-format ()
;; Generate and save the .newsrc file.
(defun nnbabyl-request-create-group (group &optional server)
(nnmail-activate 'nnbabyl)
- (or (assoc group nnbabyl-group-alist)
- (let (active)
- (setq nnbabyl-group-alist (cons (list group (setq active (cons 1 0)))
- nnbabyl-group-alist))
- (nnmail-save-active nnbabyl-group-alist nnbabyl-active-file)))
+ (unless (assoc group nnbabyl-group-alist)
+ (setq nnbabyl-group-alist (cons (list group (cons 1 0))
+ nnbabyl-group-alist))
+ (nnmail-save-active nnbabyl-group-alist nnbabyl-active-file))
t)
(defun nnbabyl-request-list (&optional server)
(save-excursion
(set-buffer nntp-server-buffer)
(erase-buffer)
- (let* ((file nil)
- (buf (get-buffer-create " *draft headers*"))
- beg article)
+ (let* ((buf (get-buffer-create " *draft headers*"))
+ article)
(set-buffer buf)
(buffer-disable-undo (current-buffer))
(erase-buffer)
(nnfolder-inhibit-expiry ,nnfolder-inhibit-expiry)
(nnfolder-current-group nil)
(nnfolder-prepare-save-mail-hook nil)
- (nnfolder-ignore-active-file nil)
+ (nnfolder-ignore-active-file ,nnfolder-ignore-active-file)
(nnfolder-current-buffer nil)
(nnfolder-status-string "")
(nnfolder-group-alist nil)
(set-buffer (setq nnfolder-current-buffer
(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))
- (number "[0-9]+")
- (active (cadr (assoc nnfolder-current-group
- nnfolder-group-alist)))
- activenumber activemin start end)
+ (let* ((delim (concat "^" rmail-unix-mail-delimiter))
+ (marker (concat "\n" nnfolder-article-marker))
+ (number "[0-9]+")
+ (active (cadr (assoc nnfolder-current-group
+ nnfolder-group-alist)))
+ ;; Set min to Big Number.
+ (min (max (1- (lsh 1 23)) (1- (lsh 1 24)) (1- (lsh 1 25))))
+ (max (cdr active))
+ start end)
(goto-char (point-min))
- ;;
+
;; 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
;; we ever desired to abandon the active file entirely for mboxes.)
- (setq activenumber (cdr active))
- (if (or nnfolder-ignore-active-file
- (< activenumber 2))
- (progn
- (setq activemin (max (1- (lsh 1 23))
- (1- (lsh 1 24))
- (1- (lsh 1 25))))
- (while (and (search-forward marker nil t)
- (re-search-forward number nil t))
- (let ((newnum (string-to-number (buffer-substring
- (match-beginning 0)
- (match-end 0)))))
- (setq activenumber (max activenumber newnum))
- (setq activemin (min activemin newnum))))
- (setcar active (max 1 (min activemin activenumber)))
- (setcdr active (max activenumber (cdr active)))
- (goto-char (point-min))))
+ (when (or nnfolder-ignore-active-file
+ (< max 2))
+ (while (and (search-forward marker nil t)
+ (re-search-forward number nil t))
+ (let ((newnum (string-to-number (match-string 0))))
+ (setq max (max max newnum))
+ (setq min (min min newnum))))
+ (setcar active (max 1 (min min max)))
+ (setcdr active (max max (cdr active)))
+ (goto-char (point-min)))
;; Keep track of the active number on our own, and insert it back into
;; the active list when we're done. Also, prime the pump to cut down on
(interactive)
(nnmail-activate 'nnfolder)
(let ((files (directory-files nnfolder-directory))
- file group)
+ file)
(while (setq file (pop files))
(when (nnheader-mail-file-mbox-p file)
(nnheader-message 5 "Adding group %s..." file)
nnmail-use-procmail)
(not nnmail-resplit-incoming))
(list (list group ""))
- nnmail-split-methods))
- start end do-search message-id)
+ nnmail-split-methods)))
(save-excursion
;; Open the message-id cache.
(nnmail-cache-open)
(lambda (name)
(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)
(nnmail-activate 'nnmh)
(nnml-possibly-change-directory newsgroup)
(let* ((active-articles
(nnheader-directory-articles nnml-current-directory))
- (max-article (and active-articles (apply 'max active-articles)))
(is-old t)
article rest mod-time number)
(nnmail-activate 'nnml)
(save-excursion
(if (stringp (car articles))
'headers
- (let ((map nnvirtual-mapping)
- (vbuf (nnheader-set-temp-buffer
+ (let ((vbuf (nnheader-set-temp-buffer
(get-buffer-create " *virtual headers*")))
(unfetched (mapcar (lambda (g) (list g))
nnvirtual-component-groups))
(system-name (system-name))
- beg cgroup active article result prefix)
+ cgroup article result prefix)
(while articles
(setq article (assq (pop articles) nnvirtual-mapping))
(when (and (setq cgroup (cadr article))
(when (nnvirtual-possibly-change-group group server)
(let ((map nnvirtual-mapping)
(marks (mapcar (lambda (m) (list (cdr m))) gnus-article-mark-lists))
- reads marks mr m op)
+ reads mr m op)
(while map
(setq m (pop map))
(unless (nth 3 m)
(defun nnvirtual-update-marked ()
"Copy marks from the virtual group to the component groups."
(let ((mark-lists gnus-article-mark-lists)
- (uncompressed '(score bookmark))
- type list calist mart cgroups)
+ type list mart cgroups)
+ (when (and gnus-summary-buffer
+ (get-buffer gnus-summary-buffer)
+ (buffer-name (get-buffer gnus-summary-buffer)))
+ (set-buffer gnus-summary-buffer))
(while mark-lists
(setq type (cdar mark-lists))
(setq list (symbol-value (intern (format "gnus-newsgroup-%s"
(when active
(setq div (/ (float (car active))
(if (zerop (cdr active))
- 1 (cdr active))))
+ 1 (cdr active)) ))
(mapcar (lambda (n)
(list (* div (- n (car active)))
g n (and (memq n unreads) t)
(< (car m1) (car m2)))))
(i 0))
(setq nnvirtual-mapping map)
+ ;; Nix out any old marks.
+ (let ((marks gnus-article-mark-lists))
+ (set (intern (format "gnus-newsgroup-%s" (car (pop marks)))) nil))
+ ;; Copy in all marks from the component groups.
(while (setq m (pop map))
(setcar m (setq article (incf i)))
(when (setq marks (nth 4 m))
(car (rassq (pop marks)
gnus-article-mark-lists))))))
(cons article (symbol-value list))))))))
-
-
(provide 'nnvirtual)
+Sat Mar 9 00:32:23 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no>
+
+ * gnus.texi (Summary Buffer Lines): Change.
+
+Fri Mar 8 20:17:51 1996 Lars Magne Ingebrigtsen <lars@eyesore.no>
+
+ * gnus.texi (Summary Score Commands): Change.
+
Wed Mar 6 21:18:04 1996 Lars Magne Ingebrigtsen <lars@eyesore.no>
* gnus.texi (Topic Commands): Addition.
@item \]
Closing bracket, which is normally @samp{\]}, but can also be @samp{>}
for adopted articles.
-@item <
-One space for each thread level.
@item >
+One space for each thread level.
+@item <
Twenty minus thread level spaces.
@item U
Unread.
@item V e
@kindex V e (Summary)
-@findex gnus-score-edit-alist
-Edit the current score file (@code{gnus-score-edit-alist}). You will be
-popped into a @code{gnus-score-mode} buffer (@pxref{Score File
-Editing}).
+@findex gnus-score-edit-current-scores
+Edit the current score file (@code{gnus-score-edit-current-scores}).
+You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
+File Editing}).
@item V f
@kindex V f (Summary)
This means that if you have some score entries that you want to apply to
all groups, then you put those entries in the @file{all.SCORE} file.
-If @code{gnus-use-long-file-name} is non-@code{nil}, this won't work
-very will. It will find stuff like @file{gnu/all/SCORE}, but will not
-find files like @file{not/gnu/all/SCORE}.
-
@item gnus-score-find-hierarchical
@findex gnus-score-find-hierarchical
Apply all score files from all the parent groups. This means that you
@end table
+Type @kbd{M-x gnus-score-mode} to use this mode.
+
@vindex gnus-score-mode-hook
@code{gnus-score-menu-hook} is run in score mode buffers.
@vindex gnus-default-adaptive-score-alist
To give you complete control over the scoring process, you can customize
-the @code{gnus-default-adaptive-score-alist} variable. By default, it
-looks something like this:
+the @code{gnus-default-adaptive-score-alist} variable. For instance, it
+might look something like this:
@lisp
(defvar gnus-default-adaptive-score-alist
As you see, each element in this alist has a mark as a key (either a
variable name or a ``real'' mark---a character). Following this key is
a random number of header/score pairs. If there are no header/score
-pairs following the key, not adaptive scoring will be done on articles
+pairs following the key, no adaptive scoring will be done on articles
that have that key as the article mark. For instance, articles with
@code{gnus-unread-mark} in the example above will not get adaptive score
entries.
added to the @code{thread} rule. (Think about it. I'd recommend two
aspirins afterwards.)
-If you use this scheme, you should set @code{mark-below} to something
-small---like -300, perhaps, to avoid having small random changes result
-in articles getting marked as read.
+If you use this scheme, you should set the score file atom @code{mark}
+to something small---like -300, perhaps, to avoid having small random
+changes result in articles getting marked as read.
After using adaptive scoring for a week or so, Gnus should start to
become properly trained and enhance the authors you like best, and kill