[edit-group 1.0 point]))
(edit-server ([server 0.5]
[edit-server 1.0 point]))
+ (summary-edit-score ([summary 0.25]
+ [edit-score 1.0 point]))
(post ([post 1.0 point]))
(reply ([article 0.5]
[mail 1.0 point]))
(summary-carpal . gnus-carpal-summary-buffer)
(server-carpal . gnus-carpal-server-buffer)
(browse-carpal . gnus-carpal-browse-buffer)
+ (summary-edit-score . gnus-score-edit-buffer)
(mail . gnus-mail-buffer)
(post . gnus-post-news-buffer))
"Mapping from short symbols to buffer names or buffer variables.")
(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.86"
+(defconst gnus-version "(ding) Gnus v0.87"
"Version number for this version of Gnus.")
(defvar gnus-info-nodes
;; gnus-cache
(autoload 'gnus-cache-possibly-enter-article "gnus-cache")
(autoload 'gnus-cache-save-buffers "gnus-cache")
- (autoload 'gnus-cache-possibly-remove-article "gnus-cache")
+ (autoload 'gnus-cache-possibly-remove-articles "gnus-cache")
(autoload 'gnus-cache-request-article "gnus-cache")
(autoload 'gnus-cache-retrieve-headers "gnus-cache")
(autoload 'gnus-cache-possibly-alter-active "gnus-cache")
(autoload 'gnus-jog-cache "gnus-cache" nil t)
+ (autoload 'gnus-cache-enter-remove-article "gnus-cache")
;; gnus-score
(autoload 'gnus-summary-increase-score "gnus-score" nil t)
(or (eq 'score (car (car marked)))
(eq 'bookmark (car (car marked)))
(eq 'killed (car (car marked)))
+ (not (numberp (car (cdr (car marked)))))
(setcdr (car marked)
(gnus-compress-sequence (sort (cdr (car marked)) '<) t)))
(setq marked (cdr marked))))
(define-key gnus-summary-mode-map "l" 'gnus-summary-goto-last-article)
(define-key gnus-summary-mode-map "\C-c\C-v\C-v" 'gnus-uu-decode-uu-view)
(define-key gnus-summary-mode-map "\C-d" 'gnus-summary-enter-digest-group)
+ (define-key gnus-summary-mode-map "v" 'gnus-summary-verbose-headers)
+ (define-key gnus-summary-mode-map "\C-c\C-b" 'gnus-bug)
;; Sort of orthogonal keymap
(gnus-group-next-unread-group 1)))
(if temporary
nil ;Nothing to do.
+ (and gnus-use-cache (gnus-cache-possibly-remove-articles))
;; We set all buffer-local variables to nil. It is unclear why
;; this is needed, but if we don't, buffer-local variables are
;; not garbage-collected, it seems. This would the lead to en
gnus-expert-user
(gnus-y-or-n-p "Do you really wanna quit reading this group? "))
(progn
+ (and gnus-use-cache (gnus-cache-possibly-remove-articles))
(gnus-close-group group)
(gnus-summary-clear-local-variables)
(set-buffer gnus-group-buffer)
(let ((ingroup gnus-newsgroup-name)
(sumbuf (current-buffer))
num)
- (gnus-summary-exit t) ;Update all information.
+ (set-buffer gnus-group-buffer)
(if (and group
(or (and (numberp (setq num (car (gnus-gethash
group gnus-newsrc-hashtb))))
(gnus-summary-search-group backward)
(let ((group (or group (gnus-summary-search-group backward)))
(buf gnus-summary-buffer))
+ (gnus-summary-exit t) ;Update all information.
(if (null group)
(gnus-summary-exit-no-update t)
(gnus-message 5 "Selecting %s..." group)
Returns nil if there are no unread articles."
(interactive "P")
(prog1
- (if (or (not unread)
- (gnus-goto-char
- (text-property-any
- (point-min) (point-max) 'gnus-mark gnus-unread-mark)))
- t
- ;; If there are no unread articles.
- (gnus-message 3 "No more unread articles")
- nil)
+ (cond ((not unread)
+ (goto-char (point-min)))
+ ((gnus-goto-char
+ (text-property-any
+ (point-min) (point-max) 'gnus-mark gnus-unread-mark))
+ t)
+ (t
+ ;; There are no unread articles.
+ (gnus-message 3 "No more unread articles")
+ nil))
(gnus-summary-position-cursor)))
(defun gnus-summary-next-subject (n &optional unread dont-display)
(if (and ref (not (equal ref ""))
(string-match "<[^<>]*>[ \t]*$" ref))
(gnus-summary-refer-article
- (substring ref (match-beginning 0) (match-end 0))))))
+ (substring ref (match-beginning 0) (match-end 0)))
+ (gnus-message 1 "No references in article %d"
+ (gnus-summary-article-number))
+ nil)))
(setq n (1- n)))
- (or (zerop n)
- (gnus-message 1 "No references in article or expired article."))
(gnus-summary-position-cursor)
n)
(header-number header)))
(let ((gnus-override-method gnus-refer-article-method)
(gnus-ancient-mark gnus-read-mark)
+ (tmp-buf (get-buffer-create " *gnus refer"))
+ (tmp-point (window-start
+ (get-buffer-window gnus-article-buffer)))
number)
(and gnus-refer-article-method
(or (gnus-server-opened gnus-refer-article-method)
(gnus-open-server gnus-refer-article-method)))
- (if (gnus-article-prepare
- message-id nil (gnus-read-header message-id))
- (progn
- (setq number (header-number gnus-current-headers))
- (gnus-rebuild-thread message-id)
- (gnus-summary-goto-subject number)
- (gnus-summary-recenter)
- (gnus-article-set-window-start
- (cdr (assq number gnus-newsgroup-bookmarks)))
- message-id)
- (gnus-message 1 "No such references")
- nil))))))
+ ;; Save the old article buffer.
+ (save-excursion
+ (set-buffer tmp-buf)
+ (buffer-disable-undo (current-buffer))
+ (insert-buffer-substring gnus-article-buffer))
+ (prog1
+ (if (gnus-article-prepare
+ message-id nil (gnus-read-header message-id))
+ (progn
+ (setq number (header-number gnus-current-headers))
+ (gnus-rebuild-thread message-id)
+ (gnus-summary-goto-subject number)
+ (gnus-summary-recenter)
+ (gnus-article-set-window-start
+ (cdr (assq number gnus-newsgroup-bookmarks)))
+ message-id)
+ ;; We restore the old article buffer.
+ (save-excursion
+ (set-buffer gnus-article-buffer)
+ (let ((buffer-read-only nil))
+ (insert-buffer-substring tmp-buf)
+ (and tmp-point
+ (set-window-start (get-buffer-window (current-buffer))
+ tmp-point))))
+ nil)
+ (kill-buffer tmp-buf)))))))
(defun gnus-summary-enter-digest-group ()
"Enter a digest group based on the current article."
(gnus-eval-in-buffer-window
gnus-article-buffer (isearch-forward)))
-(defun gnus-summary-search-article-forward (regexp)
+(defun gnus-summary-search-article-forward (regexp &optional backward)
"Search for an article containing REGEXP forward.
-gnus-select-article-hook is not called during the search."
+If BACKWARD, search backward instead."
(interactive
(list (read-string
- (concat "Search forward (regexp): "
+ (format "Search article %s (regexp%s): "
+ (if current-prefix-arg "backward" "forward")
(if gnus-last-search-regexp
- (concat "(default " gnus-last-search-regexp ") "))))))
+ (concat ", default " gnus-last-search-regexp)
+ "")))
+ current-prefix-arg))
(gnus-set-global-variables)
(if (string-equal regexp "")
(setq regexp (or gnus-last-search-regexp ""))
(setq gnus-last-search-regexp regexp))
- (if (gnus-summary-search-article regexp nil)
- (gnus-eval-in-buffer-window
- gnus-article-buffer
- (recenter 0))
+ (if (gnus-summary-search-article regexp backward)
+ (gnus-article-set-window-start
+ (cdr (assq (gnus-summary-article-number) gnus-newsgroup-bookmarks)))
(error "Search failed: \"%s\"" regexp)))
(defun gnus-summary-search-article-backward (regexp)
- "Search for an article containing REGEXP backward.
-gnus-select-article-hook is not called during the search."
+ "Search for an article containing REGEXP backward."
(interactive
(list (read-string
- (concat "Search backward (regexp): "
+ (format "Search article backward (regexp%s): "
(if gnus-last-search-regexp
- (concat "(default " gnus-last-search-regexp ") "))))))
- (gnus-set-global-variables)
- (if (string-equal regexp "")
- (setq regexp (or gnus-last-search-regexp ""))
- (setq gnus-last-search-regexp regexp))
- (if (gnus-summary-search-article regexp t)
- (gnus-eval-in-buffer-window
- gnus-article-buffer
- (recenter 0))
- (error "Search failed: \"%s\"" regexp)))
+ (concat ", default " gnus-last-search-regexp)
+ "")))))
+ (gnus-summary-search-article-forward regexp 'backward))
(defun gnus-summary-search-article (regexp &optional backward)
"Search for an article containing REGEXP.
(gnus-set-global-variables)
(gnus-summary-select-article gnus-have-all-headers t))
+(defun gnus-summary-verbose-header (arg)
+ "Toggle permanent full header display.
+If ARG is a positive number, turn header display on.
+If ARG is a negative number, turn header display off."
+ (interactive "P")
+ (gnus-set-global-variables)
+ (gnus-summary-toggle-header arg)
+ (setq gnus-have-all-headers
+ (cond ((or (not (numberp arg))
+ (zerop arg))
+ (not gnus-have-all-headers))
+ ((natnump arg)
+ t))))
+
(defun gnus-summary-toggle-header (arg)
"Show the headers if they are hidden, or hide them if they are shown.
If ARG is a positive number, show the entire header.
(and (not no-expire)
gnus-newsgroup-auto-expire
(or (not mark)
- (and (numberp mark) (or (= mark gnus-killed-mark)
- (= mark gnus-del-mark)
- (= mark gnus-catchup-mark)
- (= mark gnus-low-score-mark)
- (= mark gnus-read-mark))))
+ (and (numberp mark)
+ (or (= mark gnus-killed-mark) (= mark gnus-del-mark)
+ (= mark gnus-catchup-mark) (= mark gnus-low-score-mark)
+ (= mark gnus-read-mark) (= mark gnus-ancient-mark))))
(setq mark gnus-expirable-mark))
(let* ((mark (or (and (stringp mark) (aref mark 0)) mark gnus-del-mark))
(article (or article (gnus-summary-article-number))))
+ (or article (error "No article on current line"))
(if (or (= mark gnus-unread-mark)
(= mark gnus-ticked-mark)
(= mark gnus-dormant-mark))
(setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked))
(setq gnus-newsgroup-dormant (delq article gnus-newsgroup-dormant))
;; Possibly remove from cache, if that is used.
- (and gnus-use-cache
- (gnus-cache-possibly-remove-article
- gnus-newsgroup-name article
- (memq article gnus-newsgroup-marked)
- (memq article gnus-newsgroup-dormant)
- (or (memq article gnus-newsgroup-unreads)
- (memq article gnus-newsgroup-unselected))))))
+ (and gnus-use-cache (gnus-cache-enter-remove-article article))))
(defun gnus-mark-article-as-unread (article &optional mark)
"Enter ARTICLE in the pertinent lists and remove it from others."
(define-key gnus-article-mode-map gnus-mouse-2 'gnus-article-push-button)
(define-key gnus-article-mode-map "\r" 'gnus-article-press-button)
(define-key gnus-article-mode-map "\t" 'gnus-article-next-button)
+ (define-key gnus-article-mode-map "\C-c\C-b" 'gnus-bug)
;; Duplicate almost all summary keystrokes in the article mode map.
(let ((commands
(gnus-request-article-this-buffer
article group))))
;; There is no such article.
- (progn
- (save-excursion
+ (save-excursion
+ (if (not (numberp article))
+ ()
+ (setq gnus-article-current
+ (cons gnus-newsgroup-name article))
(set-buffer gnus-summary-buffer)
- (setq gnus-current-article 0)
- (and (numberp article)
- (gnus-summary-mark-as-read article gnus-canceled-mark))
- (gnus-message 1 "No such article (may be canceled)")
- (and (numberp article)
- (setq gnus-current-article article))
- (ding))
- (and (numberp article)
- (setq gnus-article-current
- (cons gnus-newsgroup-name article)))
+ (setq gnus-current-article article)
+ (gnus-summary-mark-as-read article gnus-canceled-mark))
+ (gnus-message 1 "No such article (may be canceled)")
+ (ding)
nil)
(if (or (eq result 'pseudo) (eq result 'nneething))
(progn
(defun gnus-article-hide-headers-if-wanted ()
"Hide unwanted headers if `gnus-have-all-headers' is nil.
Provided for backwards compatability."
- (or gnus-have-all-headers
+ (or (save-excursion (set-buffer gnus-summary-buffer) gnus-have-all-headers)
(gnus-article-hide-headers)))
(defun gnus-article-hide-headers (&optional delete)
(goto-char (point-min))
(search-forward "\n\n" nil t)
(end-of-line 1)
- (let ((paragraph-start "^\\W"))
+ (let ((paragraph-start "^\\W")
+ (adaptive-fill-regexp "[ \t]*\\([|#:<;>*]+ *\\)?")
+ (adaptive-fill-mode t))
(while (not (eobp))
(and (>= (current-column) (min fill-column (window-width)))
(/= (preceding-char) ?:)
;; hash table. The partial filling out of the hash table will be
;; done in `gnus-get-unread-articles'.
(if (and gnus-read-active-file
- (not level)
- (gnus-server-opened gnus-select-method))
+ (not level))
(gnus-read-active-file)
(setq gnus-active-hashtb (make-vector 4095 0)))
(let* ((newsrc (cdr gnus-newsrc-alist))
(conditional level)
(level (or level (1+ gnus-level-subscribed)))
+ (foreign-level
+ (min
+ (cond ((and gnus-activate-foreign-newsgroups
+ (not (numberp gnus-activate-foreign-newsgroups)))
+ (1+ gnus-level-subscribed))
+ ((numberp gnus-activate-foreign-newsgroups)
+ gnus-activate-foreign-newsgroups)
+ (t 0))
+ level))
info group active virtuals method)
(gnus-message 5 "Checking new news...")
+
(while newsrc
- (setq info (car newsrc))
- (setq group (car info))
- (setq active (gnus-gethash group gnus-active-hashtb))
+ (setq info (car newsrc)
+ group (car info)
+ active (gnus-gethash group gnus-active-hashtb))
;; Check newsgroups. If the user doesn't want to check them, or
;; they can't be checked (for instance, if the news server can't
(not (gnus-server-equal gnus-select-method
(gnus-server-get-method nil method)))
(not (gnus-secondary-method-p method)))
- ;; These groups are foreign.
- (if (or (and gnus-activate-foreign-newsgroups
- (not (numberp gnus-activate-foreign-newsgroups)))
- (and (numberp gnus-activate-foreign-newsgroups)
- (<= (nth 1 info) gnus-activate-foreign-newsgroups)
- (<= (nth 1 info) level)))
+ ;; These groups are foreign. Check the level.
+ (if (<= (nth 1 info) foreign-level)
(if (eq (car (if (stringp method)
(gnus-server-to-method method)
(nth 4 info))) 'nnvirtual)
+ ;; We have to activate the virtual groups after all
+ ;; the others, so we just pop them on a list for
+ ;; now.
(setq virtuals (cons info virtuals))
- (setq active (gnus-activate-newsgroup (car info)))))
+ (and (setq active (gnus-activate-newsgroup (car info)))
+ ;; Close the groups as we look at them!
+ (gnus-close-group group))))
+
;; These groups are native or secondary.
- (if (and (not gnus-read-active-file)
+ (if (and (not gnus-have-read-active-file)
(<= (nth 1 info) level))
- (progn
- (setq active (gnus-activate-newsgroup (car info))))))
+ (setq active (gnus-activate-newsgroup (car info)))))
- (or active (progn (gnus-sethash group nil gnus-active-hashtb)
- (setcar (gnus-gethash group gnus-newsrc-hashtb) t)))
- (and active
- (gnus-get-unread-articles-in-group info active)
- ;; Close the groups as we look at them!
- (gnus-close-group group))
+ (if active
+ (gnus-get-unread-articles-in-group info active)
+ ;; The group couldn't be reached, so we nix out the number of
+ ;; unread articles and stuff.
+ (gnus-sethash group nil gnus-active-hashtb)
+ (setcar (gnus-gethash group gnus-newsrc-hashtb) t))
+
(setq newsrc (cdr newsrc)))
;; Activate the virtual groups. This has to be done after all the
;; Get the active file(s) from the backend(s).
(defun gnus-read-active-file ()
(gnus-group-set-mode-line)
- (let ((methods (cons gnus-select-method gnus-secondary-select-methods))
- (not-first nil)
+ (let ((methods (if (gnus-server-opened gnus-select-method)
+ ;; The native server is available.
+ (cons gnus-select-method gnus-secondary-select-methods)
+ ;; The native server is down, so we just do the
+ ;; secondary ones.
+ gnus-secondary-select-methods))
list-type)
(setq gnus-have-read-active-file nil)
(save-excursion
(ding)
(sit-for 2))
((eq list-type 'active)
- (gnus-active-to-gnus-format (and not-first (car methods)))
- (setq not-first t))
+ (gnus-active-to-gnus-format (car methods)))
(t
- (gnus-groups-to-gnus-format (and not-first (car methods)))
- (setq not-first t)))))
+ (gnus-groups-to-gnus-format (car methods))))))
(t
(if (not (gnus-request-list (car methods)))
(progn
(gnus-message 1 "Cannot read active file from %s server."
(car (car methods)))
(ding))
- (gnus-active-to-gnus-format (and not-first (car methods)))
- (setq gnus-have-read-active-file t
- not-first t)
+ (gnus-active-to-gnus-format (car methods))
+ (setq gnus-have-read-active-file t)
(gnus-message 5 "%sdone" mesg)))))
(setq methods (cdr methods))))))
(defun gnus-active-to-gnus-format (method &optional hashtb ignore-errors)
(let ((cur (current-buffer))
(hashtb (or hashtb
- (if method
+ (if (and gnus-active-hashtb
+ (not (equal method gnus-select-method)))
gnus-active-hashtb
(setq gnus-active-hashtb
- (gnus-make-hashtable
- (count-lines (point-min) (point-max))))))))
+ (if (equal method gnus-select-method)
+ (gnus-make-hashtable
+ (count-lines (point-min) (point-max)))
+ (gnus-make-hashtable 4096)))))))
;; Delete unnecessary lines.
(goto-char (point-min))
(while (search-forward "\nto." nil t)
(error nil))
(and gnus-newsrc-assoc (setq gnus-newsrc-alist gnus-newsrc-assoc)))
(let ((inhibit-quit t))
- (gnus-uncompress-newsrc-assoc))
+ (gnus-uncompress-newsrc-alist))
(gnus-make-hashtable-from-newsrc-alist)
(if (not (file-newer-than-file-p file ding-file))
()
(if (file-exists-p real-file)
real-file file)))
-(defun gnus-uncompress-newsrc-assoc ()
+(defun gnus-uncompress-newsrc-alist ()
;; Uncompress all lists of marked articles in the newsrc assoc.
(let ((newsrc gnus-newsrc-alist)
marked)
(setq marked (cdr marked))))
(setq newsrc (cdr newsrc)))))
-(defun gnus-compress-newsrc-assoc ()
+(defun gnus-compress-newsrc-alist ()
;; Compress all lists of marked articles in the newsrc assoc.
(let ((newsrc gnus-newsrc-alist)
marked)
(gnus-newsrc-alist (cdr gnus-newsrc-alist))
variable)
;; insert lisp expressions.
- (gnus-compress-newsrc-assoc)
+ (gnus-compress-newsrc-alist)
(while variables
(setq variable (car variables))
(and (boundp variable)
(prin1-to-string (symbol-value variable))
")\n"))
(setq variables (cdr variables)))
- (gnus-uncompress-newsrc-assoc)))
+ (gnus-uncompress-newsrc-alist)))
(defun gnus-gnus-to-newsrc-format ()