* gnus-sum.el (gnus-summary-goto-subject): Error on non-numerical
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 19 Jan 2002 22:00:42 +0000 (22:00 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 19 Jan 2002 22:00:42 +0000 (22:00 +0000)
articles.

* gnus-util.el (gnus-completing-read-with-default): Renamed.

* nnmail.el (nnmail-article-group): Clean up.

lisp/ChangeLog
lisp/gnus-agent.el
lisp/gnus-fun.el
lisp/gnus-score.el
lisp/gnus-sum.el
lisp/gnus-topic.el
lisp/gnus-util.el
lisp/mml-smime.el
lisp/nnmail.el

index 7403424..9864b2e 100644 (file)
@@ -1,3 +1,22 @@
+2002-01-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-sum.el (gnus-summary-goto-subject): Error on non-numerical
+       articles. 
+
+       * gnus-util.el (gnus-completing-read-with-default): Renamed.
+
+       * nnmail.el (nnmail-article-group): Clean up.
+
+2002-01-19  Paul Stodghill  <stodghil@cs.cornell.edu>
+
+       * gnus-agent.el (gnus-category-name): Intern the category name. 
+
+2002-01-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-topic.el (gnus-topic-move-group): Use gnus-topic-history.
+
+       * gnus-util.el (gnus-completing-read): New function.
+
 2002-01-19  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-art.el (gnus-add-wash-type): Use add-to-list.
index 0118311..ef85946 100644 (file)
@@ -1409,7 +1409,7 @@ The following commands are available:
     (gnus-category-position-point)))
 
 (defun gnus-category-name ()
-  (or (get-text-property (gnus-point-at-bol) 'gnus-category)
+  (or (intern (get-text-property (gnus-point-at-bol) 'gnus-category))
       (error "No category on the current line")))
 
 (defun gnus-category-read ()
index 851e136..000a26c 100644 (file)
@@ -201,7 +201,7 @@ colors of the displayed X-Faces."
     (setq file (car file))
     (with-temp-buffer
       (shell-command
-       (format "pnmcut -left 110 -top 60 -width 144 -height 144 '%s' | ppmnorm 2>/dev/null | pnmscale -width 48 | ppmtopgm | pgmtopbm -threshold -value 0.92 | pbmtoxbm | compface"
+       (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | ppmnorm 2>/dev/null | pnmscale -width 48 | ppmtopgm | pgmtopbm -threshold -value 0.92 | pbmtoxbm | compface"
               file)
        (current-buffer))
       ;;(sleep-for 3)
index 6822597..a10fb63 100644 (file)
@@ -643,7 +643,7 @@ used as score."
          (and gnus-extra-headers
               (equal (nth 1 entry) "extra")
               (intern                  ; need symbol
-               (gnus-completing-read
+               (gnus-completing-read-with-default
                 (symbol-name (car gnus-extra-headers)) ; default response
                 "Score extra header:"  ; prompt
                 (mapcar (lambda (x)    ; completion list
index d06ee42..e48cf6f 100644 (file)
@@ -6448,6 +6448,8 @@ If optional argument UNREAD is non-nil, only unread article is selected."
   "Go the subject line of ARTICLE.
 If FORCE, also allow jumping to articles not currently shown."
   (interactive "nArticle number: ")
+  (unless (numberp article)
+    (error "Article %s is not a number" article))
   (let ((b (point))
        (data (gnus-data-find article)))
     ;; We read in the article if we have to.
@@ -7061,7 +7063,7 @@ articles that are younger than AGE days."
   (interactive
    (let ((header
          (intern
-          (gnus-completing-read
+          (gnus-completing-read-with-default
            (symbol-name (car gnus-extra-headers))
            (if current-prefix-arg
                "Exclude extra header:"
@@ -8456,7 +8458,7 @@ latter case, they will be copied into the relevant groups."
                                  (car (gnus-find-method-for-group
                                        gnus-newsgroup-name)))))
                (method
-                (gnus-completing-read
+                (gnus-completing-read-with-default
                  methname "What backend do you want to use when respooling?"
                  methods nil t nil 'gnus-mail-method-history))
                ms)
@@ -10203,23 +10205,26 @@ save those articles instead."
         (to-newsgroup
          (cond
           ((null split-name)
-           (gnus-completing-read default prom
-                                 gnus-active-hashtb
-                                 'gnus-valid-move-group-p
-                                 nil prefix
-                                 'gnus-group-history))
+           (gnus-completing-read-with-default
+            default prom
+            gnus-active-hashtb
+            'gnus-valid-move-group-p
+            nil prefix
+            'gnus-group-history))
           ((= 1 (length split-name))
-           (gnus-completing-read (car split-name) prom
-                                 gnus-active-hashtb
-                                 'gnus-valid-move-group-p
-                                 nil nil
-                                 'gnus-group-history))
+           (gnus-completing-read-with-default
+            (car split-name) prom
+            gnus-active-hashtb
+            'gnus-valid-move-group-p
+            nil nil
+            'gnus-group-history))
           (t
-           (gnus-completing-read nil prom
-                                 (mapcar (lambda (el) (list el))
-                                         (nreverse split-name))
-                                 nil nil nil
-                                 'gnus-group-history))))
+           (gnus-completing-read-with-default
+            nil prom
+            (mapcar (lambda (el) (list el))
+                    (nreverse split-name))
+            nil nil nil
+            'gnus-group-history))))
         (to-method (gnus-server-to-method (gnus-group-method to-newsgroup))))
     (when to-newsgroup
       (if (or (string= to-newsgroup "")
index 85cbd24..b3aba20 100644 (file)
@@ -1254,7 +1254,8 @@ When used interactively, PARENT will be the topic under point."
 If COPYP, copy the groups instead."
   (interactive
    (list current-prefix-arg
-        (completing-read "Move to topic: " gnus-topic-alist nil t)))
+        (gnus-completing-read "Move to topic" gnus-topic-alist nil t
+                              'gnus-topic-history)))
   (let ((use-marked (and (not n) (not (gnus-region-active-p))
                         gnus-group-marked t))
        (groups (gnus-group-process-prefix n))
index b127fa2..1213225 100644 (file)
          (define-key keymap key (pop plist))
        (pop plist)))))
 
-(defun gnus-completing-read (default prompt &rest args)
+(defun gnus-completing-read-with-default (default prompt &rest args)
   ;; Like `completing-read', except that DEFAULT is the default argument.
   (let* ((prompt (if default
                     (concat prompt " (default " default ") ")
@@ -1237,6 +1237,23 @@ SPEC is a predicate specifier that contains stuff like `or', `and',
    (t
     (list 'local-map map))))
 
+(defun gnus-completing-read (prompt table &optional predicate require-match
+                                   history inherit-input-method)
+  (when (and history
+            (not (boundp history)))
+    (set history nil))
+  (completing-read
+   (if (symbol-value history)
+       (concat prompt " (" (car (symbol-value history)) "): ")
+     (concat prompt ": "))
+   table
+   predicate
+   require-match
+   nil
+   history
+   (car (symbol-value history))
+   inherit-input-method))
+
 (provide 'gnus-util)
 
 ;;; gnus-util.el ends here
index ac87492..d5baf3f 100644 (file)
   ;; todo: try dns/ldap automatically first, before prompting user
   (let (certs done)
     (while (not done)
-      (ecase (read (gnus-completing-read "dns" "Fetch certificate from"
-                                        '(("dns") ("file")) nil t))
+      (ecase (read (gnus-completing-read-with-default
+                   "dns" "Fetch certificate from"
+                   '(("dns") ("file")) nil t))
        (dns (setq certs (append certs
                                 (mml-smime-get-dns-cert))))
        (file (setq certs (append certs
index f669d7d..334d37f 100644 (file)
@@ -1071,13 +1071,11 @@ FUNC will be called with the group name to determine the article number."
                                  (funcall func (car method)))))))))
        ;; Produce a trace if non-empty.
        (when (and trace nnmail-split-trace)
-         (let ((trace (nreverse nnmail-split-trace))
-               (restore (current-buffer)))
+         (let ((restore (current-buffer)))
            (nnheader-set-temp-buffer "*Split Trace*")
            (gnus-add-buffer)
-           (while trace
-             (insert (car trace) "\n")
-             (setq trace (cdr trace)))
+           (dolist (trace (nreverse nnmail-split-trace))
+             (insert trace "\n"))
            (goto-char (point-min))
            (gnus-configure-windows 'split-trace)
            (set-buffer restore)))