(gnus-uu-mark-by-regexp): Use it.
(gnus-new-processable): New function.
+2000-12-28 19:44:56 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-uu.el (gnus-message-process-mark): New function.
+ (gnus-uu-mark-by-regexp): Use it.
+ (gnus-new-processable): New function.
+
+2000-12-28 19:21:57 Inge Frick <inge@nada.kth.se>
+
+ * gnus-sum.el (gnus-no-mark): New variable.
+
+2000-11-01 01:12:29 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * nnwfm.el (nnwfm-create-mapping): Remove quote marks and
+ backslashes.
+
2000-12-26 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-article-banner-alist): Remove duplicate
?. ?_)))
;; Translate the first colon into a slash.
(when (string-match ":" group)
- (aset group (match-beginning 0) ?/))
+ (setq group (concat (substring group 0 (match-beginning 0))
+ "/" (substring group (match-end 0)))))
(nnheader-replace-chars-in-string group ?. ?/)))
t)
gnus-cache-directory))))
:group 'gnus-summary-marks
:type 'character)
+(defcustom gnus-no-mark ? ;Whitespace
+ "*Mark used for articles that have no other secondary mark."
+ :group 'gnus-summary-marks
+ :type 'character)
+
(defcustom gnus-ancient-mark ?O
"*Mark used for ancient articles."
:group 'gnus-summary-marks
(gnus-tmp-replied gnus-replied-mark)
((memq gnus-tmp-current gnus-newsgroup-saved)
gnus-saved-mark)
- (t gnus-unread-mark)))
+ (t gnus-no-mark)))
(gnus-tmp-from (mail-header-from gnus-tmp-header))
(gnus-tmp-name
(cond
gnus-replied-mark)
((memq number gnus-newsgroup-saved)
gnus-saved-mark)
- (t gnus-unread-mark))
+ (t gnus-no-mark))
gnus-tmp-from (mail-header-from gnus-tmp-header)
gnus-tmp-name
(cond
gnus-replied-mark)
((memq article gnus-newsgroup-saved)
gnus-saved-mark)
- (t gnus-unread-mark))
+ (t gnus-no-mark))
'replied)
(when (gnus-visual-p 'summary-highlight 'highlight)
(gnus-run-hooks 'gnus-summary-update-hook))
(gnus-read-mark-p mark))
(gnus-summary-mark-article gnus-current-article gnus-read-mark))))
+(defun gnus-summary-mark-unread-as-ticked ()
+ "Intended to be used by `gnus-summary-mark-article-hook'."
+ (when (memq gnus-current-article gnus-newsgroup-unreads)
+ (gnus-summary-mark-article gnus-current-article gnus-ticked-mark)))
+
(defun gnus-summary-mark-region-as-read (point mark all)
"Mark all unread articles between point and mark as read.
If given a prefix, mark all articles between point and mark as read,
(delete-char 1))
(goto-char (next-single-property-change (point) prop nil (point-max))))))
+(require 'nnheader)
(defun gnus-newsgroup-directory-form (newsgroup)
"Make hierarchical directory name from NEWSGROUP name."
- (let ((newsgroup (gnus-newsgroup-savable-name newsgroup))
- (len (length newsgroup))
- idx)
- ;; If this is a foreign group, we don't want to translate the
- ;; entire name.
- (if (setq idx (string-match ":" newsgroup))
- (aset newsgroup idx ?/)
- (setq idx 0))
- ;; Replace all occurrences of `.' with `/'.
- (while (< idx len)
- (when (= (aref newsgroup idx) ?.)
- (aset newsgroup idx ?/))
- (setq idx (1+ idx)))
- newsgroup))
+ (let* ((newsgroup (gnus-newsgroup-savable-name newsgroup))
+ (idx (string-match ":" newsgroup)))
+ (concat
+ (if idx (substring newsgroup 0 idx))
+ (if idx "/")
+ (nnheader-replace-chars-in-string
+ (if idx (substring newsgroup (1+ idx)) newsgroup)
+ ?. ?/))))
(defun gnus-newsgroup-savable-name (group)
;; Replace any slashes in a group name (eg. an ange-ftp nndoc group)
;; Process marking.
+(defun gnus-message-process-mark (unmarkp new-marked)
+ (let ((old (- (length gnus-newsgroup-processable) (length new-marked))))
+ (message "%d mark%s %s%s"
+ (length new-marked)
+ (if (= (length new-marked) 1) "" "s")
+ (if unmarkp "removed" "added")
+ (cond
+ ((and (zerop old)
+ (not unmarkp))
+ "")
+ (unmarkp
+ (format ", %d remain marked"
+ (length gnus-newsgroup-processable)))
+ (t
+ (format ", %d already marked" old))))))
+
+(defun gnus-new-processable (unmarkp articles)
+ (if unmarkp
+ (gnus-intersection gnus-newsgroup-processable articles)
+ (gnus-set-difference articles gnus-newsgroup-processable)))
+
(defun gnus-uu-mark-by-regexp (regexp &optional unmark)
"Set the process mark on articles whose subjects match REGEXP.
When called interactively, prompt for REGEXP.
Optional UNMARK non-nil means unmark instead of mark."
(interactive "sMark (regexp): \nP")
- (let ((articles (gnus-uu-find-articles-matching regexp)))
- (while articles
- (if unmark
- (gnus-summary-remove-process-mark (pop articles))
- (gnus-summary-set-process-mark (pop articles))))
- (message ""))
+ (save-excursion
+ (let* ((articles (gnus-uu-find-articles-matching regexp))
+ (new-marked (gnus-new-processable unmark articles)))
+ (while articles
+ (if unmark
+ (gnus-summary-remove-process-mark (pop articles))
+ (gnus-summary-set-process-mark (pop articles))))
+ (gnus-message-process-mark unmark new-marked)))
(gnus-summary-position-point))
(defun gnus-uu-unmark-by-regexp (regexp)
(format "Item.asp?GroupID=%d&ThreadID=%d" sid
thread-id)))
(goto-char (point-min))
- (setq contents
- (ignore-errors (w3-parse-buffer (current-buffer))))
- (setq tables (caddar (caddar (cdr (caddar (caddar contents))))))
+ (setq tables (caddar
+ (caddar
+ (cdr (caddar
+ (caddar
+ (ignore-errors
+ (w3-parse-buffer (current-buffer)))))))))
(setq tables (cdr (caddar (memq (assq 'div tables) tables))))
(setq contents nil)
(dolist (table tables)
- (setq table (caddar (caddar (caddr table)))
- hstuff (delete ":link" (nnweb-text (car table)))
- bstuff (car (caddar (cdr table)))
- from (car hstuff))
- (when (nth 2 hstuff)
- (setq time (nnwfm-date-to-time (nth 2 hstuff)))
- (push (list from time bstuff) contents)))
+ (when (eq (car table) 'table)
+ (setq table (caddar (caddar (caddr table)))
+ hstuff (delete ":link" (nnweb-text (car table)))
+ bstuff (car (caddar (cdr table)))
+ from (car hstuff))
+ (when (nth 2 hstuff)
+ (setq time (nnwfm-date-to-time (nth 2 hstuff)))
+ (push (list from time bstuff) contents))))
(setq contents (nreverse contents))
(dolist (art (cdr elem))
(push (list (car art)
(while (re-search-forward " wr(" nil t)
(forward-char -1)
(setq elem (message-tokenize-header
- (buffer-substring
- (1+ (point))
- (progn
- (forward-sexp 1)
- (1- (point))))))
+ (nnweb-replace-in-string
+ (buffer-substring
+ (1+ (point))
+ (progn
+ (forward-sexp 1)
+ (1- (point))))
+ "\\\\[\"\\\\]" "")))
(push (list
(string-to-number (nth 1 elem))
(nnweb-replace-in-string (nth 2 elem) "\"" "")