+2003-02-13 Michael Shields <shields@msrl.com>
+
+ * gnus-cite.el
+ (gnus-cite-attribution-suffix, gnus-cite-parse):
+ Better handling for Microsoft citation styles.
+ (gnus-unsightly-citation-regexp): New.
+
+2003-02-12 Michael Shields <shields@msrl.com>
+
+ * gnus-art.el (article-strip-banner): Strip both per-group and
+ per-user-address banners.
+ (article-really-strip-banner): New.
+
+2003-02-12 Michael Shields <shields@msrl.com>
+
+ * gnus-sum.el (gnus-article-goto-next-page,
+ gnus-article-goto-prev-page): Call gnus-summary-*-page, instead of
+ relying on the summary bindings of `n' and `p'.
+
+2003-02-12 Michael Shields <shields@msrl.com>
+
+ * gnus-art.el (gnus-article-only-boring-p): New.
+ (gnus-article-skip-boring): New.
+ * gnus-cite.el (gnus-article-boring-faces): New.
+ * gnus-sum.el (gnus-summary-next-page): Use
+ gnus-article-only-boring-p.
+
+2003-02-12 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam.el (spam-mark-spam-as-expired-and-move-routine)
+ (spam-ham-move-routine): unmark all articles before marking those
+ of interest and calling gnus-summary-move-article
+
2003-02-12 Jesper Harder <harder@ifa.au.dk>
* gnus.el (gnus-kill-buffer): Move to gnus.el because it's
(const :tag "Multiple To and/or Cc headers." many-to))
:group 'gnus-article-hiding)
+(defcustom gnus-article-skip-boring nil
+ "Skip over text that is not worth reading.
+By default, if you set this t, then Gnus will display citations and
+signatures, but will never scroll down to show you a page consisting
+only of boring text. Boring text is controlled by
+`gnus-article-boring-faces'."
+ :type 'boolean
+ :group 'gnus-article-hiding)
+
(defcustom gnus-signature-separator '("^-- $" "^-- *$")
"Regexp matching signature separator.
This can also be a list of regexps. In that case, it will be checked
(defun gnus-article-goto-next-page ()
"Show the next page of the article."
(interactive)
- (when (gnus-article-next-page)
- (goto-char (point-min))
- (gnus-article-read-summary-keys nil (gnus-character-to-event ?n))))
+ (gnus-eval-in-buffer-window gnus-summary-buffer
+ (gnus-summary-next-page)))
(defun gnus-article-goto-prev-page ()
"Show the next page of the article."
(interactive)
- (if (bobp) (gnus-article-read-summary-keys nil (gnus-character-to-event ?p))
- (gnus-article-prev-page nil)))
+ (gnus-eval-in-buffer-window gnus-summary-buffer
+ (gnus-summary-prev-page)))
(defun gnus-article-next-page (&optional lines)
"Show the next page of the current article.
(beginning-of-buffer
(goto-char (point-min))))))))
+(defun gnus-article-only-boring-p ()
+ "Decide whether there is only boring text remaining in the article.
+Something \"interesting\" is a word of at least two letters that does
+not have a face in `gnus-article-boring-faces'."
+ (when (and gnus-article-skip-boring
+ gnus-article-boring-faces)
+ (save-excursion
+ (catch 'only-boring
+ (while (re-search-forward "\\b\\w\\w" nil t)
+ (forward-char -1)
+ (when (not (gnus-intersection
+ (cons (plist-get (text-properties-at (point))
+ 'face)
+ (mapcar-extents
+ '(lambda (extent)
+ (extent-property extent 'face))
+ nil (current-buffer) (point) (point)))
+ gnus-article-boring-faces))
+ (throw 'only-boring nil)))
+ (throw 'only-boring t)))))
+
(defun gnus-article-refer-article ()
"Read article specified by message-id around point."
(interactive)
(eval-when-compile (require 'static))
(require 'gnus)
-(require 'gnus-art)
(require 'gnus-range)
(require 'message) ; for message-cite-prefix-regexp
:group 'gnus-cite
:type 'integer)
+;; Some Microsoft products put in a citation that extends to the
+;; remainder of the message:
+;;
+;; -----Original Message-----
+;; From: ...
+;; To: ...
+;; Sent: ... [date, in non-RFC-2822 format]
+;; Subject: ...
+;;
+;; Cited message, with no prefixes
+;;
+;; The four headers are always the same. But note they are prone to
+;; folding without additional indentation.
+;;
+;; Others use "----- Original Message -----" instead, and properly quote
+;; the body using "> ". This style is handled without special cases.
+
(defcustom gnus-cite-attribution-prefix
- "In article\\|in <\\|On \\(Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\|Sun\\),\\|-----Original Message-----"
+ "In article\\|in <\\|On \\(Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\|Sun\\),\\|----- ?Original Message ?-----"
"*Regexp matching the beginning of an attribution line."
:group 'gnus-cite
:type 'regexp)
(defcustom gnus-cite-attribution-suffix
- "\\(\\(wrote\\|writes\\|said\\|says\\|>\\)\\(:\\|\\.\\.\\.\\)\\|-----Original Message-----\\)[ \t]*$"
+ "\\(\\(wrote\\|writes\\|said\\|says\\|>\\)\\(:\\|\\.\\.\\.\\)\\|----- ?Original Message ?-----\\)[ \t]*$"
"*Regexp matching the end of an attribution line.
The text matching the first grouping will be used as a button."
:group 'gnus-cite
:type 'regexp)
+(defcustom gnus-unsightly-citation-regexp
+ "^-----Original Message-----\nFrom: \\(.+\n\\)+\n"
+ "Regexp matching Microsoft-type rest-of-message citations."
+ :group 'gnus-cite
+ :type 'regexp)
+
(defface gnus-cite-attribution-face '((t
(:italic t)))
"Face used for attribution lines.")
:group 'gnus-cite
:type 'boolean)
+;; This has to go here because its default value depends on
+;; gnus-cite-face-list.
+(defcustom gnus-article-boring-faces (cons 'gnus-signature-face
+ gnus-cite-face-list)
+ "List of faces that are not worth reading.
+If an article has more pages below the one you are looking at, but
+nothing on those pages is a word of at least three letters that is not
+in a boring face, then the pages will be skipped."
+ :type '(repeat face)
+ :group 'gnus-article-hiding)
+
;;; Internal Variables:
(defvar gnus-cite-article nil)
(goto-char begin))
(goto-char start)
(setq line (1+ line)))
+ ;; Horrible special case for some Microsoft mailers.
+ (goto-char (point-min))
+ (when (re-search-forward gnus-unsightly-citation-regexp max t)
+ (setq begin (count-lines (point-min) (point)))
+ (setq end (count-lines (point-min) max))
+ (setq entry nil)
+ (while (< begin end)
+ (push begin entry)
+ (setq begin (1+ begin)))
+ (push (cons "" entry) alist))
;; We got all the potential prefixes. Now create
;; `gnus-cite-prefix-alist' containing the oldest prefix for each
- ;; line that appears at least gnus-cite-minimum-match-count
+ ;; line that appears at least `gnus-cite-minimum-match-count'
;; times. First sort them by length. Longer is older.
(setq alist (sort alist (lambda (a b)
(> (length (car a)) (length (car b))))))
(gnus-summary-display-article article)
(when article-window
(gnus-eval-in-buffer-window gnus-article-buffer
- (setq endp (gnus-article-next-page lines)))
+ (setq endp (or (gnus-article-next-page lines)
+ (gnus-article-only-boring-p))))
(when endp
(cond (stop
(gnus-message 3 "End of message"))
(defun spam-mark-spam-as-expired-and-move-routine (&optional group)
(let ((articles gnus-newsgroup-articles)
- article)
- (while articles
- (setq article (pop articles))
+ article tomove)
+ (dolist (article articles)
+ (gnus-summary-remove-process-mark article)
(when (eq (gnus-summary-article-mark article) gnus-spam-mark)
(gnus-summary-mark-article article gnus-expirable-mark)
- (when (stringp group)
- (gnus-summary-set-process-mark article)
- (gnus-summary-move-article nil group))))))
+ (push article tomove)))
+
+ ;; now do the actual move
+ (when (stringp group)
+ (dolist (article tomove)
+ (gnus-summary-set-process-mark article))
+ (gnus-summary-move-article nil group))))
(defun spam-ham-move-routine (&optional group)
(let ((articles gnus-newsgroup-articles)
- article ham-mark-values mark)
-
- (dolist (mark spam-ham-marks)
- (push (symbol-value mark) ham-mark-values))
- (dolist (article articles)
- (when (and (memq (gnus-summary-article-mark article) ham-mark-values)
- (stringp group))
- (gnus-summary-set-process-mark article)
- (gnus-summary-move-article nil group)))))
+ article ham-mark-values mark tomove)
+ (when (stringp group) ; this routine will do nothing
+ ; without a valid group
+ (dolist (mark spam-ham-marks)
+ (push (symbol-value mark) ham-mark-values))
+ (dolist (article articles)
+ (gnus-summary-remove-process-mark article)
+ (when (memq (gnus-summary-article-mark article) ham-mark-values)
+ (push article tomove)))
+
+ ;; now do the actual move
+ (dolist (article tomove)
+ (gnus-summary-set-process-mark article))
+ (gnus-summary-move-article nil group))))
(defun spam-generic-register-routine (spam-func ham-func)
(let ((articles gnus-newsgroup-articles)
+2003-02-12 Michael Shields <shields@msrl.com>
+
+ * gnus.texi (Paging the Article): Document
+ gnus-article-boring-faces.
+ (Choosing Commands): Explain that SPACE in the summary buffer
+ is used for both selecting and scrolling.
+
+ * gnus.texi (Article Keymap): Say that SPACE and DEL in the
+ summary buffer are the same as switching to the article buffer
+ and using SPACE and DEL; since now that is the case.
+
2003-02-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Topic Commands): Addition.
\e$B8=:_$N5-;v$+!"$=$l$,4{$KFI$^$l$F$$$k>l9g$O<!$NL$FI5-;v$rA*Br$7$^\e(B
\e$B$9\e(B (@code{gnus-summary-next-page})\e$B!#\e(B
+\e$B$9$G$K5-;v%&%#%s%I%&$r3+$$$F$$$k$H$-$K:FEY\e(B @kbd{SPACE} \e$B$r2!$9$H!"$=$N5-\e(B
+\e$B;v$O%9%/%m!<%k$5$l$^$9!#%K%e!<%9%0%k!<%WA4BN$r\e(B @kbd{SPACE} \e$B$GJXMx$KDLFI\e(B
+\e$B$G$-$^$9!#\e(B@pxref{Paging the Article}\e$B!#\e(B
+
@item G n
@itemx n
@kindex n (\e$B35N,\e(B)
@kbd{SPACE} \e$B$O5-;v$r0l%Z!<%8@h$K%9%/%m!<%k$7$^$9!#5-;v$N:G8e$K$$$k>l9g$O\e(B
\e$B<!$N5-;v$rA*Br$7$^$9\e(B (@code{gnus-summary-next-page})\e$B!#\e(B
+@vindex gnus-article-boring-faces
+\e$B5-;v$N;D$j$K0zMQ$H=pL>$7$+L5$$>l9g!"$=$l$O%9%-%C%W$5$l!"Be$o$j$K<!$N5-;v\e(B
+\e$B$,I=<($5$l$^$9!#\e(B@code{gnus-article-boring-faces} \e$B$G!"$D$^$i$J$$$H;W$&$b\e(B
+\e$B$N$r%+%9%?%^%$%:$9$k$+!"$^$?$O\e(B @code{nil} \e$B$K@_Dj$9$k$3$H$K$h$C$F!"$3$N5!\e(B
+\e$BG=$rF/$+$J$$$h$&$K$9$k$3$H$,$G$-$^$9!#$I$s$J$K$&$s$6$j$9$k$b$N$G$b!"5-;v\e(B
+\e$B%P%C%U%!$G\e(B @kbd{C-v} \e$B$r;H$&$3$H$K$h$C$F!"<jF0$G5-;v$N%Z!<%8$r8+$k$3$H$O\e(B
+\e$B$G$-$^$9!#\e(B
+
@item DEL
@kindex DEL (\e$B35N,\e(B)
@findex gnus-summary-prev-page
@item SPACE
@kindex SPACE (\e$B5-;v\e(B)
@findex gnus-article-next-page
-\e$B0lJGA0$K$a$/$j$^$9\e(B (@code{gnus-article-next-page})\e$B!#\e(B
+\e$B0lJGA0$K$a$/$j$^$9\e(B (@code{gnus-article-next-page})\e$B!#\e(B@kbd{h SPACE h} \e$B$H$^$C\e(B
+\e$B$?$/F1$8$G$9!#\e(B
@item DEL
@kindex DEL (\e$B5-;v\e(B)
@findex gnus-article-prev-page
-\e$B0lJG8e$m$KLa$7$^$9\e(B (@code{gnus-article-prev-page})\e$B!#\e(B
+\e$B0lJG8e$m$KLa$7$^$9\e(B (@code{gnus-article-prev-page})\e$B!#\e(B@kbd{h DEL h} \e$B$H$^$C\e(B
+\e$B$?$/F1$8$G$9!#\e(B
@item C-c ^
@kindex C-c ^ (\e$B5-;v\e(B)
Select the current article, or, if that one's read already, the next
unread article (@code{gnus-summary-next-page}).
+If you have an article window open already and you press @kbd{SPACE}
+again, the article will be scrolled. This lets you conveniently
+@kbd{SPACE} through an entire newsgroup. @pxref{Paging the Article}.
+
@item G n
@itemx n
@kindex n (Summary)
or, if you have come to the end of the current article, will choose the
next article (@code{gnus-summary-next-page}).
+@vindex gnus-article-boring-faces
+If the rest of the article consists only of citations and signature,
+then it will be skipped; the next article will be shown instead. You
+can customize what is considered uninteresting with
+@code{gnus-article-boring-faces}, or set it to @code{nil} to disable
+this feature. You can manually view the article's pages, no matter how
+boring, using @kbd{C-v} in the article buffer.
+
@item DEL
@kindex DEL (Summary)
@findex gnus-summary-prev-page
@kindex SPACE (Article)
@findex gnus-article-next-page
Scroll forwards one page (@code{gnus-article-next-page}).
+This is exactly the same as @kbd{h SPACE h}.
@item DEL
@kindex DEL (Article)
@findex gnus-article-prev-page
Scroll backwards one page (@code{gnus-article-prev-page}).
+This is exactly the same as @kbd{h DEL h}.
@item C-c ^
@kindex C-c ^ (Article)