* gnus-uu.el (gnus-message-process-mark): New function.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 28 Dec 2000 17:44:21 +0000 (17:44 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 28 Dec 2000 17:44:21 +0000 (17:44 +0000)
(gnus-uu-mark-by-regexp): Use it.
(gnus-new-processable): New function.

lisp/ChangeLog
lisp/gnus-cache.el
lisp/gnus-sum.el
lisp/gnus-util.el
lisp/gnus-uu.el
lisp/nnwfm.el

index a71c0eb..9ab440f 100644 (file)
@@ -1,3 +1,18 @@
+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
index 293ea35..4916331 100644 (file)
@@ -422,7 +422,8 @@ Returns the list of articles removed."
                      ?. ?_)))
          ;; 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))))
index 137b1a3..25300a1 100644 (file)
@@ -430,6 +430,11 @@ this variable specifies group names."
   :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
@@ -2795,7 +2800,7 @@ buffer that was in action when the last article was fetched."
                (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
@@ -4163,7 +4168,7 @@ or a straight list of headers."
                    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
@@ -8526,7 +8531,7 @@ Iff NO-EXPIRE, auto-expiry will be inhibited."
          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))
@@ -8670,6 +8675,11 @@ The difference between N and the number of marks cleared is returned."
              (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,
index 898b38d..2360ba0 100644 (file)
        (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)
index fcf4d4c..3705a6c 100644 (file)
@@ -574,17 +574,40 @@ didn't work, and overwrite existing files.  Otherwise, ask each time."
 
 ;; 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)
index 5ec1a06..130c689 100644 (file)
                     (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) "\"" "")