From: yamaoka Date: Fri, 3 Jan 2003 00:36:48 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_10-00-quimby~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=035f67adb5933687d7af7277ec569c2cd6dcc412;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5d84bcf..cce5b84 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,100 @@ +2003-01-03 Lars Magne Ingebrigtsen + + * gnus-msg.el (gnus-setup-message): Get the evaliation order + right. + (gnus-inews-make-draft): New function. + (gnus-setup-message): Use it. + + * message.el (message-required-headers): Add From. + +2003-01-02 Katsumi Yamaoka + Trivial patch from Norbert Koch . + + * gnus-msg.el (gnus-gcc-externalize-attachments): Fix typo. + +2003-01-02 Lars Magne Ingebrigtsen + + * message.el (message-generate-headers): Let header formatters do + their work. + +2003-01-02 Raymond Scholz + + * deuglify.el (gnus-article-outlook-deuglify-article): + Rehighlight, reapply treatments and call + `gnus-article-prepare-hook'. Suggested by Niels Olof Bouvin. + (gnus-outlook-repair-attribution-block): Recognize cited + attributions. Suggested by Niklas Morberg. + +2003-01-02 Pete Kazmier + + * gnus-art.el (gnus-treat-predicate): Check condition first. + +2003-01-02 Jesper Harder + + * lpath.el: Add url-http-file-exists-p. + + * gnus-group.el (gnus-group-fetch-charter): Use + http://TLH.news-admin.org/charters/GROUPNAME as a fallback. + 2003-01-02 Lars Magne Ingebrigtsen + * message.el (message-draft-headers): Also generate From to get a + nicer draft buffer summary. + + * gnus-xmas.el (gnus-xmas-read-event-char): Take an optional + parameter. + + * gnus-art.el (article-wash-html): Clean up. + (article-wash-html): Typo fix. + + * gnus-msg.el (gnus-summary-mail-forward): Clean up. + (gnus-summary-mail-forward): To many lists of lists. + + * gnus-art.el (article-wash-html): Clean up. + +2003-01-02 pete-temp + + * gnus-art.el (gnus-treat-wash-html): New variable. + +2003-01-02 Lars Magne Ingebrigtsen + + * message.el (message-check-news-header-syntax): Allow posting. + (message-check-news-header-syntax): Fix logic for sure, this + time. + +2003-01-02 Matthieu Moy + + * message.el (message-check-news-header-syntax): Check syntax of + continuation headers. + +2003-01-02 Reiner Steib + + * 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 + + * dig.el (query-dig): Doc fix. + +2003-01-02 Kai Gro,A_(Bjohann + + * gnus-agent.el (gnus-agent-fetch-selected-article): Update whole + summary buffer line, not just the download mark. + +2003-01-02 Lars Magne Ingebrigtsen + + * 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. @@ -11,17 +106,17 @@ 2003-01-02 Lars Magne Ingebrigtsen * gnus.el (gnus-group-parameter-value): Take an extra param. - (gnus-group-fast-parameter): Let group param results be nil. + (gnus-group-fast-parameter): Let group param results be nil. * gnus-art.el (gnus-article-forward-header): New function. - (article-date-ut): Use it to remove continuation date headers. + (article-date-ut): Use it to remove continuation date headers. * gnus-sum.el (gnus-summary-walk-group-buffer): Supply prompt to - read-event. + read-event. (gnus-summary-remove-bookmark): Clean up. (gnus-summary-set-bookmark): Clean up. - * gnus-util.el (gnus-read-event-char): Take an optional prompt. + * gnus-util.el (gnus-read-event-char): Take an optional prompt. * gnus.el (gnus-group-startup-message): Bind data-directory to the Gnus etc directory. @@ -104,7 +199,7 @@ * gnus-sum.el (gnus-summary-display-while-building): New variable. -2002-01-01 Raymond Scholz +2003-01-01 Raymond Scholz * deuglify.el (gnus-outlook-rearrange-article): Kill overlays before rearranging the article. diff --git a/lisp/deuglify.el b/lisp/deuglify.el index 65951c4..d78c251 100644 --- a/lisp/deuglify.el +++ b/lisp/deuglify.el @@ -310,18 +310,26 @@ length of an unwrapped citation line." (replace-match "\\1\\2 \\3") (goto-char (match-beginning 0)))))))))) -(defun gnus-outlook-rearrange-article (from-where) - "Put the text from `from-where' to the end of buffer at the top of the article buffer." +(defun gnus-outlook-rearrange-article (attr-start) + "Put the text from `attr-start' to the end of buffer at the top of the article buffer." (save-excursion (let ((inhibit-read-only t) (cite-marks gnus-outlook-deuglify-cite-marks)) (gnus-with-article-buffer (article-goto-body) - ;; attribution out of place? - (unless (= (point) from-where) + ;; article does not start with attribution + (unless (= (point) attr-start) (gnus-kill-all-overlays) - (transpose-regions (point) (+ from-where 1) - (+ from-where 1) (point-max))))))) + (let ((cur (point)) + ;; before signature or end of buffer + (to (if (gnus-article-search-signature) + (point) + (point-max)))) + ;; handle the case where the full quote is below the + ;; signature + (if (< to attr-start) + (setq to (point-max))) + (transpose-regions cur attr-start attr-start to))))))) ;; John Doe wrote in message ;; news:a87usw8$dklsssa$2@some.news.server... @@ -361,15 +369,13 @@ length of an unwrapped citation line." (gnus-with-article-buffer (article-goto-body) (if (re-search-forward - (concat "^----* ?[^-]+ ?----*\n" - "[^\n]+: \\([^\n]+\\)\n" - "[^\n]+: [^\n]+\n" - "[^\n]+: [^\n]+\n" - "[^\n]+: [^\n]+$") + (concat "^[" cite-marks " \t]*----* ?[^-]+ [^-]+ ?----*\n" + "[^\n:]+:[ \t]*\\([^\n]+\\)\n" + "\\([^\n:]+:[ \t]*[^\n]+\n\\)+") nil t) (progn (gnus-kill-all-overlays) - (replace-match "\\1 wrote:") + (replace-match "\\1 wrote:\n") (match-beginning 0))))))) ;; On Wed, 16 Jan 2002 23:23:30 +0100, John Doe wrote: @@ -426,7 +432,13 @@ length of an unwrapped citation line." (interactive) (gnus-outlook-deuglify-article) (with-current-buffer (or gnus-article-buffer (current-buffer)) - (gnus-article-highlight t))) + ;; "Emulate" `gnus-article-prepare-display' without calling + ;; it. Calling `gnus-article-prepare-display' on an already + ;; prepared article removes all MIME parts. I'm unsure whether + ;; this is a bug or not. + (gnus-article-highlight t) + (gnus-treat-article nil) + (gnus-run-hooks 'gnus-article-prepare-hook))) (provide 'deuglify) diff --git a/lisp/dig.el b/lisp/dig.el index b13b7af..ae6a6ef 100644 --- a/lisp/dig.el +++ b/lisp/dig.el @@ -170,10 +170,13 @@ Optional arguments are passed to `dig-invoke'." ;; named for consistency with query-dns in dns.el (defun query-dig (domain &optional - query-type query-class query-option dig-option server) - "Query addresses of a DOMAIN using dig, by calling `dig-invoke' and `dig-extract-rr'. -Optional arguments are passed to `dig-invoke' and `dig-extract-rr'. Returns nil for a nonexistent domain." -(let ((buffer (dig-invoke domain query-type query-class query-option dig-option server))) + query-type query-class query-option dig-option server) + "Query addresses of a DOMAIN using dig. +It works by calling `dig-invoke' and `dig-extract-rr'. Optional +arguments are passed to `dig-invoke' and `dig-extract-rr'. Returns +nil for domain/class/type queries that results in no data." +(let ((buffer (dig-invoke domain query-type query-class + query-option dig-option server))) (when buffer (switch-to-buffer buffer) (let ((digger (dig-extract-rr domain query-type query-class))) diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 922eef2..308cf39 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -845,7 +845,7 @@ This can be added to `gnus-select-article-hook' or gnus-newsgroup-name (list gnus-current-article)) (setq gnus-newsgroup-undownloaded (delq gnus-current-article gnus-newsgroup-undownloaded)) - (gnus-summary-update-download-mark gnus-current-article))))) + (gnus-summary-update-article gnus-current-article))))) ;;; ;;; Internal functions diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index c09d77c..8293520 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1324,6 +1324,14 @@ See Info node `(gnus)Customizing Articles' for details." :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) +(defcustom gnus-treat-wash-html nil + "Format as HTML. +Valid values are nil, t, `head', `last', an integer or a predicate. +See Info node `(gnus)Customizing Articles' for details." + :group 'gnus-article-treat + :link '(custom-manual "(gnus)Customizing Articles") + :type gnus-article-treat-custom) + (defcustom gnus-treat-fill-long-lines nil "Fill long lines. Valid values are nil, t, `head', `last', an integer or a predicate. @@ -1451,6 +1459,7 @@ It is a string, such as \"PGP\". If nil, ask user." (gnus-treat-buttonize-head gnus-article-add-buttons-to-head) (gnus-treat-display-smileys gnus-treat-smiley) (gnus-treat-capitalize-sentences gnus-article-capitalize-sentences) + (gnus-treat-wash-html gnus-article-wash-html) (gnus-treat-emphasize gnus-article-emphasize) (gnus-treat-hide-citation gnus-article-hide-citation) (gnus-treat-hide-citation-maybe gnus-article-hide-citation-maybe) @@ -2301,24 +2310,24 @@ If READ-CHARSET, ask for a coding system." (defun article-wash-html (&optional read-charset) - "Format an html article. + "Format an HTML article. If READ-CHARSET, ask for a coding system." (interactive "P") (save-excursion (let ((buffer-read-only nil) charset) - (if (gnus-buffer-live-p gnus-original-article-buffer) - (with-current-buffer gnus-original-article-buffer - (let* ((ct (gnus-fetch-field "content-type")) - (ctl (and ct - (ignore-errors - (mail-header-parse-content-type ct))))) - (setq charset (and ctl - (mail-content-type-get ctl 'charset))) - (if (stringp charset) - (setq charset (intern (downcase charset))))))) - (if read-charset - (setq charset (mm-read-coding-system "Charset: " charset))) + (when (gnus-buffer-live-p gnus-original-article-buffer) + (with-current-buffer gnus-original-article-buffer + (let* ((ct (gnus-fetch-field "content-type")) + (ctl (and ct + (ignore-errors + (mail-header-parse-content-type ct))))) + (setq charset (and ctl + (mail-content-type-get ctl 'charset))) + (when (stringp charset) + (setq charset (intern (downcase charset))))))) + (when read-charset + (setq charset (mm-read-coding-system "Charset: " charset))) (unless charset (setq charset gnus-newsgroup-charset)) (article-goto-body) @@ -2327,8 +2336,8 @@ If READ-CHARSET, ask for a coding system." (narrow-to-region (point) (point-max)) (let* ((func (or gnus-article-wash-function mm-text-html-renderer)) (entry (assq func mm-text-html-washer-alist))) - (if entry - (setq func (cdr entry))) + (when entry + (setq func (cdr entry))) (cond ((gnus-functionp func) (funcall func)) @@ -5846,8 +5855,8 @@ after replacing with the original article." (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) @@ -5899,7 +5908,7 @@ The function must take one argument, the string naming the URL." (regexp :tag "Other"))) (defcustom gnus-button-mid-or-mail-regexp - (concat "\\b\\(\")!;:,{}\n\t ]*@" + (concat "\\b\\(\")!;:,{}\n\t ]*@" gnus-button-valid-fqdn-regexp ">?\\)\\b") "Regular expression that matches a message ID or a mail address." @@ -6063,7 +6072,7 @@ positives are possible." ("\\bin\\( +article\\| +message\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2 t gnus-button-message-id 3) ("\\( \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) @@ -6102,12 +6111,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 @@ -6119,8 +6128,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, @@ -6147,7 +6156,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. @@ -6768,11 +6777,11 @@ For example: val elem buttonized) (gnus-run-hooks 'gnus-part-display-hook) (unless gnus-inhibit-treatment - (while (setq elem (pop alist)) + (dolist (elem alist) (setq val (save-excursion - (if (gnus-buffer-live-p gnus-summary-buffer) - (set-buffer gnus-summary-buffer)) + (when (gnus-buffer-live-p gnus-summary-buffer) + (set-buffer gnus-summary-buffer)) (symbol-value (car elem)))) (when (and (or (consp val) treated-type) @@ -6806,6 +6815,8 @@ For example: (cond ((null val) nil) + (condition + (eq condition val)) ((and (listp val) (stringp (car val))) (apply 'gnus-or (mapcar `(lambda (s) @@ -6826,8 +6837,6 @@ For example: (error "%S is not a valid predicate" pred))))) ((eq val 'mime) gnus-show-mime) - (condition - (eq condition val)) ((eq val t) t) ((eq val 'head) diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index 799b01a..a10deca 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -368,15 +368,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." diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index fe44b7d..24d9cd6 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -3582,13 +3582,22 @@ If given a prefix argument, prompt for a group." (unless group (error "No group name given")) (require 'mm-url) + (condition-case nil (require 'url-http) (error nil)) (let ((name (mm-url-form-encode-xwfu (gnus-group-real-name group))) url hierarchy) (when (string-match "\\(^[^\\.]+\\)\\..*" name) (setq hierarchy (match-string 1 name)) - (if (setq url (cdr (assoc hierarchy gnus-group-charter-alist))) + (if (and (setq url (cdr (assoc hierarchy gnus-group-charter-alist))) + (if (fboundp 'url-http-file-exists-p) + (url-http-file-exists-p (eval url)) + t)) (browse-url (eval url)) - (gnus-group-fetch-control group))))) + (setq url (concat "http://" hierarchy + ".news-admin.org/charters/" name)) + (if (and (fboundp 'url-http-file-exists-p) + (url-http-file-exists-p url)) + (browse-url url) + (gnus-group-fetch-control group)))))) (defun gnus-group-fetch-control (group) "Fetch the archived control messages for the current group. @@ -4168,8 +4177,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)))))) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index d99b04d..ca39927 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -180,7 +180,7 @@ See Info node `(gnus)Posting Styles'." "Should local-file attachments be included as external parts in Gcc copies? If it is `all', attach files as external parts; if a regexp and matches the Gcc group name, attach files as external parts; -If nil, attach files as normal parts." +if nil, attach files as normal parts." :version "21.1" :group 'gnus-message :type '(choice (const nil :tag "None") @@ -385,6 +385,11 @@ Thank you for your help in stamping out bugs. ;;; Internal functions. +(defun gnus-inews-make-draft () + `(lambda () + (gnus-inews-make-draft-meta-information + ,gnus-newsgroup-name ,gnus-article-reply))) + (defvar gnus-article-reply nil) (defmacro gnus-setup-message (config &rest forms) (let ((winconf (make-symbol "gnus-setup-message-winconf")) @@ -420,10 +425,9 @@ Thank you for your help in stamping out bugs. message-required-headers) (when (and ,group (not (string= ,group ""))) - (push '(,(intern gnus-draft-meta-information-header) - . (lambda () - (gnus-inews-make-draft-meta-information - ,gnus-newsgroup-name ,gnus-article-reply))) + (push (cons + (intern gnus-draft-meta-information-header) + (gnus-inews-make-draft)) message-required-headers)) (unwind-protect (progn @@ -1290,20 +1294,22 @@ If FULL-HEADERS (the prefix), include full headers when forwarding. Note that this function definition for T-gnus is totally different from the original Gnus." (interactive "P") - (if (null (cdr (gnus-summary-work-articles nil))) - (let* ((gnus-article-reply (gnus-summary-article-number)) - (gnus-article-yanked-articles (list (list gnus-article-reply))) - charset - (message-included-forward-headers - (if full-headers "" message-included-forward-headers))) - (gnus-setup-message 'forward - (gnus-summary-select-article) - (setq charset default-mime-charset) - (set-buffer gnus-original-article-buffer) - (make-local-variable 'default-mime-charset) - (setq default-mime-charset charset) - (message-forward post))) - (gnus-summary-digest-mail-forward nil post))) + (if (cdr (gnus-summary-work-articles nil)) + ;; Process marks are given. + (gnus-summary-digest-mail-forward nil post) + ;; No process marks. + (let* ((gnus-article-reply (gnus-summary-article-number)) + (gnus-article-yanked-articles (list (list gnus-article-reply))) + charset + (message-included-forward-headers + (if full-headers "" message-included-forward-headers))) + (gnus-setup-message 'forward + (gnus-summary-select-article) + (setq charset default-mime-charset) + (set-buffer gnus-original-article-buffer) + (make-local-variable 'default-mime-charset) + (setq default-mime-charset charset) + (message-forward post))))) (defun gnus-summary-digest-mail-forward (&optional n post) "Digests and forwards all articles in this series. @@ -1822,7 +1828,7 @@ this is a reply." group)))) (when gcc (insert "Gcc: " - (if (stringp gcc) + (if (stringp gcc) (if (string-match " " gcc) (concat "\"" gcc "\"") gcc) @@ -1978,7 +1984,7 @@ this is a reply." (setq results (delq name (delq address results))) ;; make-local-hook is not obsolete in Emacs 20 or XEmacs. (make-local-hook 'message-setup-hook) - (setq results (sort results (lambda (x y) + (setq results (sort results (lambda (x y) (string-lessp (car x) (car y))))) (dolist (result results) (add-hook 'message-setup-hook diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 9c2eb68..0aa56c1 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1733,7 +1733,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] @@ -6754,6 +6756,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." @@ -7523,6 +7533,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 diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el index c9b9d94..245c186 100644 --- a/lisp/gnus-xmas.el +++ b/lisp/gnus-xmas.el @@ -341,8 +341,10 @@ call it with the value of the `gnus-data' text property." (gnus-xmas-menu-add grouplens gnus-grouplens-menu)) -(defun gnus-xmas-read-event-char () +(defun gnus-xmas-read-event-char (&optional prompt) "Get the next event." + (when prompt + (message "%s" prompt)) (let ((event (next-command-event))) (sit-for 0) ;; We junk all non-key events. Is this naughty? diff --git a/lisp/gnus.el b/lisp/gnus.el index 694ab47..18b8115 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -36,6 +36,7 @@ (eval-when-compile (require 'static)) (require 'wid-edit) +(require 'nnheader) (require 'gnus-vers) diff --git a/lisp/lpath.el b/lisp/lpath.el index df33e31..81158a7 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -16,9 +16,9 @@ put-image replace-regexp-in-string rmail-msg-is-pruned rmail-msg-restore-non-pruned-header sort-coding-systems tool-bar-add-item tool-bar-add-item-from-menu - tool-bar-local-item-from-menu vcard-pretty-print - w32-focus-frame w3m-charset-to-coding-system - x-focus-frame)) + tool-bar-local-item-from-menu url-http-file-exists-p + vcard-pretty-print w32-focus-frame + w3m-charset-to-coding-system x-focus-frame)) (maybe-bind '(filladapt-mode mc-pgp-always-sign rmail-enable-mime-composing rmail-insert-mime-forwarded-message-function @@ -40,7 +40,7 @@ mouse-minibuffer-check mouse-movement-p mouse-scroll-subr overlay-lists pgg-parse-crc24-string posn-point posn-window read-event set-buffer-multibyte track-mouse - window-edges)) + window-edges w3m-region)) (maybe-bind '(adaptive-fill-first-line-regexp buffer-display-table buffer-file-coding-system current-language-environment diff --git a/lisp/message.el b/lisp/message.el index 3678c50..025dc5f 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -341,11 +341,12 @@ 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 -(defcustom message-required-headers '((optional . References)) +(defcustom message-required-headers '((optional . References) From) "*Headers to be generated or promted for when sending a message. Also see `message-required-news-headers' and 1message-required-mail-headers'." @@ -353,7 +354,7 @@ Also see `message-required-news-headers' and :group 'message-headers :type '(repeat sexp)) -(defcustom message-draft-headers '(References) +(defcustom message-draft-headers '(References From) "*Headers to be generated when saving a draft message." :group 'message-news :group 'message-headers @@ -4447,6 +4448,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)) + (let ((do-posting t)) + (while (re-search-forward "^[^ \t\n][^:\n]*$" nil t) + (if (y-or-n-p "Fix continuation lines? ") + (progn + (goto-char (match-beginning 0)) + (insert " ")) + (unless (y-or-n-p "Send anyway? ") + (setq do-posting nil)))) + do-posting)) ;; Check the Newsgroups & Followup-To headers for syntax errors. (message-check 'valid-newsgroups (let ((case-fold-search t) @@ -5241,13 +5254,18 @@ Headers already prepared in the buffer are not modified." (progn ;; This header didn't exist, so we insert it. (goto-char (point-max)) - (insert (if (stringp header) header (symbol-name header)) - ": " value) - ;; We check whether the value was ended by a - ;; newline. If now, we insert one. - (unless (bolp) - (insert "\n")) - (forward-line -1)) + (let ((formatter + (cdr (assq header message-header-format-alist)))) + (if formatter + (funcall formatter header value) + (insert (if (stringp header) + header (symbol-name header)) + ": " value)) + ;; We check whether the value was ended by a + ;; newline. If now, we insert one. + (unless (bolp) + (insert "\n")) + (forward-line -1))) ;; The value of this header was empty, so we clear ;; totally and insert the new value. (delete-region (point) (gnus-point-at-eol)) diff --git a/lisp/nndraft.el b/lisp/nndraft.el index e352f9e..0a0ff24 100644 --- a/lisp/nndraft.el +++ b/lisp/nndraft.el @@ -153,9 +153,10 @@ 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." diff --git a/texi/ChangeLog b/texi/ChangeLog index 4153255..f63eb67 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,15 @@ +2003-01-02 Simon Josefsson + + * gnus.texi (Troubleshooting): Add. + +2003-01-02 Reiner Steib + + * gnus.texi (Article Buttons): Regexps are case insensitive here. + +2003-01-02 Lars Magne Ingebrigtsen + + * gnus.texi (Summary Generation Commands): Addition. + 2003-01-01 Lars Magne Ingebrigtsen * message.texi (Message Headers): Added example. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 9d27452..7aa8fd2 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -3299,7 +3299,7 @@ kill $B$5$l$?%0%k!<%W$rA4$FI=<($7$^$9(B (@code{gnus-group-list-killed})$B!#@\ $B$9(B (@code{gnus-group-sort-groups-by-method})$B!#(B @item G S n -@kindex G S n (Group) +@kindex G S n ($B%0%k!<%W(B) @findex gnus-group-sort-groups-by-real-name $B%0%k!<%W%P%C%U%!$rK\Ev$N(B ($BA0$K2?$bIU$$$F$$$J$$(B) $B%0%k!<%WL>$G%"%k%U%!%Y%C(B $B%H=g$KJB$YBX$($^$9(B (@code{gnus-group-sort-groups-by-real-name})$B!#(B @@ -3352,7 +3352,7 @@ kill $B$5$l$?%0%k!<%W$rA4$FI=<($7$^$9(B (@code{gnus-group-list-killed})$B!#@\ $B$9(B (@code{gnus-group-sort-selected-groups-by-method})$B!#(B @item G P n -@kindex G P n (Group) +@kindex G P n ($B%0%k!<%W(B) @findex gnus-group-sort-selected-groups-by-real-name $B%0%k!<%W$rK\Ev$N(B ($BA0$K2?$bIU$$$F$$$J$$(B) $B%0%k!<%WL>$G%"%k%U%!%Y%C%H=g$KJB(B $B$YBX$($^$9(B (@code{gnus-group-sort-selected-groups-by-real-name})$B!#(B @@ -4174,7 +4174,7 @@ gnus $B$O(B @code{gnus-group-faq-directory} $B$NCM$rA4$F!"0l$D0l$D%*!<%W%s$7$ $B$_$h$&$H$7$^$9!#(B @item H c -@kindex H c (Group) +@kindex H c ($B%0%k!<%W(B) @findex gnus-group-fetch-charter @vindex gnus-group-charter-alist @cindex charter @@ -4187,7 +4187,7 @@ gnus $B$O(B @code{gnus-group-charter-alist} $B$r;H$C$F7{>O$N=j:_$rC5$7$^$9!#= $B$7$^$9!#$=$l$K$O7{>O$r4^$s$G$$$k$3$H$,$"$j$^$9$+$i!#(B @item H C -@kindex H C (Group) +@kindex H C ($B%0%k!<%W(B) @findex gnus-group-fetch-control @vindex gnus-group-fetch-control-use-browse-url @cindex control message @@ -6081,7 +6081,7 @@ gnus $B%(!<%8%'%s%H(B @pxref{Agent Basics} $B$O$$$/$D$+$N5-;v$r<+F0E*$K%@%&%s $B@)8B$r%9%?%C%/$+$iH$K(B@dfn{$B%\%?%s(B}$B$rIU$1$^$9(B: @table @var @item regexp -$B$3$N@55,I=8=(B (regexp) $B$K9gCW$9$k$9$Y$F$NJ8$O30It;2>H$G$"$k$H$_$J$5$l$^$9!#(B -$B$3$l$OKd$a9~$^$l$?(B URL $B$K9gCW$9$kE57?E*$J@55,I=8=$G(B -$B$9(B @samp{]*\\)>}$B!#$3$l$O$^$?@55,I=8=$NCM$r;}$DJQ?t$G$"$C(B -$B$F$b$h$/!"M-MQ$JJQ?t$H$7$F(B @code{gnus-button-url-regexp} $B$,$"$j$^$9!#(B +$B$3$N@55,I=8=(B ($BBgJ8;z$H>.J8;z$O6hJL$5$l$J$$(B) $B$K9gCW$9$k$9$Y$F$NJ8$O30It;2(B +$B>H$G$"$k$H$_$J$5$l$^$9!#$3$l$OKd$a9~$^$l$?(B URL $B$K9gCW$9$kE57?E*$J@55,I=(B +$B8=$G$9(B @samp{]*\\)>}$B!#$3$l$O$^$?@55,I=8=$NCM$r;}$DJQ?t$G(B +$B$"$C$F$b$h$/!"M-MQ$JJQ?t$H$7$F(B @code{gnus-button-url-regexp} $B$,$"$j$^$9!#(B @item button-par Gnus $B$O9gCW$7$?$b$N$N$I$NItJ,$,%O%$%i%$%H$5$l$k$N$+$rCN$i$J$1$l$P$J$j$^(B @@ -8692,7 +8692,7 @@ gnus $B$G%a!<%k$rFI$`$3$H$NM-Mx$JE@$O!"C1=c$J%P%0$rAG@2$i$7$$IT>rM}$KCV$-(B $B%9%3%"$K$h$C$FJB$SBX$($^$9(B (@code{gnus-summary-sort-by-score})$B!#(B @item C-c C-s C-r -@kindex C-c C-s C-r (Summary) +@kindex C-c C-s C-r ($B35N,(B) @findex gnus-summary-sort-by-random $B%i%s%@%`$KJB$SBX$($^$9(B (@code{gnus-summary-sort-by-random})$B!#(B @@ -9366,8 +9366,14 @@ Gnus $B$N(B info $B$N@a(B (node) $B$K0\F0$7$^$9(B (@code{gnus-info-find-no @item Y c @kindex Y c ($B35N,(B) @findex gnus-summary-insert-cached-articles -$BA4$F$N(B ($B8=:_$N%0%k!<%W$K(B) $B%-%c%C%7%e$5$l$?5-;v(B $B$r35N,%P%C%U%!$KA^F~$7$^(B +$B$9$Y$F$N(B ($B8=:_$N%0%k!<%W$K(B) $B%-%c%C%7%e$5$l$?5-;v$r35N,%P%C%U%!$KA^F~$7$^(B $B$9(B (@code{gnus-summary-insert-cached-articles})$B!#(B + +@item Y d +@kindex Y d ($B35N,(B) +@findex gnus-summary-insert-dormant-articles +$B$9$Y$F$N(B ($B8=:_$N%0%k!<%W$N(B) $BJ]N15-;v$r35N,%P%C%U%!$KA^F~$7$^(B +$B$9(B (@code{gnus-summary-insert-dormant-articles})$B!#(B @end table @node Really Various Summary Commands @@ -10027,6 +10033,7 @@ GNUS $B$d(B Gnus $B$G$O!"$3$N$?$A$N0-$$LdBj$G6C$+$5$l$J$$$h$&$K$9$k$K$O!"35N, @item gnus-treat-strip-pgp (t, last, integer) @item gnus-treat-strip-trailing-blank-lines (t, last, integer) @item gnus-treat-unsplit-urls (t, integer) +@item gnus-treat-wash-html (t, integer) @item gnus-treat-decode-article-as-default-mime-charset (t, integer) @xref{Article Washing}. @@ -11300,7 +11307,7 @@ Gnus $B$,$I$l$+$N%5!<%P!<$+$i@\B35qH]$rC5n$7$^(B $B$9(B (@code{gnus-server-remove-denials})$B!#(B @item L -@kindex L (Server) +@kindex L ($B%5!<%P!<(B) @findex gnus-server-offline-server $B%5!<%P!<$N>uBV$r%*%U%i%$%s$K$7$^$9(B (@code{gnus-server-offline-server})$B!#(B @end table @@ -23450,6 +23457,29 @@ Lisp $B%P%C%U%!!<$G$O!"(B@kbd{SPC} $B$G%7%s%0%k%9%F%C%WF0:n!"(B@kbd{M-:} $B $BI>2A!"(B@kbd{C-h v} $B$GJQ?t$r8!::!"(B@kbd{q} $B$G]*\\)>}. This can also be a variable containing a -regexp, useful variables to use include @code{gnus-button-url-regexp}. +All text that match this regular expression (case insensitive) will be +considered an external reference. Here's a typical regexp that matches +embedded URLs: @samp{]*\\)>}. This can also be a +variable containing a regexp, useful variables to use include +@code{gnus-button-url-regexp}. @item button-par Gnus has to know which parts of the matches is to be highlighted. This @@ -9855,6 +9856,12 @@ Regenerate the current summary buffer (@code{gnus-summary-prepare}). Pull all cached articles (for the current group) into the summary buffer (@code{gnus-summary-insert-cached-articles}). +@item Y d +@kindex Y d (Summary) +@findex gnus-summary-insert-dormant-articles +Pull all dormant articles (for the current group) into the summary buffer +(@code{gnus-summary-insert-dormant-articles}). + @end table @@ -10534,6 +10541,7 @@ possible but those listed are probably sufficient for most people. @item gnus-treat-strip-pgp (t, last, integer) @item gnus-treat-strip-trailing-blank-lines (t, last, integer) @item gnus-treat-unsplit-urls (t, integer) +@item gnus-treat-wash-html (t, integer) @item gnus-treat-decode-article-as-default-mime-charset (t, integer) @xref{Article Washing}. @@ -23929,6 +23937,28 @@ evaluate expressions using @kbd{M-:} or inspect variables using @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with @kbd{c} or @kbd{g}. +@cindex elp +@cindex profile +@cindex slow +Sometimes, a problem do not directly generate a elisp error but +manifests itself by causing Gnus to be very slow. In these cases, you +can use @kbd{M-x toggle-debug-on-quit} and press C-j when things are +slow, and then try to analyze the backtrace (repeating the procedure +helps isolating the real problem areas). A fancier approach is to use +the elisp profiler, ELP. The profiler is (or should be) fully +documented elsewhere, but to get you started there are a few steps +that need to be followed. First, instrument the part of Gnus you are +interested in for profiling, e.g. @kbd{M-x elp-instrument-package RET +gnus} or @kbd{M-x elp-instrument-packagre RET message}. Then perform +the operation that is slow and press @kbd{M-x elp-results}. You will +then see which operations that takes time, and can debug them further. +If the entire operation takes much longer than the time spent in the +slowest function in the profiler output, you probably profiled the +wrong part of Gnus. To reset profiling statistics, use @kbd{M-x +elp-reset-all}. @kbd{M-x elp-restore-all} is supposed to remove +profiling, but given the complexities and dynamic code generation in +Gnus, it might not always work perfectly. + If you just need help, you are better off asking on @samp{gnu.emacs.gnus}. I'm not very helpful.