From: shuhei-k Date: Sun, 8 Mar 1998 18:11:25 +0000 (+0000) Subject: Sync up with qgnus-0.37. X-Git-Tag: gnus-6_7-tomo-199811302358~127 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=322bc9ffd30203f81ffffee4c81f8e36889ec7bf;p=elisp%2Fgnus.git- Sync up with qgnus-0.37. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9bafbe5..6b2a1b3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,114 @@ +Sat Mar 7 21:59:18 1998 Lars Magne Ingebrigtsen + + * gnus.el: Quassia Gnus v0.37 is released. + +Sat Mar 7 20:10:42 1998 Lars Magne Ingebrigtsen + + * gnus-agent.el (gnus-agent-expire-days): New variable. + (gnus-agent-expire): New function. + +Sat Mar 7 17:35:53 1998 Lars Magne Ingebrigtsen + + * gnus.el: Quassia Gnus v0.36 is released. + +Sat Mar 7 17:29:20 1998 Lars Magne Ingebrigtsen + + * nntp.el (nntp-wait-for): Reversed logic. + +Sat Mar 7 17:19:04 1998 Lars Magne Ingebrigtsen + + * gnus.el: Quassia Gnus v0.35 is released. + +Sat Mar 7 15:01:57 1998 Lars Magne Ingebrigtsen + + * gnus-picon.el (gnus-picons-x-face-sentinel): Check whether + gnus-picons-x-face-file-name exists. + + * gnus-art.el (gnus-article-read-summary-keys): Move window point + in the summary buffer. + + * nndoc.el (nndoc-type-alist): Allow spaces around separator. + + * gnus-sum.el (gnus-summary-edit-parameters): Interactive. + +Sat Mar 7 15:00:05 1998 Wes Hardaker + + * gnus-art.el (gnus-article-prepare): Mark articles as + downloadable. + +Wed Mar 4 22:33:27 1998 Ken Raeburn + + * gnus-int.el (gnus-get-function): New version, caches symbol + names. + +Fri Mar 6 01:10:22 1998 Ken Raeburn + + * nnml.el (nnml-article-to-file): Build pathname using + expand-file-name. (Thanks, Colin Rafferty, for catching + this.) + +Sat Feb 28 23:33:40 1998 Ken Raeburn + + * nnml.el (nnml-article-to-file): Don't add extra "/" when + building pathname. + + * nnheader.el (nnheader-file-to-number): Check value of + nnheader-numerical-short-files instead of checking if jka-compr is + loaded. + +1998-03-03 Dave Love + + * nnheader.el (nnheader-parse-head): Fix in-reply-to code. Return + nil consistently if not found. + +Sat Mar 7 13:50:44 1998 Lars Magne Ingebrigtsen + + * nntp.el: Check whether the connection died. + +1998-03-01 Kim-Minh Kaplan + + * gnus.texi (Easy Picons): Removed references to + `gnus-group-display-picons'. + (Hard Picons): Ditto. + +Mon Mar 2 16:17:36 1998 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-exit-no-update): Run + gnus-summary-prepare-exit-hook here as well. + +Sat Feb 28 13:35:26 1998 Lars Magne Ingebrigtsen + + * nntp.el (nntp-authinforc-file): Changed default. + (nntp-authinfo-file): Changed name. + (nntp-record-commands): New variable. + (nntp-record-command): New function. + + * gnus-agent.el (gnus-agent-group-path): Use real name of group. + + * gnus-sum.el (gnus-summary-insert-subject): Don't allow nil + articles. + (gnus-summary-read-group): Respect backward movement. + +1998-03-01 Kim-Minh Kaplan + + * gnus-win.el (gnus-window-to-buffer): change "*Picons*" to + `gnus-picons-buffer'. + (gnus-window-to-buffer-helper): Support dynamic picon buffer + name (i.e a symbol that names a function to be called). + (gnus-configure-frame): Use it. + (gnus-delete-windows-in-gnusey-frames): Use it. + (gnus-all-windows-visible-p): Use it. + (gnus-remove-some-windows): Use it. + + * gnus-picon.el (gnus-get-buffer-name): Use it. + (gnus-picons-kill-buffer): New function. + (gnus-picons-setup-buffer): New function. + (gnus-picons-set-buffer): Use them. + (gnus-picons-display-x-face): Put back the `buf' binding: it is + needed when `gnus-picons-display-where' is not set to article. + Also move the X-Face to the left, near the address. It seems more + logical. + Sat Feb 28 08:27:20 1998 Lars Magne Ingebrigtsen * gnus.el: Quassia Gnus v0.34 is released. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index df71437..864cc1b 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -49,6 +49,11 @@ :group 'gnus-agent :type 'integer) +(defcustom gnus-agent-expire-days 7 + "Read articles older than this will be expired." + :group 'gnus-agent + :type 'integer) + ;;; Internal variables (defvar gnus-agent-history-buffers nil) @@ -488,9 +493,9 @@ the actual number of articles toggled is returned." (defun gnus-agent-group-path (group) "Translate GROUP into a path." (if nnmail-use-long-file-names - group + (gnus-group-real-name group) (nnheader-replace-chars-in-string - (nnheader-translate-file-chars group) + (nnheader-translate-file-chars (gnus-group-real-name group)) ?. ?/))) @@ -546,7 +551,7 @@ the actual number of articles toggled is returned." (goto-char (point-max)) (insert id "\t" (number-to-string date) "\t") (while group-arts - (insert (caar group-arts) "/" (number-to-string (cdr (pop group-arts))) + (insert (caar group-arts) " " (number-to-string (cdr (pop group-arts))) " ")) (insert "\n"))) @@ -1203,6 +1208,88 @@ The following commands are available: "Expire all old articles." (interactive) (let ((methods gnus-agent-covered-methods) + (day (- (gnus-time-to-day (current-time)) gnus-agent-expire-days)) + (expiry-hashtb (gnus-make-hashtable 1023)) + gnus-command-method sym group articles + history overview file histories elem art nov-file low info + unreads marked article) + (save-excursion + (setq overview (get-buffer-create " *expire overview*")) + (while (setq gnus-command-method (pop methods)) + (gnus-agent-open-history) + (set-buffer + (setq gnus-agent-current-history + (setq history (gnus-agent-history-buffer)))) + (goto-char (point-min)) + (while (not (eobp)) + (skip-chars-forward "^\t") + (if (> (read (current-buffer)) day) + ;; New article; we don't expire it. + (forward-line 1) + ;; Old article. Schedule it for possible nuking. + (while (not (eolp)) + (setq sym (let ((obarray expiry-hashtb)) + (read (current-buffer)))) + (if (boundp sym) + (set sym (cons (cons (read (current-buffer)) (point)) + (symbol-value sym))) + (set sym (list (cons (read (current-buffer)) (point))))) + (skip-chars-forward " ")) + (forward-line 1))) + ;; We now have all articles that can possibly be expired. + (mapatoms + (lambda (sym) + (setq group (symbol-name sym) + articles (sort (symbol-value sym) 'car-less-than-car) + low (car (gnus-active group)) + info (gnus-get-info group) + unreads (ignore-errors (gnus-list-of-unread-articles group)) + marked (nconc (gnus-uncompress-range + (cdr (assq 'ticked (gnus-info-marks info)))) + (gnus-uncompress-range + (cdr (assq 'dormant (gnus-info-marks info))))) + nov-file (gnus-agent-article-name ".overview" group)) + (gnus-message 5 "Expiring articles in %s" group) + (set-buffer overview) + (erase-buffer) + (when (file-exists-p nov-file) + (insert-file-contents nov-file)) + (goto-char (point-min)) + (while (setq elem (pop articles)) + (setq article (car elem)) + (when (or (null low) + (< article low) + (and (not (memq article unreads)) + (not (memq article marked)))) + ;; Find and nuke the NOV line. + (while (and (not (eobp)) + (< (setq art (read (current-buffer))) article)) + (forward-line 1)) + (if (or (eobp) + (/= art article)) + (beginning-of-line) + (gnus-delete-line)) + ;; Nuke the article. + (when (file-exists-p (setq file (gnus-agent-article-name + (number-to-string article) + group))) + (delete-file file)) + ;; Schedule the history line for nuking. + (push (cdr elem) histories))) + (write-region (point-min) (point-max) nov-file nil 'silent)) + expiry-hashtb) + (set-buffer history) + (setq histories (nreverse (sort histories '<))) + (while histories + (goto-char (pop histories)) + (gnus-delete-line)) + (gnus-agent-save-history) + (gnus-agent-close-history))))) + +(defun gnus-agent-expire-old () + "Expire all old articles." + (interactive) + (let ((methods gnus-agent-covered-methods) (alist (cdr gnus-newsrc-alist)) gnus-command-method ofiles info method file group) (while (setq gnus-command-method (pop methods)) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 762f0e9..6229bfb 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2028,10 +2028,14 @@ If ALL-HEADERS is non-nil, no headers are hidden." (cons gnus-newsgroup-name article)) (set-buffer gnus-summary-buffer) (setq gnus-current-article article) - (gnus-summary-mark-article article gnus-canceled-mark)) - (unless (memq article gnus-newsgroup-sparse) - (gnus-error - 1 "No such article (may have expired or been canceled)"))) + (if (eq (gnus-article-mark article) gnus-undownloaded-mark) + (progn + (gnus-summary-set-agent-mark article) + (message "Message marked for downloading")) + (gnus-summary-mark-article article gnus-canceled-mark) + (unless (memq article gnus-newsgroup-sparse) + (gnus-error 1 + "No such article (may have expired or been canceled)"))))) (if (or (eq result 'pseudo) (eq result 'nneething)) (progn (save-excursion @@ -2306,7 +2310,7 @@ Argument LINES specifies lines to be scrolled down." '("\C-d")) (up-to-top '("n" "Gn" "p" "Gp")) - keys) + keys new-sum-point) (save-excursion (set-buffer gnus-article-current-summary) (let (gnus-pick-mode) @@ -2327,22 +2331,26 @@ Argument LINES specifies lines to be scrolled down." (ding) (unless (member keys nosave-in-article) (set-buffer gnus-article-current-summary)) - (call-interactively func)) + (call-interactively func) + (setq new-sum-point (point))) (when (member keys nosave-but-article) (pop-to-buffer gnus-article-buffer 'norecord))) ;; These commands should restore window configuration. (let ((obuf (current-buffer)) (owin (current-window-configuration)) (opoint (point)) + (summary gnus-article-current-summary) func in-buffer) (if not-restore-window - (pop-to-buffer gnus-article-current-summary 'norecord) - (switch-to-buffer gnus-article-current-summary 'norecord)) + (pop-to-buffer summary 'norecord) + (switch-to-buffer summary 'norecord)) (setq in-buffer (current-buffer)) ;; We disable the pick minor mode commands. (if (setq func (let (gnus-pick-mode) (lookup-key (current-local-map) keys))) - (call-interactively func) + (progn + (call-interactively func) + (setq new-sum-point (point))) (ding)) (when (eq in-buffer (current-buffer)) (set-buffer obuf) @@ -2350,7 +2358,10 @@ Argument LINES specifies lines to be scrolled down." (set-window-configuration owin)) (unless (member keys up-to-top) (set-window-point (get-buffer-window (current-buffer)) - opoint))))))) + opoint)) + (let ((win (get-buffer-window gnus-article-current-summary))) + (when win + (set-window-point win new-sum-point)))))))) (defun gnus-article-hide (&optional arg force) "Hide all the gruft in the current article. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 6637221..db74b92 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2615,7 +2615,7 @@ the thread are to be displayed." (set (car elem) (eval (nth 1 elem)))))))) (defun gnus-summary-read-group (group &optional show-all no-article - kill-buffer no-display) + kill-buffer no-display backward) "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. @@ -2630,6 +2630,11 @@ If NO-DISPLAY, don't generate a summary buffer." (setq show-all nil))))) (eq gnus-auto-select-next 'quietly)) (set-buffer gnus-group-buffer) + ;; The entry function called above goes to the next + ;; group automatically, so we go two groups back + ;; if we are searching for the previous group. + (when backward + (gnus-group-prev-unread-group 2)) (if (not (equal group (gnus-group-group-name))) (setq group (gnus-group-group-name)) (setq group nil))) @@ -4667,7 +4672,8 @@ This is meant to be called in `gnus-article-internal-prepare-hook'." ;; article we have fetched. (when (and (not gnus-show-threads) old-header) - (when (setq d (gnus-data-find (mail-header-number old-header))) + (when (and number + (setq d (gnus-data-find (mail-header-number old-header)))) (goto-char (gnus-data-pos d)) (gnus-data-remove number @@ -5183,6 +5189,7 @@ gnus-exit-group-hook is called with no arguments if that value is non-nil." gnus-expert-user (gnus-y-or-n-p "Discard changes to this group and exit? ")) (gnus-async-halt-prefetch) + (gnus-run-hooks 'gnus-summary-prepare-exit-hook) ;; If we have several article buffers, we kill them at exit. (unless gnus-single-article-buffer (gnus-kill-buffer gnus-article-buffer) @@ -5422,7 +5429,8 @@ previous group instead." (and unreads (not (zerop unreads)))) (gnus-summary-read-group target-group nil no-article - (and (buffer-name current-buffer) current-buffer))) + (and (buffer-name current-buffer) current-buffer) + nil backward)) (setq entered t) (setq current-group target-group target-group nil))))))) @@ -6497,6 +6505,7 @@ or `gnus-select-method', no matter what backend the article comes from." (defun gnus-summary-edit-parameters () "Edit the group parameters of the current group." + (interactive) (gnus-group-edit-group gnus-newsgroup-name 'params)) (defun gnus-summary-enter-digest-group (&optional force) diff --git a/lisp/gnus.el b/lisp/gnus.el index 17d7c58..0b86f72 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -250,7 +250,7 @@ is restarted, and sometimes reloaded." "Version number for this version of gnus.") (defconst gnus-version - (format "Semi-gnus %s (based on Quassia Gnus v0.34)" gnus-version-number) + (format "Semi-gnus %s (based on Quassia Gnus v0.37)" gnus-version-number) "Version string for this version of gnus.") (defcustom gnus-inhibit-startup-message nil @@ -1628,7 +1628,9 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") ("gnus-sum" gnus-summary-insert-line gnus-summary-read-group gnus-list-of-unread-articles gnus-list-of-read-articles gnus-offer-save-summaries gnus-make-thread-indent-array - gnus-summary-exit gnus-update-read-articles) + gnus-summary-exit gnus-update-read-articles gnus-summary-last-subject + gnus-summary-skip-intangible gnus-summary-article-number + gnus-data-header gnus-data-find) ("gnus-group" gnus-group-insert-group-line gnus-group-quit gnus-group-list-groups gnus-group-first-unread-group gnus-group-set-mode-line gnus-group-set-info gnus-group-save-newsrc @@ -1673,7 +1675,8 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") gnus-async-halt-prefetch) ("gnus-agent" gnus-open-agent gnus-agent-get-function gnus-agent-save-groups gnus-agent-save-active gnus-agent-method-p - gnus-agent-get-undownloaded-list gnus-agent-fetch-session) + gnus-agent-get-undownloaded-list gnus-agent-fetch-session + gnus-summary-set-agent-mark) ("gnus-agent" :interactive t gnus-unplugged gnus-agentize gnus-agent-batch) ("gnus-vm" :interactive t gnus-summary-save-in-vm diff --git a/lisp/nnheader.el b/lisp/nnheader.el index c16bdef..44f3079 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -238,8 +238,9 @@ on your system, you could say something like: (setq ref2 (substring in-reply-to (match-beginning 0) (match-end 0))) (when (> (length ref2) (length ref)) - (setq ref ref2)))) - ""))) + (setq ref ref2))) + ref) + nil))) ;; Chars. 0 ;; Lines. @@ -559,7 +560,7 @@ If FILE is t, return the buffer contents as a string." (defsubst nnheader-file-to-number (file) "Take a file name and return the article number." - (if (not (boundp 'jka-compr-compression-info-list)) + (if (string= nnheader-numerical-short-files "^[0-9]+$") (string-to-int file) (string-match nnheader-numerical-short-files file) (string-to-int (match-string 0 file))))