*** pub/sgnus/lisp/gnus-salt.el Wed May 8 00:39:11 1996 --- sgnus/lisp/gnus-salt.el Thu May 9 00:47:46 1996 *************** *** 214,222 **** (defvar gnus-tree-mode-hook nil "*Hook run in tree mode buffers.") - (defvar gnus-tree-buffer "*Tree*" - "Buffer where Gnus thread trees are displayed.") - ;;; Internal variables. (defvar gnus-tree-line-format-alist --- 214,219 ---- *** pub/sgnus/lisp/gnus-topic.el Wed May 8 00:39:13 1996 --- sgnus/lisp/gnus-topic.el Fri May 10 22:44:51 1996 *************** *** 499,515 **** parent (- old-unread (gnus-group-topic-unread)))) unread)) ! (defun gnus-topic-grok-active (&optional force read-active) "Parse all active groups and create topic structures for them." ;; First we make sure that we have really read the active file. (when (or force (not gnus-topic-active-alist)) - (when (and read-active - (or force - (not (member gnus-select-method - gnus-have-read-active-file)))) - (let ((gnus-read-active-file t)) - (gnus-read-active-file))) (let (groups) ;; Get a list of all groups available. (mapatoms (lambda (g) (when (symbol-value g) --- 499,509 ---- parent (- old-unread (gnus-group-topic-unread)))) unread)) ! (defun gnus-topic-grok-active (&optional force) "Parse all active groups and create topic structures for them." ;; First we make sure that we have really read the active file. (when (or force (not gnus-topic-active-alist)) (let (groups) ;; Get a list of all groups available. (mapatoms (lambda (g) (when (symbol-value g) *************** *** 702,709 **** (interactive (list (read-string "Create topic: ") ! (completing-read "Parent topic: " gnus-topic-alist nil t ! (cons (gnus-group-parent-topic) 0)))) ;; Check whether this topic already exists. (when (gnus-topic-find-topology topic) (error "Topic aleady exists")) --- 696,702 ---- (interactive (list (read-string "Create topic: ") ! (gnus-group-parent-topic))) ;; Check whether this topic already exists. (when (gnus-topic-find-topology topic) (error "Topic aleady exists")) *************** *** 723,729 **** (unless (assoc topic gnus-topic-alist) (push (list topic) gnus-topic-alist))) (gnus-topic-enter-dribble) ! (gnus-group-list-groups)) (defun gnus-topic-move-group (n topic &optional copyp) "Move the current group to a topic." --- 716,723 ---- (unless (assoc topic gnus-topic-alist) (push (list topic) gnus-topic-alist))) (gnus-topic-enter-dribble) ! (gnus-group-list-groups) ! (gnus-topic-goto-topic topic)) (defun gnus-topic-move-group (n topic &optional copyp) "Move the current group to a topic." *************** *** 971,981 **** (defun gnus-topic-rename (old-name new-name) "Rename a topic." (interactive ! (let (topic) ! (list ! (setq topic (completing-read "Rename topic: " gnus-topic-alist nil t ! (cons (gnus-group-parent-topic) 0))) ! (read-string (format "Rename %s to: " topic))))) (let ((top (gnus-topic-find-topology old-name)) (entry (assoc old-name gnus-topic-alist))) (when top --- 965,973 ---- (defun gnus-topic-rename (old-name new-name) "Rename a topic." (interactive ! (let ((topic (gnus-group-parent-topic))) ! (list topic ! (read-string (format "Rename %s to: " topic))))) (let ((top (gnus-topic-find-topology old-name)) (entry (assoc old-name gnus-topic-alist))) (when top *************** *** 1022,1028 **** "List all groups that Gnus knows about in a topicsified fashion. If FORCE, always re-read the active file." (interactive "P") ! (gnus-topic-grok-active force force) (let ((gnus-topic-topology gnus-topic-active-topology) (gnus-topic-alist gnus-topic-active-alist) gnus-killed-list gnus-zombie-list) --- 1014,1022 ---- "List all groups that Gnus knows about in a topicsified fashion. If FORCE, always re-read the active file." (interactive "P") ! (when force ! (gnus-get-killed-groups)) ! (gnus-topic-grok-active force) (let ((gnus-topic-topology gnus-topic-active-topology) (gnus-topic-alist gnus-topic-active-alist) gnus-killed-list gnus-zombie-list) *** pub/sgnus/lisp/gnus-uu.el Wed May 8 00:39:14 1996 --- sgnus/lisp/gnus-uu.el Fri May 10 22:44:53 1996 *************** *** 586,592 **** (setq gnus-newsgroup-processable nil) (save-excursion (while marked ! (and (setq headers (gnus-summary-article-header (car marked))) (setq subject (mail-header-subject headers) articles (gnus-uu-find-articles-matching (gnus-uu-reginize-string subject)) --- 586,593 ---- (setq gnus-newsgroup-processable nil) (save-excursion (while marked ! (and (vectorp (setq headers ! (gnus-summary-article-header (car marked)))) (setq subject (mail-header-subject headers) articles (gnus-uu-find-articles-matching (gnus-uu-reginize-string subject)) *************** *** 608,615 **** (let ((data gnus-newsgroup-data) number) (while data ! (unless (memq (setq number (gnus-data-number (car data))) ! gnus-newsgroup-processable) (gnus-summary-goto-subject number) (gnus-uu-mark-series)) (setq data (cdr data))))) --- 609,617 ---- (let ((data gnus-newsgroup-data) number) (while data ! (when (and (not (memq (setq number (gnus-data-number (car data))) ! gnus-newsgroup-processable)) ! (vectorp (gnus-data-header (car data)))) (gnus-summary-goto-subject number) (gnus-uu-mark-series)) (setq data (cdr data))))) *************** *** 1611,1619 **** (defun gnus-uu-delete-work-dir (&optional dir) "Delete recursively all files and directories under `gnus-uu-work-dir'." ! (unless dir (setq dir gnus-uu-work-dir)) - (gnus-message 7 "Deleting directory %s..." dir) (when (and dir (file-exists-p dir)) (let ((files (directory-files dir t nil t)) --- 1613,1621 ---- (defun gnus-uu-delete-work-dir (&optional dir) "Delete recursively all files and directories under `gnus-uu-work-dir'." ! (if dir ! (gnus-message 7 "Deleting directory %s..." dir) (setq dir gnus-uu-work-dir)) (when (and dir (file-exists-p dir)) (let ((files (directory-files dir t nil t)) *** pub/sgnus/lisp/gnus-xmas.el Wed May 8 00:39:15 1996 --- sgnus/lisp/gnus-xmas.el Sun May 12 02:04:13 1996 *************** *** 111,139 **** gnus-summary-selected-face)))) (defun gnus-xmas-summary-recenter () ! "Center point in the summary window. If `gnus-auto-center-summary' is nil, or the article buffer isn't displayed, no centering will be performed." ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle). ;; Recenter only when requested. Suggested by popovich@park.cs.columbia.edu. ! (let* ((top (cond ((< (window-height) 4) 0) ! ((< (window-height) 7) 1) ! (t 2))) ! (height (- (window-height) 3)) ! (bottom (save-excursion (goto-char (point-max)) ! (forward-line (- height)) ! (point))) ! (window (get-buffer-window (current-buffer)))) ! ;; The user has to want it. ! (when gnus-auto-center-summary (when (get-buffer-window gnus-article-buffer) ! ;; Only do recentering when the article buffer is displayed, ! ;; Set the window start to either `bottom', which is the biggest ! ;; possible valid number, or the second line from the top, ! ;; whichever is the least. ! (set-window-start ! window (min bottom (save-excursion ! (forward-line (- top)) (point))))) ;; Do horizontal recentering while we're at it. (when (and (get-buffer-window (current-buffer) t) (not (eq gnus-auto-center-summary 'vertical))) --- 111,140 ---- gnus-summary-selected-face)))) (defun gnus-xmas-summary-recenter () ! "\"Center\" point in the summary window. If `gnus-auto-center-summary' is nil, or the article buffer isn't displayed, no centering will be performed." ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle). ;; Recenter only when requested. Suggested by popovich@park.cs.columbia.edu. ! (when gnus-auto-center-summary ! (let* ((height (if (fboundp 'window-displayed-height) ! (window-displayed-height) ! (- (window-height) 2))) ! (top (cond ((< height 4) 0) ! ((< height 7) 1) ! (t 2))) ! (bottom (save-excursion (goto-char (point-max)) ! (forward-line (- height)) ! (point))) ! (window (get-buffer-window (current-buffer)))) (when (get-buffer-window gnus-article-buffer) ! ;; Only do recentering when the article buffer is displayed, ! ;; Set the window start to either `bottom', which is the biggest ! ;; possible valid number, or the second line from the top, ! ;; whichever is the least. ! (set-window-start ! window (min bottom (save-excursion ! (forward-line (- top)) (point))))) ;; Do horizontal recentering while we're at it. (when (and (get-buffer-window (current-buffer) t) (not (eq gnus-auto-center-summary 'vertical))) *** pub/sgnus/lisp/gnus.el Wed May 8 00:39:17 1996 --- sgnus/lisp/gnus.el Fri May 10 22:45:10 1996 *************** *** 1533,1538 **** --- 1533,1541 ---- ;; Internal variables + (defvar gnus-tree-buffer "*Tree*" + "Buffer where Gnus thread trees are displayed.") + ;; Dummy variable. (defvar gnus-use-generic-from nil) *************** *** 1715,1721 **** "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") ! (defconst gnus-version "September Gnus v0.83" "Version number for this version of Gnus.") (defvar gnus-info-nodes --- 1718,1724 ---- "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") ! (defconst gnus-version "September Gnus v0.84" "Version number for this version of Gnus.") (defvar gnus-info-nodes *************** *** 2577,2583 **** (defun gnus-update-group-mark-positions () (save-excursion (let ((gnus-process-mark 128) ! (gnus-group-marked '("dummy.group"))) (gnus-set-active "dummy.group" '(0 . 0)) (gnus-set-work-buffer) (gnus-group-insert-group-line "dummy.group" 0 nil 0 nil) --- 2580,2587 ---- (defun gnus-update-group-mark-positions () (save-excursion (let ((gnus-process-mark 128) ! (gnus-group-marked '("dummy.group")) ! (gnus-active-hashtb (make-vector 10 0))) (gnus-set-active "dummy.group" '(0 . 0)) (gnus-set-work-buffer) (gnus-group-insert-group-line "dummy.group" 0 nil 0 nil) *************** *** 3123,3128 **** --- 3127,3136 ---- (not (or (string< s1 s2) (string= s1 s2)))) + (defun gnus-read-active-file-p () + "Say whether the active file has been read from `gnus-select-method'." + (memq gnus-select-method gnus-have-read-active-file)) + ;;; General various misc type functions. (defun gnus-clear-system () *************** *** 4232,4240 **** (defun gnus-group-default-level (&optional level number-or-nil) (cond (gnus-group-use-permanent-levels ! ; (setq gnus-group-default-list-level ! ; (or level gnus-group-default-list-level)) ! (or level gnus-group-default-list-level gnus-level-subscribed)) (number-or-nil level) (t --- 4240,4251 ---- (defun gnus-group-default-level (&optional level number-or-nil) (cond (gnus-group-use-permanent-levels ! (or (setq gnus-group-use-permanent-levels ! (or level (if (numberp gnus-group-use-permanent-levels) ! gnus-group-use-permanent-levels ! (or gnus-group-default-list-level ! gnus-level-subscribed)))) ! gnus-group-default-list-level gnus-level-subscribed)) (number-or-nil level) (t *************** *** 4255,4264 **** prompt the user for the name of an NNTP server to use. As opposed to `gnus', this command will not connect to the local server." (interactive "P") - (let ((gnus-group-use-permanent-levels t)) - (gnus (or arg (1- gnus-level-default-subscribed)) t slave)) (make-local-variable 'gnus-group-use-permanent-levels) ! (setq gnus-group-use-permanent-levels t)) ;;;###autoload (defun gnus-slave (&optional arg) --- 4266,4275 ---- prompt the user for the name of an NNTP server to use. As opposed to `gnus', this command will not connect to the local server." (interactive "P") (make-local-variable 'gnus-group-use-permanent-levels) ! (setq gnus-group-use-permanent-levels ! (or arg (1- gnus-level-default-subscribed))) ! (gnus gnus-group-use-permanent-levels t slave)) ;;;###autoload (defun gnus-slave (&optional arg) *************** *** 5077,5100 **** (interactive "p") (let ((buffer-read-only nil) group) ! (while ! (and (> n 0) ! (setq group (gnus-group-group-name)) ! (progn ! (beginning-of-line) ! (forward-char ! (or (cdr (assq 'process gnus-group-mark-positions)) 2)) ! (delete-char 1) ! (if unmark ! (progn ! (insert " ") ! (setq gnus-group-marked (delete group gnus-group-marked))) ! (insert "#") ! (setq gnus-group-marked ! (cons group (delete group gnus-group-marked)))) ! t) ! (or no-advance (zerop (gnus-group-next-group 1)))) ! (setq n (1- n))) (gnus-summary-position-point) n)) --- 5088,5110 ---- (interactive "p") (let ((buffer-read-only nil) group) ! (while (and (> n 0) ! (not (eobp))) ! (when (setq group (gnus-group-group-name)) ! ;; Update the mark. ! (beginning-of-line) ! (forward-char ! (or (cdr (assq 'process gnus-group-mark-positions)) 2)) ! (delete-char 1) ! (if unmark ! (progn ! (insert " ") ! (setq gnus-group-marked (delete group gnus-group-marked))) ! (insert "#") ! (setq gnus-group-marked ! (cons group (delete group gnus-group-marked)))) ! (or no-advance (zerop (gnus-group-next-group 1)))) ! (decf n)) (gnus-summary-position-point) n)) *************** *** 5303,5309 **** (interactive (list (completing-read "Group: " gnus-active-hashtb nil ! (memq gnus-select-method gnus-have-read-active-file) nil 'gnus-group-history))) --- 5313,5319 ---- (interactive (list (completing-read "Group: " gnus-active-hashtb nil ! (gnus-read-active-file-p) nil 'gnus-group-history))) *************** *** 6112,6118 **** (interactive (list (completing-read "Group: " gnus-active-hashtb nil ! (memq gnus-select-method gnus-have-read-active-file) nil 'gnus-group-history))) (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) --- 6122,6128 ---- (interactive (list (completing-read "Group: " gnus-active-hashtb nil ! (gnus-read-active-file-p) nil 'gnus-group-history))) (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) *************** *** 6129,6135 **** (unless silent (gnus-group-update-group group))) ((and (stringp group) ! (or (not (memq gnus-select-method gnus-have-read-active-file)) (gnus-active group))) ;; Add new newsgroup. (gnus-group-change-level --- 6139,6145 ---- (unless silent (gnus-group-update-group group))) ((and (stringp group) ! (or (not (gnus-read-active-file-p)) (gnus-active group))) ;; Add new newsgroup. (gnus-group-change-level *************** *** 6298,6325 **** (interactive "P") ;; Find all possible killed newsgroups if arg. (when arg ! ;; First make sure active file has been read. ! (unless gnus-have-read-active-file ! (let ((gnus-read-active-file t)) ! (gnus-read-active-file))) ! (or gnus-killed-hashtb (gnus-make-hashtable-from-killed)) ! ;; Go through all newsgroups that are known to Gnus - enlarge kill list ! (mapatoms ! (lambda (sym) ! (let ((groups 0) ! (group (symbol-name sym))) ! (if (or (null group) ! (gnus-gethash group gnus-killed-hashtb) ! (gnus-gethash group gnus-newsrc-hashtb)) ! () ! (let ((do-sub (gnus-matches-options-n group))) ! (if (or (eq do-sub 'subscribe) (eq do-sub 'ignore)) ! () ! (setq groups (1+ groups)) ! (setq gnus-killed-list ! (cons group gnus-killed-list)) ! (gnus-sethash group group gnus-killed-hashtb)))))) ! gnus-active-hashtb)) (if (not gnus-killed-list) (gnus-message 6 "No killed groups") (let (gnus-group-list-mode) --- 6308,6314 ---- (interactive "P") ;; Find all possible killed newsgroups if arg. (when arg ! (gnus-get-killed-groups)) (if (not gnus-killed-list) (gnus-message 6 "No killed groups") (let (gnus-group-list-mode) *************** *** 6343,6349 **** "List all groups that are available from the server(s)." (interactive) ;; First we make sure that we have really read the active file. ! (unless gnus-have-read-active-file (let ((gnus-read-active-file t)) (gnus-read-active-file))) ;; Find all groups and sort them. --- 6332,6338 ---- "List all groups that are available from the server(s)." (interactive) ;; First we make sure that we have really read the active file. ! (unless (gnus-read-active-file-p) (let ((gnus-read-active-file t)) (gnus-read-active-file))) ;; Find all groups and sort them. *************** *** 6542,6549 **** If the prefix LEVEL is non-nil, it should be a number that says which level to cut off listing groups. If ALL, also list groups with no unread articles. ! If LOWEST, don't list groups with level lower than LOWEST." (interactive "P\nsList newsgroups matching: ") (gnus-group-prepare-flat (or level gnus-level-subscribed) all (or lowest 1) regexp) (goto-char (point-min)) --- 6531,6544 ---- If the prefix LEVEL is non-nil, it should be a number that says which level to cut off listing groups. If ALL, also list groups with no unread articles. ! If LOWEST, don't list groups with level lower than LOWEST. ! ! This command may read the active file." (interactive "P\nsList newsgroups matching: ") + ;; First make sure active file has been read. + (when (and level + (>= (prefix-numeric-value level) gnus-level-killed)) + (gnus-get-killed-groups)) (gnus-group-prepare-flat (or level gnus-level-subscribed) all (or lowest 1) regexp) (goto-char (point-min)) *************** *** 10126,10140 **** (funcall gnus-summary-display-article-function article all-header) (gnus-article-prepare article all-header)) (run-hooks 'gnus-select-article-hook) ! (gnus-summary-recenter) gnus-current-article ! (gnus-summary-goto-subject gnus-current-article) (when gnus-use-trees (gnus-possibly-generate-tree article) (gnus-highlight-selected-tree article)) ;; Successfully display article. (gnus-article-set-window-start ! (cdr (assq article gnus-newsgroup-bookmarks))) ! t))) (defun gnus-summary-select-article (&optional all-headers force pseudo article) "Select the current article. --- 10121,10135 ---- (funcall gnus-summary-display-article-function article all-header) (gnus-article-prepare article all-header)) (run-hooks 'gnus-select-article-hook) ! (unless (zerop gnus-current-article) ! (gnus-summary-goto-subject gnus-current-article)) ! (gnus-summary-recenter) (when gnus-use-trees (gnus-possibly-generate-tree article) (gnus-highlight-selected-tree article)) ;; Successfully display article. (gnus-article-set-window-start ! (cdr (assq article gnus-newsgroup-bookmarks)))))) (defun gnus-summary-select-article (&optional all-headers force pseudo article) "Select the current article. *************** *** 10142,10147 **** --- 10137,10145 ---- non-nil, the article will be re-fetched even if it already present in the article buffer. If PSEUDO is non-nil, pseudo-articles will also be displayed." + ;; Make sure we are in the summary buffer to work around bbdb bug. + (unless (eq major-mode 'gnus-summary-mode) + (set-buffer gnus-summary-buffer)) (let ((article (or article (gnus-summary-article-number))) (all-headers (not (not all-headers))) ;Must be T or NIL. gnus-summary-display-article-function *************** *** 10317,10341 **** (let ((article (gnus-summary-article-number)) (endp nil)) (gnus-configure-windows 'article) ! (if (or (null gnus-current-article) ! (null gnus-article-current) ! (/= article (cdr gnus-article-current)) ! (not (equal (car gnus-article-current) gnus-newsgroup-name))) ! ;; Selected subject is different from current article's. ! (gnus-summary-display-article article) ! (gnus-eval-in-buffer-window ! gnus-article-buffer ! (setq endp (gnus-article-next-page lines))) ! (if endp ! (cond (circular ! (gnus-summary-beginning-of-article)) ! (lines ! (gnus-message 3 "End of message")) ! ((null lines) ! (if (and (eq gnus-summary-goto-unread 'never) ! (not (gnus-summary-last-article-p article))) ! (gnus-summary-next-article) ! (gnus-summary-next-unread-article)))))) (gnus-summary-recenter) (gnus-summary-position-point))) --- 10315,10344 ---- (let ((article (gnus-summary-article-number)) (endp nil)) (gnus-configure-windows 'article) ! (if (eq (cdr (assq article gnus-newsgroup-reads)) gnus-canceled-mark) ! (if (and (eq gnus-summary-goto-unread 'never) ! (not (gnus-summary-last-article-p article))) ! (gnus-summary-next-article) ! (gnus-summary-next-unread-article)) ! (if (or (null gnus-current-article) ! (null gnus-article-current) ! (/= article (cdr gnus-article-current)) ! (not (equal (car gnus-article-current) gnus-newsgroup-name))) ! ;; Selected subject is different from current article's. ! (gnus-summary-display-article article) ! (gnus-eval-in-buffer-window ! gnus-article-buffer ! (setq endp (gnus-article-next-page lines))) ! (if endp ! (cond (circular ! (gnus-summary-beginning-of-article)) ! (lines ! (gnus-message 3 "End of message")) ! ((null lines) ! (if (and (eq gnus-summary-goto-unread 'never) ! (not (gnus-summary-last-article-p article))) ! (gnus-summary-next-article) ! (gnus-summary-next-unread-article))))))) (gnus-summary-recenter) (gnus-summary-position-point))) *************** *** 11542,11548 **** (gnus-set-global-variables) (or gnus-expert-user (gnus-y-or-n-p ! "Are you really, really, really sure you want to expunge? ") (error "Phew!")) (let ((nnmail-expiry-wait 'immediate) (nnmail-expiry-wait-function nil)) --- 11545,11551 ---- (gnus-set-global-variables) (or gnus-expert-user (gnus-y-or-n-p ! "Are you really, really, really sure you want to delete all these messages? ") (error "Phew!")) (let ((nnmail-expiry-wait 'immediate) (nnmail-expiry-wait-function nil)) *************** *** 13202,13209 **** (save-excursion (gnus-article-setup-buffer) (set-buffer gnus-article-buffer) (let ((command (if automatic command (read-string "Command: " command))) ! (buffer-read-only nil)) (erase-buffer) (insert "$ " command "\n\n") (if gnus-view-pseudo-asynchronously --- 13205,13217 ---- (save-excursion (gnus-article-setup-buffer) (set-buffer gnus-article-buffer) + (setq buffer-read-only nil) (let ((command (if automatic command (read-string "Command: " command))) ! ;; Just binding this here doesn't help, because there might ! ;; be output from the process after exiting the scope of ! ;; this `let'. ! ;; (buffer-read-only nil) ! ) (erase-buffer) (insert "$ " command "\n\n") (if gnus-view-pseudo-asynchronously *************** *** 13428,13435 **** --- 13436,13454 ---- (gnus-group-enter-directory dir))))))))) (cond + ;; Refuse to select canceled articles. + ((and (numberp article) + gnus-summary-buffer + (get-buffer gnus-summary-buffer) + (buffer-name (get-buffer gnus-summary-buffer)) + (eq (cdr (save-excursion + (set-buffer gnus-summary-buffer) + (assq article gnus-newsgroup-reads))) + gnus-canceled-mark)) + nil) ;; We first check `gnus-original-article-buffer'. ((and (get-buffer gnus-original-article-buffer) + (numberp article) (save-excursion (set-buffer gnus-original-article-buffer) (and (equal (car gnus-original-article) group) *************** *** 13465,13470 **** --- 13484,13490 ---- ;; Take the article from the original article buffer ;; and place it in the buffer it's supposed to be in. (when (and (get-buffer gnus-article-buffer) + (numberp article) (equal (buffer-name (current-buffer)) (buffer-name (get-buffer gnus-article-buffer)))) (save-excursion *************** *** 13481,13487 **** (setq gnus-original-article (cons group article)))) ;; Update sparse articles. ! (when do-update-line (let ((buf (current-buffer))) (set-buffer gnus-summary-buffer) (gnus-summary-update-article do-update-line) --- 13501,13509 ---- (setq gnus-original-article (cons group article)))) ;; Update sparse articles. ! (when (and do-update-line ! (or (numberp article) ! (stringp article))) (let ((buf (current-buffer))) (set-buffer gnus-summary-buffer) (gnus-summary-update-article do-update-line) *************** *** 13642,13663 **** (memq article gnus-newsgroup-marked) (memq article gnus-newsgroup-dormant) (memq article gnus-newsgroup-unreads))))) ! ;; Hooks for getting information from the article. ! ;; This hook must be called before being narrowed. ! (let (buffer-read-only) ! (run-hooks 'internal-hook) ! (run-hooks 'gnus-article-prepare-hook) ! ;; Decode MIME message. ! (if gnus-show-mime ! (if (or (not gnus-strict-mime) ! (gnus-fetch-field "Mime-Version")) ! (funcall gnus-show-mime-method) ! (funcall gnus-decode-encoded-word-method))) ! ;; Perform the article display hooks. ! (run-hooks 'gnus-article-display-hook)) ! ;; Do page break. ! (goto-char (point-min)) ! (and gnus-break-pages (gnus-narrow-to-page)) (gnus-set-mode-line 'article) (gnus-configure-windows 'article) (goto-char (point-min)) --- 13664,13687 ---- (memq article gnus-newsgroup-marked) (memq article gnus-newsgroup-dormant) (memq article gnus-newsgroup-unreads))))) ! (when (or (numberp article) ! (stringp article)) ! ;; Hooks for getting information from the article. ! ;; This hook must be called before being narrowed. ! (let (buffer-read-only) ! (run-hooks 'internal-hook) ! (run-hooks 'gnus-article-prepare-hook) ! ;; Decode MIME message. ! (if gnus-show-mime ! (if (or (not gnus-strict-mime) ! (gnus-fetch-field "Mime-Version")) ! (funcall gnus-show-mime-method) ! (funcall gnus-decode-encoded-word-method))) ! ;; Perform the article display hooks. ! (run-hooks 'gnus-article-display-hook)) ! ;; Do page break. ! (goto-char (point-min)) ! (and gnus-break-pages (gnus-narrow-to-page))) (gnus-set-mode-line 'article) (gnus-configure-windows 'article) (goto-char (point-min)) *************** *** 13936,13941 **** --- 13960,13966 ---- "Hack to remove QP encoding from headers." (let ((case-fold-search t) (inhibit-point-motion-hooks t) + (buffer-read-only nil) string) (goto-char (point-min)) (while (re-search-forward "=\\?iso-8859-1\\?q\\?\\([^?\t\n]*\\)\\?=" nil t) *************** *** 13977,13985 **** (delete-char -1) (delete-char 1)) ((looking-at "[0-9A-F][0-9A-F]") ! (delete-char -1) ! (insert (hexl-hex-string-to-integer ! (buffer-substring (point) (+ 2 (point))))) (delete-char 2)) ((looking-at "=") (delete-char 1)) --- 14002,14011 ---- (delete-char -1) (delete-char 1)) ((looking-at "[0-9A-F][0-9A-F]") ! (subst-char-in-region ! (1- (point)) (point) ?= ! (hexl-hex-string-to-integer ! (buffer-substring (point) (+ 2 (point))))) (delete-char 2)) ((looking-at "=") (delete-char 1)) *************** *** 14215,14229 **** " ago\n" " in the future\n"))))) (t ! (error "Unknown conversion type: %s" type))))) ! ;; Do highlighting. ! (forward-line -1) ! (when (and (gnus-visual-p 'article-highlight 'highlight) ! (looking-at "\\([^:]+\\): *\\(.*\\)$")) ! (put-text-property (match-beginning 1) (match-end 1) ! 'face bface) ! (put-text-property (match-beginning 2) (match-end 2) ! 'face eface))))))) (defun gnus-article-date-local (&optional highlight) "Convert the current article date to the local timezone." --- 14241,14255 ---- " ago\n" " in the future\n"))))) (t ! (error "Unknown conversion type: %s" type)))) ! ;; Do highlighting. ! (forward-line -1) ! (when (and (gnus-visual-p 'article-highlight 'highlight) ! (looking-at "\\([^:]+\\): *\\(.*\\)$")) ! (put-text-property (match-beginning 1) (match-end 1) ! 'face bface) ! (put-text-property (match-beginning 2) (match-end 2) ! 'face eface)))))))) (defun gnus-article-date-local (&optional highlight) "Convert the current article date to the local timezone." *************** *** 15348,15354 **** (file-exists-p (concat gnus-startup-file ".eld"))) nil (gnus-message 6 "First time user; subscribing you to default groups") ! (unless gnus-have-read-active-file (gnus-read-active-file)) (setq gnus-newsrc-last-checked-date (current-time-string)) (let ((groups gnus-default-subscribed-newsgroups) --- 15374,15380 ---- (file-exists-p (concat gnus-startup-file ".eld"))) nil (gnus-message 6 "First time user; subscribing you to default groups") ! (unless (gnus-read-active-file-p) (gnus-read-active-file)) (setq gnus-newsrc-last-checked-date (current-time-string)) (let ((groups gnus-default-subscribed-newsgroups) *************** *** 15520,15528 **** (let ((newsrc (cdr gnus-newsrc-alist)) bogus group entry info) (gnus-message 5 "Checking bogus newsgroups...") ! (unless gnus-have-read-active-file (gnus-read-active-file)) ! (when (member gnus-select-method gnus-have-read-active-file) ;; Find all bogus newsgroup that are subscribed. (while newsrc (setq info (pop newsrc) --- 15546,15554 ---- (let ((newsrc (cdr gnus-newsrc-alist)) bogus group entry info) (gnus-message 5 "Checking bogus newsgroups...") ! (unless (gnus-read-active-file-p) (gnus-read-active-file)) ! (when (gnus-read-active-file-p) ;; Find all bogus newsgroup that are subscribed. (while newsrc (setq info (pop newsrc) *************** *** 15841,15846 **** --- 15867,15897 ---- (gnus-sethash (car killed) nil hashtb) (setq killed (cdr killed))) (setq lists (cdr lists))))) + + (defun gnus-get-killed-groups () + "Go through the active hashtb and all all unknown groups as killed." + ;; First make sure active file has been read. + (unless (gnus-read-active-file-p) + (let ((gnus-read-active-file t)) + (gnus-read-active-file))) + (or gnus-killed-hashtb (gnus-make-hashtable-from-killed)) + ;; Go through all newsgroups that are known to Gnus - enlarge kill list. + (mapatoms + (lambda (sym) + (let ((groups 0) + (group (symbol-name sym))) + (if (or (null group) + (gnus-gethash group gnus-killed-hashtb) + (gnus-gethash group gnus-newsrc-hashtb)) + () + (let ((do-sub (gnus-matches-options-n group))) + (if (or (eq do-sub 'subscribe) (eq do-sub 'ignore)) + () + (setq groups (1+ groups)) + (setq gnus-killed-list + (cons group gnus-killed-list)) + (gnus-sethash group group gnus-killed-hashtb)))))) + gnus-active-hashtb)) ;; Get the active file(s) from the backend(s). (defun gnus-read-active-file () *** pub/sgnus/lisp/message-xmas.el Wed May 8 00:39:17 1996 --- sgnus/lisp/message-xmas.el Wed May 8 00:49:52 1996 *************** *** 37,51 **** `right-toolbar', and `left-toolbar'.") (defvar message-toolbar ! '([message-copy message-copy t "Copy message"] ! [message-delete message-delete t "Delete message"] ! [message-forward message-forward t "Forward message"] [message-get message-get t "Message get"] - [message-help message-help t "Message help"] [message-originate message-originate t "Originate"] - [message-reply message-reply t "Reply"] [message-save message-save t "Save"] ! [message-spell message-spell t "Spell"]) "The message buffer toolbar.") (defun message-xmas-find-glyph-directory (&optional package) --- 37,53 ---- `right-toolbar', and `left-toolbar'.") (defvar message-toolbar ! '( ! [message-reply message-reply t "Reply"] [message-get message-get t "Message get"] [message-originate message-originate t "Originate"] [message-save message-save t "Save"] ! [message-copy message-copy t "Copy message"] ! [message-delete message-delete t "Delete message"] ! [message-forward message-forward t "Forward message"] ! [message-spell message-spell t "Spell"] ! [message-help message-help t "Message help"] ! ) "The message buffer toolbar.") (defun message-xmas-find-glyph-directory (&optional package) *** pub/sgnus/lisp/message.el Wed May 8 00:39:18 1996 --- sgnus/lisp/message.el Fri May 10 22:45:12 1996 *************** *** 1478,1484 **** (defun message-check-element (type) "Returns non-nil if this type is not to be checked." (if (eq message-syntax-checks 'dont-check-for-anything-just-trust-me) ! nil (let ((able (assq type message-syntax-checks))) (and (consp able) (eq (cdr able) 'disabled))))) --- 1478,1484 ---- (defun message-check-element (type) "Returns non-nil if this type is not to be checked." (if (eq message-syntax-checks 'dont-check-for-anything-just-trust-me) ! t (let ((able (assq type message-syntax-checks))) (and (consp able) (eq (cdr able) 'disabled))))) *************** *** 2117,2123 **** message-id (mail-fetch-field "message-id")) ;; Remove any (buggy) Re:'s that are present and make a ;; proper one. ! (when (string-match "^[ \t]*[Re][Ee]:[ \t]*" subject) (setq subject (substring subject (match-end 0)))) (setq subject (concat "Re: " subject)) --- 2117,2123 ---- message-id (mail-fetch-field "message-id")) ;; Remove any (buggy) Re:'s that are present and make a ;; proper one. ! (when (string-match "^[ \t]*[Rr][Ee]:[ \t]*" subject) (setq subject (substring subject (match-end 0)))) (setq subject (concat "Re: " subject)) *************** *** 2219,2225 **** (setq distribution nil)) ;; Remove any (buggy) Re:'s that are present and make a ;; proper one. ! (when (string-match "^[ \t]*[Re][Ee]:[ \t]*" subject) (setq subject (substring subject (match-end 0)))) (setq subject (concat "Re: " subject)) (widen)) --- 2219,2225 ---- (setq distribution nil)) ;; Remove any (buggy) Re:'s that are present and make a ;; proper one. ! (when (string-match "^[ \t]*[Rr][Ee]:[ \t]*" subject) (setq subject (substring subject (match-end 0)))) (setq subject (concat "Re: " subject)) (widen)) *** pub/sgnus/lisp/nnheader.el Wed May 8 00:39:19 1996 --- sgnus/lisp/nnheader.el Sat May 11 00:55:37 1996 *************** *** 138,151 **** (defvar nnheader-newsgroup-none-id 1) ! (defun nnheader-parse-head () (let ((case-fold-search t) (cur (current-buffer)) end ref in-reply-to lines p) (goto-char (point-min)) ;; Search to the beginning of the next header. Error messages ;; do not begin with 2 or 3. ! (when (re-search-forward "^[23][0-9]+ " nil t) ;; This implementation of this function, with nine ;; search-forwards instead of the one re-search-forward and ;; a case (which basically was the old function) is actually --- 138,151 ---- (defvar nnheader-newsgroup-none-id 1) ! (defun nnheader-parse-head (&optional naked) (let ((case-fold-search t) (cur (current-buffer)) end ref in-reply-to lines p) (goto-char (point-min)) ;; Search to the beginning of the next header. Error messages ;; do not begin with 2 or 3. ! (when (or naked (re-search-forward "^[23][0-9]+ " nil t)) ;; This implementation of this function, with nine ;; search-forwards instead of the one re-search-forward and ;; a case (which basically was the old function) is actually *************** *** 154,167 **** ;; doesn't always go hand in hand. (vector ;; Number. ! (prog1 ! (read cur) ! (end-of-line) ! (setq p (point)) ! (narrow-to-region (point) ! (or (and (search-forward "\n.\n" nil t) ! (- (point) 2)) ! (point)))) ;; Subject. (progn (goto-char p) --- 154,171 ---- ;; doesn't always go hand in hand. (vector ;; Number. ! (if naked ! (progn ! (setq p (point-min)) ! 0) ! (prog1 ! (read cur) ! (end-of-line) ! (setq p (point)) ! (narrow-to-region (point) ! (or (and (search-forward "\n.\n" nil t) ! (- (point) 2)) ! (point))))) ;; Subject. (progn (goto-char p) *************** *** 220,227 **** (princ (mail-header-number header) (current-buffer)) (insert "\t" ! (or (mail-header-subject header) "") "\t" ! (or (mail-header-from header) "") "\t" (or (mail-header-date header) "") "\t" (or (mail-header-id header) "") "\t" (or (mail-header-references header) "") "\t") --- 224,231 ---- (princ (mail-header-number header) (current-buffer)) (insert "\t" ! (or (mail-header-subject header) "(none)") "\t" ! (or (mail-header-from header) "(nobody)") "\t" (or (mail-header-date header) "") "\t" (or (mail-header-id header) "") "\t" (or (mail-header-references header) "") "\t") *** pub/sgnus/lisp/nnmail.el Wed May 8 00:39:19 1996 --- sgnus/lisp/nnmail.el Fri May 10 22:45:13 1996 *************** *** 573,579 **** (if (re-search-forward "^Message-ID:[ \t]*\\(<[^>]+>\\)" nil t) (setq message-id (match-string 1)) (save-excursion ! (when (re-search-backward "^Message-ID:" nil t) (beginning-of-line) (insert "Original-"))) ;; There is no Message-ID here, so we create one. --- 573,579 ---- (if (re-search-forward "^Message-ID:[ \t]*\\(<[^>]+>\\)" nil t) (setq message-id (match-string 1)) (save-excursion ! (when (re-search-forward "^Message-ID:" nil t) (beginning-of-line) (insert "Original-"))) ;; There is no Message-ID here, so we create one. *** pub/sgnus/lisp/nnml.el Wed May 8 00:39:19 1996 --- sgnus/lisp/nnml.el Sat May 11 00:26:40 1996 *************** *** 351,358 **** () (let ((chars (nnmail-insert-lines)) (art (concat (int-to-string article) "\t")) ! nov-line) ! (setq nov-line (nnml-make-nov-line chars)) ;; Replace the NOV line in the NOV file. (save-excursion (set-buffer (nnml-open-nov group)) --- 351,358 ---- () (let ((chars (nnmail-insert-lines)) (art (concat (int-to-string article) "\t")) ! headers) ! (setq headers (nnml-parse-head chars article)) ;; Replace the NOV line in the NOV file. (save-excursion (set-buffer (nnml-open-nov group)) *************** *** 372,378 **** article) (zerop (forward-line 1))))) (beginning-of-line) ! (insert (int-to-string article) nov-line) (nnml-save-nov) t))))) --- 372,378 ---- article) (zerop (forward-line 1))))) (beginning-of-line) ! (nnheader-insert-nov headers) (nnml-save-nov) t))))) *************** *** 541,547 **** (defun nnml-save-mail () "Called narrowed to an article." (let ((group-art (nreverse (nnmail-article-group 'nnml-active-number))) ! chars nov-line) (setq chars (nnmail-insert-lines)) (nnmail-insert-xref group-art) (run-hooks 'nnmail-prepare-save-mail-hook) --- 541,547 ---- (defun nnml-save-mail () "Called narrowed to an article." (let ((group-art (nreverse (nnmail-article-group 'nnml-active-number))) ! chars headers) (setq chars (nnmail-insert-lines)) (nnmail-insert-xref group-art) (run-hooks 'nnmail-prepare-save-mail-hook) *************** *** 569,579 **** ;; Generate a nov line for this article. We generate the nov ;; line after saving, because nov generation destroys the ;; header. ! (setq nov-line (nnml-make-nov-line chars)) ;; Output the nov line to all nov databases that should have it. (let ((ga group-art)) (while ga ! (nnml-add-nov (caar ga) (cdar ga) nov-line) (setq ga (cdr ga)))) group-art)) --- 569,579 ---- ;; Generate a nov line for this article. We generate the nov ;; line after saving, because nov generation destroys the ;; header. ! (setq headers (nnml-parse-head chars)) ;; Output the nov line to all nov databases that should have it. (let ((ga group-art)) (while ga ! (nnml-add-nov (caar ga) (cdar ga) headers) (setq ga (cdr ga)))) group-art)) *************** *** 605,674 **** (setcdr active (1+ (cdr active)))) (cdr active))) ! (defun nnml-add-nov (group article line) "Add a nov line for the GROUP base." (save-excursion (set-buffer (nnml-open-nov group)) (goto-char (point-max)) ! (insert (int-to-string article) line))) (defsubst nnml-header-value () (buffer-substring (match-end 0) (progn (end-of-line) (point)))) ! (defun nnml-make-nov-line (chars) ! "Create a nov from the current headers." ! (let ((case-fold-search t) ! subject from date id references lines xref in-reply-to char) ! (save-excursion ! (save-restriction ! (goto-char (point-min)) ! (narrow-to-region ! (point) ! (1- (or (search-forward "\n\n" nil t) (point-max)))) ! ;; Fold continuation lines. ! (goto-char (point-min)) ! (while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t) ! (replace-match " " t t)) ! (subst-char-in-region (point-min) (point-max) ?\t ? ) ! ;; [number subject from date id references chars lines xref] ! (save-excursion ! (goto-char (point-min)) ! (while (re-search-forward "^\\(from\\|subject\\|message-id\\|date\\|lines\\|xref\\|references\\|in-reply-to\\): " ! nil t) ! (beginning-of-line) ! (setq char (downcase (following-char))) ! (cond ! ((eq char ?s) ! (setq subject (nnml-header-value))) ! ((eq char ?f) ! (setq from (nnml-header-value))) ! ((eq char ?x) ! (setq xref (buffer-substring (match-beginning 0) ! (progn (end-of-line) (point))))) ! ((eq char ?l) ! (setq lines (nnml-header-value))) ! ((eq char ?d) ! (setq date (nnml-header-value))) ! ((eq char ?m) ! (setq id (setq id (nnml-header-value)))) ! ((eq char ?r) ! (setq references (nnml-header-value))) ! ((eq char ?i) ! (setq in-reply-to (nnml-header-value)))) ! (forward-line 1)) ! ! (and (not references) ! in-reply-to ! (string-match "<[^>]+>" in-reply-to) ! (setq references ! (substring in-reply-to (match-beginning 0) ! (match-end 0))))) ! ;; [number subject from date id references chars lines xref] ! (format "\t%s\t%s\t%s\t%s\t%s\t%d\t%s\t%s\t\n" ! (or subject "(none)") (or from "(nobody)") (or date "") ! (or id (nnmail-message-id)) ! (or references "") (or chars 0) (or lines "0") ! (or xref "")))))) (defun nnml-open-nov (group) (or (cdr (assoc group nnml-nov-buffer-alist)) --- 605,639 ---- (setcdr active (1+ (cdr active)))) (cdr active))) ! (defun nnml-add-nov (group article headers) "Add a nov line for the GROUP base." (save-excursion (set-buffer (nnml-open-nov group)) (goto-char (point-max)) ! (mail-header-set-number headers article) ! (nnheader-insert-nov headers))) (defsubst nnml-header-value () (buffer-substring (match-end 0) (progn (end-of-line) (point)))) ! (defun nnml-parse-head (chars &optional number) ! "Parse the head of the current buffer." ! (save-excursion ! (save-restriction ! (goto-char (point-min)) ! (narrow-to-region ! (point) ! (1- (or (search-forward "\n\n" nil t) (point-max)))) ! ;; Fold continuation lines. ! (goto-char (point-min)) ! (while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t) ! (replace-match " " t t)) ! ;; Remove any tabs; they are too confusing. ! (subst-char-in-region (point-min) (point-max) ?\t ? ) ! (let ((headers (nnheader-parse-head t))) ! (mail-header-set-chars headers chars) ! (mail-header-set-number headers number) ! headers)))) (defun nnml-open-nov (group) (or (cdr (assoc group nnml-nov-buffer-alist)) *************** *** 771,781 **** (when (and (not (= 0 chars)) ; none of them empty files... (not (= (point-min) (point-max)))) (goto-char (point-min)) ! (setq nov-line (nnml-make-nov-line chars)) (save-excursion (set-buffer nov-buffer) (goto-char (point-max)) ! (insert (int-to-string (car files)) nov-line))) (widen)) (setq files (cdr files))) (save-excursion --- 736,746 ---- (when (and (not (= 0 chars)) ; none of them empty files... (not (= (point-min) (point-max)))) (goto-char (point-min)) ! (setq headers (nnml-parse-head chars (car files))) (save-excursion (set-buffer nov-buffer) (goto-char (point-max)) ! (nnheader-insert-nov headers))) (widen)) (setq files (cdr files))) (save-excursion *** pub/sgnus/lisp/ChangeLog Wed May 8 00:39:27 1996 --- sgnus/lisp/ChangeLog Sun May 12 01:34:28 1996 *************** *** 1,4 **** --- 1,86 ---- + Sun May 12 01:29:12 1996 Lars Magne Ingebrigtsen + + * gnus-xmas.el (gnus-xmas-summary-recenter): Protect against evil. + + Sat May 11 23:23:15 1996 Michael Sperber + + * gnus-xmas.el (gnus-xmas-summary-recenter): Would act oddly. + + Fri May 10 22:49:46 1996 Lars Magne Ingebrigtsen + + * nnheader.el (nnheader-parse-head): Deal with naked heads. + + * nnml.el (nnml-parse-head): `naked' heads. + + Fri May 10 00:27:59 1996 Lars Magne Ingebrigtsen + + * gnus.el (gnus-group-mark-group): Didn't work well in topic + buffers. + (gnus-read-active-file-p): New function. + (gnus-group-list-killed): Read active file. + (gnus-group-list-active): Ditto. + (gnus-group-list-matching): Possibly read active file. + (gnus-get-killed-groups): Separated into own function. + (gnus-update-group-mark-positions): Don't define "dummy.group". + + * gnus-topic.el (gnus-topic-rename): Use topic under point. + (gnus-topic-create-topic): Don't prompt for parent topic. + (gnus-topic-create-topic): Go to the new topic. + + * gnus.el (gnus-mime-decode-quoted-printable): Preserve text + props. + (gnus-article-date-ut): Would bug out on read-only. + + Thu May 9 11:12:30 1996 Steven L Baur + + * message.el (message-followup): Correct typos in regular expression + matching ``Re:''. + + Thu May 9 20:38:10 1996 Lars Magne Ingebrigtsen + + * gnus-uu.el (gnus-uu-delete-work-dir): Don't message so much. + + Wed May 8 03:20:23 1996 Lars Magne Ingebrigtsen + + * nnmail.el (nnmail-process-unix-mail-format): Didn't nix out + bogus Message-ID headers properly. + + * nnml.el (nnml-parse-head): Use nnheader functions for parsing + and generating nov headers. + + Wed May 8 22:55:56 1996 Lars Magne Ingebrigtsen + + * gnus.el (gnus-execute-command): Make sure the buffer isn't + read-onl|y. + (gnus-article-prepare): Would perform hooks on pseudo articles. + + * gnus-uu.el (gnus-uu-mark-sparse): Would bug out on pseudos. + (gnus-uu-mark-all): Ditto. + + * gnus.el (gnus-request-article-this-buffer): Ignore canceled + articles. + (gnus-summary-next-page): Pass by canceled articles. + + * message.el (message-check-element): Reverse logic. + + Wed May 8 22:36:18 1996 Lars Magne Ingebrigtsen + + * gnus.el (gnus-tree-buffer): Moved from gnus-salt.el. + + Wed May 8 23:45:46 1996 Lars Magne Ingebrigtsen + + * gnus.el (gnus-no-server): New definition. + (gnus-group-default-level): Use permanent levels. + + Wed May 8 21:35:35 1996 Lars Magne Ingebrigtsen + + * gnus.el (gnus-summary-select-article): + Tue May 7 21:49:30 1996 Lars Magne Ingebrigtsen + + * gnus.el: 0.83 is released. + + * gnus.el: September Gnus v0.83 is released. * gnus.el (gnus-summary-insert-subject): Would change article number.