2003-01-02 Matthieu Moy <Matthieu.Moy@imag.fr>
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 2 Jan 2003 18:55:08 +0000 (18:55 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 2 Jan 2003 18:55:08 +0000 (18:55 +0000)
* message.el (message-check-news-header-syntax): Check syntax of
continuation headers.

2003-01-02  Reiner Steib  <Reiner.Steib@gmx.de>

* gnus-art.el (gnus-button-url-regexp,
(gnus-button-mid-or-mail-regexp, gnus-button-alist,
(gnus-header-button-alist): Regexps are case insensitive here.

2003-01-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>

* gnus-sum.el (gnus-summary-goto-subjects): New function.
(gnus-summary-insert-dormant-articles): New command and
keystroke.

* gnus-cache.el (gnus-summary-insert-cached-articles): Use new
function for mass insertion of subjects.

* nndraft.el (nndraft-generate-headers): Don't move point.

* gnus.el (nnheader): Require nnheader.

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-cache.el
lisp/gnus-group.el
lisp/gnus-sum.el
lisp/gnus.el
lisp/message.el
lisp/nndraft.el

index 7733e36..06b76d3 100644 (file)
@@ -1,3 +1,14 @@
+2003-01-02  Matthieu Moy  <Matthieu.Moy@imag.fr>
+
+       * message.el (message-check-news-header-syntax): Check syntax of
+       continuation headers.
+
+2003-01-02  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * gnus-art.el (gnus-button-url-regexp,
+       (gnus-button-mid-or-mail-regexp, gnus-button-alist,
+       (gnus-header-button-alist): Regexps are case insensitive here.
+
 2003-01-02  Simon Josefsson  <jas@extundo.com>
 
        * dig.el (query-dig): Doc fix.
@@ -9,6 +20,17 @@
 
 2003-01-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-sum.el (gnus-summary-goto-subjects): New function.
+       (gnus-summary-insert-dormant-articles): New command and
+       keystroke. 
+
+       * gnus-cache.el (gnus-summary-insert-cached-articles): Use new
+       function for mass insertion of subjects.
+
+       * nndraft.el (nndraft-generate-headers): Don't move point.
+
+       * gnus.el (nnheader): Require nnheader.
+
        * nndraft.el (nndraft-request-associate-buffer): Use
        make-local-variable.
 
index dcfdc5a..1122853 100644 (file)
@@ -5340,8 +5340,8 @@ groups."
 
 (defcustom gnus-button-url-regexp
   (if (string-match "[[:digit:]]" "1") ;; support POSIX?
-      "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,[:word:]]+[-a-zA-Z0-9_=#$@~`%&*+|\\/[:word:]]\\)"
-    "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?\\([-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,]\\|\\w\\)+\\([-a-zA-Z0-9_=#$@~`%&*+|\\/]\\|\\w\\)\\)")
+      "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-z0-9_.]+:[0-9]*\\)?[-a-z0-9_=!?#$@~`%&*+|\\/:;.,[:word:]]+[-a-z0-9_=#$@~`%&*+|\\/[:word:]]\\)"
+    "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-z0-9_.]+:[0-9]*\\)?\\([-a-z0-9_=!?#$@~`%&*+|\\/:;.,]\\|\\w\\)+\\([-a-z0-9_=#$@~`%&*+|\\/]\\|\\w\\)\\)")
   "Regular expression that matches URLs."
   :group 'gnus-article-buttons
   :type 'regexp)
@@ -5393,7 +5393,7 @@ The function must take one argument, the string naming the URL."
                 (regexp :tag "Other")))
 
 (defcustom gnus-button-mid-or-mail-regexp
-  (concat "\\b\\(<?[a-zA-Z0-9][^<>\")!;:,{}\n\t ]*@"
+  (concat "\\b\\(<?[a-z0-9][^<>\")!;:,{}\n\t ]*@"
          gnus-button-valid-fqdn-regexp
          ">?\\)\\b")
   "Regular expression that matches a message ID or a mail address."
@@ -5557,7 +5557,7 @@ positives are possible."
     ("\\bin\\( +article\\| +message\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2
      t gnus-button-message-id 3)
     ("\\(<URL: *\\)mailto: *\\([^> \n\t]+\\)>" 0 t gnus-url-mailto 2)
-    ("mailto:\\([-a-zA-Z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1)
+    ("mailto:\\([-a-z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1)
     ("\\bmailto:\\([^ \n\t]+\\)" 0 t gnus-url-mailto 1)
     ;; CTAN
     ("\\bCTAN:[ \t\n]*\\([^>)!;:,\n\t ]*\\)" 0 (>= gnus-button-tex-level 1)
@@ -5596,12 +5596,12 @@ positives are possible."
      (and (>= gnus-button-man-level 1) (< gnus-button-man-level 3))
      gnus-button-handle-man 1)
     ;; more man pages: resolv.conf(5), iso_8859-1(7), xterm(1x)
-    ("\\b\\([a-zA-Z][-_.a-zA-Z0-9]+\\)([1-9])\\W" 0
+    ("\\b\\([a-z][-_.a-z0-9]+\\)([1-9])\\W" 0
      (and (>= gnus-button-man-level 3) (< gnus-button-man-level 5))
      gnus-button-handle-man 1)
     ;; even more: Apache::PerlRun(3pm), PDL::IO::FastRaw(3pm),
     ;; SoWWWAnchor(3iv), XSelectInput(3X11)
-    ("\\b\\([a-zA-Z][-_.:a-zA-Z0-9]+\\)([1-9][X1a-z]*)\\W" 0
+    ("\\b\\([a-z][-_.:a-z0-9]+\\)([1-9][X1a-z]*)\\W" 0
      (>= gnus-button-man-level 5) gnus-button-handle-man 1)
     ;; MID or mail: To avoid too many false positives we don't try to catch
     ;; all kind of allowed MIDs or mail addresses.  Domain part must contain
@@ -5613,8 +5613,8 @@ positives are possible."
   "*Alist of regexps matching buttons in article bodies.
 
 Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where
-REGEXP: is the string matching text around the button (can also be lisp
-expression evaluating to a string),
+REGEXP: is the string (case insensitive) matching text around the button (can
+also be lisp expression evaluating to a string),
 BUTTON: is the number of the regexp grouping actually matching the button,
 FORM: is a lisp expression which must eval to true for the button to
 be added,
@@ -5641,7 +5641,7 @@ variable it the real callback function."
     ("^X-[Uu][Rr][Ll]:" gnus-button-url-regexp 0 t browse-url 0)
     ("^Subject:" gnus-button-url-regexp 0 t browse-url 0)
     ("^[^:]+:" gnus-button-url-regexp 0 t browse-url 0)
-    ("^[^:]+:" "\\bmailto:\\([-a-zA-Z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1)
+    ("^[^:]+:" "\\bmailto:\\([-a-z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1)
     ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)" 1 t
      gnus-button-message-id 3))
   "*Alist of headers and regexps to match buttons in article heads.
index 6b7a9f9..a0763f3 100644 (file)
@@ -363,15 +363,10 @@ Returns the list of articles removed."
 (defun gnus-summary-insert-cached-articles ()
   "Insert all the articles cached for this group into the current buffer."
   (interactive)
-  (let ((cached gnus-newsgroup-cached)
-       (gnus-verbose (max 6 gnus-verbose)))
-    (if (not cached)
+  (let ((gnus-verbose (max 6 gnus-verbose)))
+    (if (not gnus-newsgroup-cached)
        (gnus-message 3 "No cached articles for this group")
-      (save-excursion
-       (while cached
-         (gnus-summary-goto-subject (pop cached) t)))
-      (gnus-summary-limit (append gnus-newsgroup-cached gnus-newsgroup-limit))
-      (gnus-summary-position-point))))
+      (gnus-summary-goto-subjects gnus-newsgroup-cached))))
 
 (defun gnus-summary-limit-include-cached ()
   "Limit the summary buffer to articles that are cached."
index a4d1ea1..7270515 100644 (file)
@@ -4123,8 +4123,7 @@ This command may read the active file."
              (setq gnus-newsgroup-unselected
                    (nreverse gnus-newsgroup-unselected)))))
       (gnus-activate-group group)
-      (gnus-group-make-articles-read group
-                                    (list article))
+      (gnus-group-make-articles-read group (list article))
       (when (gnus-group-auto-expirable-p group)
        (gnus-add-marked-articles
         group 'expire (list article))))))
index 572c719..5017beb 100644 (file)
@@ -1715,7 +1715,8 @@ increase the score of each group you read."
 
   (gnus-define-keys (gnus-summary-buffer-map "Y" gnus-summary-mode-map)
     "g" gnus-summary-prepare
-    "c" gnus-summary-insert-cached-articles)
+    "c" gnus-summary-insert-cached-articles
+    "d" gnus-summary-insert-dormant-articles)
 
   (gnus-define-keys (gnus-summary-exit-map "Z" gnus-summary-mode-map)
     "c" gnus-summary-catchup-and-exit
@@ -2358,6 +2359,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
        ("Regeneration"
         ["Regenerate" gnus-summary-prepare t]
         ["Insert cached articles" gnus-summary-insert-cached-articles t]
+        ["Insert dormant articles" gnus-summary-insert-dormant-articles t]
         ["Toggle threading" gnus-summary-toggle-threads t])
        ["See old articles" gnus-summary-insert-old-articles t]
        ["See new articles" gnus-summary-insert-new-articles t]
@@ -6727,6 +6729,14 @@ If optional argument UNREAD is non-nil, only unread article is selected."
   (interactive "p")
   (gnus-summary-next-subject (- n) t))
 
+(defun gnus-summary-goto-subjects (articles)
+  "Insert the subject header for ARTICLES in the current buffer."
+  (save-excursion
+    (dolist (article articles)
+      (gnus-summary-goto-subject articles t)))
+  (gnus-summary-limit (append articles gnus-newsgroup-limit))
+  (gnus-summary-position-point))
+  
 (defun gnus-summary-goto-subject (article &optional force silent)
   "Go the subject line of ARTICLE.
 If FORCE, also allow jumping to articles not currently shown."
@@ -7497,6 +7507,14 @@ article."
        (gnus-summary-limit (nconc articles gnus-newsgroup-limit))
       (gnus-summary-position-point))))
 
+(defun gnus-summary-insert-dormant-articles ()
+  "Insert all the dormat articles for this group into the current buffer."
+  (interactive)
+  (let ((gnus-verbose (max 6 gnus-verbose)))
+    (if (not gnus-newsgroup-dormant)
+       (gnus-message 3 "No cached articles for this group")
+      (gnus-summary-goto-subjects gnus-newsgroup-dormant))))
+
 (defun gnus-summary-limit-include-dormant ()
   "Display all the hidden articles that are marked as dormant.
 Note that this command only works on a subset of the articles currently
index f5ffcfb..94e7dc5 100644 (file)
@@ -33,6 +33,7 @@
 (eval-when-compile (require 'cl))
 (require 'wid-edit)
 (require 'mm-util)
+(require 'nnheader)
 
 ;; Make sure it was the right mm-util.
 (unless (fboundp 'mm-guess-mime-charset)
index bfe4f88..d866024 100644 (file)
@@ -188,7 +188,8 @@ Checks include `subject-cmsg', `multiple-headers', `sendsys',
 `new-text', `quoting-style', `redirected-followup', `signature',
 `approved', `sender', `empty', `empty-headers', `message-id', `from',
 `subject', `shorten-followup-to', `existing-newsgroups',
-`buffer-file-name', `unchanged', `newsgroups', `reply-to'."
+`buffer-file-name', `unchanged', `newsgroups', `reply-to',
+'continuation-headers'."
   :group 'message-news
   :type '(repeat sexp))                        ; Fixme: improve this
 
@@ -3903,6 +3904,18 @@ Otherwise, generate and save a value for `canlock-password' first."
           (if (= (length errors) 1) "this" "these")
           (if (= (length errors) 1) "" "s")
           (mapconcat 'identity errors ", ")))))))
+   ;; Check continuation headers.
+   (message-check 'continuation-headers
+     (goto-char (point-min))
+     (while (re-search-forward "^[^ \\n][^:\\n]*$" nil t)
+       (if (y-or-n-p "You have line in your headers without : and not \
+beginning by a continuation caracter. Add one ?")
+            (progn
+              (goto-char (match-beginning 0))
+              (insert " "))
+          (if (y-or-n-p "Send anyway ?")
+              t
+            nil))))
    ;; Check the Newsgroups & Followup-To headers for syntax errors.
    (message-check 'valid-newsgroups
      (let ((case-fold-search t)
index f2a4f4f..56c0120 100644 (file)
   t)
 
 (defun nndraft-generate-headers ()
-  (message-generate-headers
-   (message-headers-to-generate
-    message-required-headers message-draft-headers nil)))
+  (save-excursion
+    (message-generate-headers
+     (message-headers-to-generate
+      message-required-headers message-draft-headers nil))))
 
 (deffoo nndraft-request-associate-buffer (group)
   "Associate the current buffer with some article in the draft group."