From: yamaoka Date: Mon, 27 May 2002 02:09:07 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_7-01-quimby~8 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7be970adc90578cd3abd829f49f96c3cf5045f7;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 18cee74..ded8355 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,46 @@ +2002-05-26 Simon Josefsson + + * gnus-sum.el (gnus-summary-menu-split): New function. + (gnus-summary-make-menu-bar): Split charset submenu. + (gnus-summary-menu-maxlen): New variable. + (gnus-summary-menu-split): Use it. + +2002-05-25 Simon Josefsson + + * mml.el (mml-preview): Generate some headers. + + * gnus.el (gnus-large-newsgroup): Fix :type. + + * nnimap.el (nnimap-nov-is-evil): Change default to t (because the + Agent cache NOV's by default now). + (nnimap-nov-is-evil): Make it default to `gnus-agent' instead. + +2002-05-18 Jesper Harder + + * gnus-sum.el (gnus-dependencies-add-header): Avoid one unecessary + call to gnus-parent-id when we check for References loops. + (gnus-summary-prepare-threads): Avoid simplifying every Subject + twice by saving the simplified subject string in simp-subject. + +2002-05-23 Simon Josefsson + + * gnus-msg.el (gnus-confirm-mail-reply-to-news): Typo. Trivial + change from Benjamin Rutt . + + * nnweb.el (nnweb-type): Remove dejanewsold. Trivial change from + Niklas Morberg . + +2002-05-22 Simon Josefsson + + * sieve.el (sieve-change-region): Define it before it is used. + + * gnus-msg.el (gnus-confirm-mail-reply-to-news) + (gnus-summary-reply): Ask for confirmation when replying to news. + Defaults to not ask. From Benjamin Rutt + . + + * nnimap.el (nnimap-nov-is-evil): Improve doc. + 2002-05-21 Simon Josefsson * sieve-mode.el (sieve-manage): Fix autoloads. diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 4fb4c01..6e1afd0 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -246,6 +246,13 @@ See also the `mml-default-encrypt-method' variable." :group 'gnus-message :type 'boolean) +(defcustom gnus-confirm-mail-reply-to-news nil + "If non-nil, Gnus requests confirmation when replying to news. +This is done because new users often reply by mistake when reading +news." + :group 'gnus-message + :type 'boolean) + ;;; Internal variables. (defvar gnus-inhibit-posting-styles nil @@ -1091,51 +1098,56 @@ If VERY-WIDE, make a very wide reply." (interactive (list (and current-prefix-arg (gnus-summary-work-articles 1)))) - (let* ((article - (if (listp (car yank)) - (caar yank) - (car yank))) - (gnus-article-reply (or article (gnus-summary-article-number))) - (headers "")) - ;; Stripping headers should be specified with mail-yank-ignored-headers. - (when yank - (gnus-summary-goto-subject article)) - (gnus-setup-message (if yank 'reply-yank 'reply) - (if (not very-wide) - (gnus-summary-select-article) - (dolist (article very-wide) - (gnus-summary-select-article nil nil nil article) - (save-excursion - (set-buffer (gnus-copy-article-buffer)) - (gnus-msg-treat-broken-reply-to) - (save-restriction - (message-narrow-to-head) - (setq headers (concat headers (buffer-string))))))) - (set-buffer (gnus-copy-article-buffer)) - (gnus-msg-treat-broken-reply-to gnus-msg-force-broken-reply-to) - (save-restriction - (message-narrow-to-head) - (when very-wide - (erase-buffer) - (insert headers)) - (goto-char (point-max))) - (message-reply nil wide) + ;; Allow user to require confirmation before replying by mail to the + ;; author of a news article. + (when (or (not (gnus-news-group-p gnus-newsgroup-name)) + (not gnus-confirm-mail-reply-to-news) + (y-or-n-p "Really reply by mail to article author? ")) + (let* ((article + (if (listp (car yank)) + (caar yank) + (car yank))) + (gnus-article-reply (or article (gnus-summary-article-number))) + (headers "")) + ;; Stripping headers should be specified with mail-yank-ignored-headers. (when yank - (gnus-inews-yank-articles yank)) -;; (when (or gnus-message-replysign gnus-message-replyencrypt) -;; (let (signed encrypted) -;; (save-excursion -;; (set-buffer gnus-article-buffer) -;; (setq signed (memq 'signed gnus-article-wash-types)) -;; (setq encrypted (memq 'encrypted gnus-article-wash-types))) -;; (cond ((and gnus-message-replysign signed) -;; (mml-secure-message mml-default-sign-method 'sign)) -;; ((and gnus-message-replyencrypt encrypted) -;; (mml-secure-message mml-default-encrypt-method -;; (if gnus-message-replysignencrypted -;; 'signencrypt -;; 'encrypt)))))) - ))) + (gnus-summary-goto-subject article)) + (gnus-setup-message (if yank 'reply-yank 'reply) + (if (not very-wide) + (gnus-summary-select-article) + (dolist (article very-wide) + (gnus-summary-select-article nil nil nil article) + (save-excursion + (set-buffer (gnus-copy-article-buffer)) + (gnus-msg-treat-broken-reply-to) + (save-restriction + (message-narrow-to-head) + (setq headers (concat headers (buffer-string))))))) + (set-buffer (gnus-copy-article-buffer)) + (gnus-msg-treat-broken-reply-to gnus-msg-force-broken-reply-to) + (save-restriction + (message-narrow-to-head) + (when very-wide + (erase-buffer) + (insert headers)) + (goto-char (point-max))) + (message-reply nil wide) + (when yank + (gnus-inews-yank-articles yank)) +;; (when (or gnus-message-replysign gnus-message-replyencrypt) +;; (let (signed encrypted) +;; (save-excursion +;; (set-buffer gnus-article-buffer) +;; (setq signed (memq 'signed gnus-article-wash-types)) +;; (setq encrypted (memq 'encrypted gnus-article-wash-types))) +;; (cond ((and gnus-message-replysign signed) +;; (mml-secure-message mml-default-sign-method 'sign)) +;; ((and gnus-message-replyencrypt encrypted) +;; (mml-secure-message mml-default-encrypt-method +;; (if gnus-message-replysignencrypted +;; 'signencrypt +;; 'encrypt)))))) + )))) (defun gnus-summary-reply-with-original (n &optional wide) "Start composing a reply mail to the current message. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index d9b01f3..bffc3dc 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1925,6 +1925,30 @@ increase the score of each group you read." (defvar gnus-article-post-menu nil) +(defconst gnus-summary-menu-maxlen 20) + +(defun gnus-summary-menu-split (menu) + ;; If we have lots of elements, divide them into groups of 20 + ;; and make a pane (or submenu) for each one. + (if (> (length menu) (/ (* gnus-summary-menu-maxlen 3) 2)) + (let ((menu menu) sublists next + (i 1)) + (while menu + ;; Pull off the next gnus-summary-menu-maxlen elements + ;; and make them the next element of sublist. + (setq next (nthcdr gnus-summary-menu-maxlen menu)) + (if next + (setcdr (nthcdr (1- gnus-summary-menu-maxlen) menu) + nil)) + (setq sublists (cons (cons (format "%s ... %s" (aref (car menu) 0) + (aref (car (last menu)) 0)) menu) + sublists)) + (setq i (1+ i)) + (setq menu next)) + (nreverse sublists)) + ;; Few elements--put them all in one pane. + menu)) + (defun gnus-summary-make-menu-bar () (gnus-turn-off-edit-menu 'summary) @@ -1990,27 +2014,28 @@ increase the score of each group you read." ["Show picons in mail headers" gnus-treat-mail-picon t] ["Show picons in news headers" gnus-treat-newsgroups-picon t] ("View as different encoding" - ,@(mapcar - (lambda (cs) - ;; Since easymenu under FSF Emacs doesn't allow lambda - ;; forms for menu commands, we should provide intern'ed - ;; function symbols. - (let ((command (intern (format "\ + ,@(gnus-summary-menu-split + (mapcar + (lambda (cs) + ;; Since easymenu under FSF Emacs doesn't allow lambda + ;; forms for menu commands, we should provide intern'ed + ;; function symbols. + (let ((command (intern (format "\ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) - (fset command - `(lambda () - (interactive) - (let ((gnus-summary-show-article-charset-alist - '((1 . ,cs)))) - (gnus-summary-show-article 1)))) - `[,(symbol-name cs) ,command t])) - (sort (if (fboundp 'coding-system-list) - (coding-system-list) - ;;(mapcar 'car mm-mime-mule-charset-alist) - ) - (lambda (a b) - (string< (symbol-name a) - (symbol-name b))))))) + (fset command + `(lambda () + (interactive) + (let ((gnus-summary-show-article-charset-alist + '((1 . ,cs)))) + (gnus-summary-show-article 1)))) + `[,(symbol-name cs) ,command t])) + (sort (if (fboundp 'coding-system-list) + (coding-system-list) + ;;(mapcar 'car mm-mime-mule-charset-alist) + ) + (lambda (a b) + (string< (symbol-name a) + (symbol-name b)))))))) ("Washing" ("Remove Blanks" ["Leading" gnus-article-strip-leading-blank-lines t] @@ -3656,7 +3681,7 @@ entered. Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (let* ((id (mail-header-id header)) (id-dep (and id (intern id dependencies))) - ref ref-dep ref-header replaced) + parent-id ref ref-dep ref-header replaced) ;; Enter this `header' in the `dependencies' table. (cond ((not id-dep) @@ -3699,7 +3724,8 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (when (and header (not replaced)) ;; First check that we are not creating a References loop. - (setq ref (gnus-parent-id (mail-header-references header))) + (setq parent-id (gnus-parent-id (mail-header-references header))) + (setq ref parent-id) (while (and ref (setq ref-dep (intern-soft ref dependencies)) (boundp ref-dep) @@ -3709,10 +3735,10 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." ;; root article. (progn (mail-header-set-references (car (symbol-value id-dep)) "none") - (setq ref nil)) + (setq ref nil) + (setq parent-id nil)) (setq ref (gnus-parent-id (mail-header-references ref-header))))) - (setq ref (gnus-parent-id (mail-header-references header))) - (setq ref-dep (intern (or ref "none") dependencies)) + (setq ref-dep (intern (or parent-id "none") dependencies)) (if (boundp ref-dep) (setcdr (symbol-value ref-dep) (nconc (cdr (symbol-value ref-dep)) @@ -4412,7 +4438,7 @@ or a straight list of headers." (default-score (or gnus-summary-default-score 0)) (gnus-visual-p (gnus-visual-p 'summary-highlight 'highlight)) thread number subject stack state gnus-tmp-gathered beg-match - new-roots gnus-tmp-new-adopts thread-end + new-roots gnus-tmp-new-adopts thread-end simp-subject gnus-tmp-header gnus-tmp-unread gnus-tmp-replied gnus-tmp-subject-or-nil gnus-tmp-dummy gnus-tmp-indentation gnus-tmp-lines gnus-tmp-score @@ -4501,7 +4527,8 @@ or a straight list of headers." (setq gnus-tmp-level -1))) (setq number (mail-header-number gnus-tmp-header) - subject (mail-header-subject gnus-tmp-header)) + subject (mail-header-subject gnus-tmp-header) + simp-subject (gnus-simplify-subject-fully subject)) (cond ;; If the thread has changed subject, we might want to make @@ -4509,8 +4536,7 @@ or a straight list of headers." ((and (null gnus-thread-ignore-subject) (not (zerop gnus-tmp-level)) gnus-tmp-prev-subject - (not (inline - (gnus-subject-equal gnus-tmp-prev-subject subject)))) + (not (string= gnus-tmp-prev-subject simp-subject))) (setq new-roots (nconc new-roots (list (car thread))) thread-end t gnus-tmp-header nil)) @@ -4571,15 +4597,13 @@ or a straight list of headers." (cond ((and gnus-thread-ignore-subject gnus-tmp-prev-subject - (not (inline (gnus-subject-equal - gnus-tmp-prev-subject subject)))) + (not (string= gnus-tmp-prev-subject simp-subject))) subject) ((zerop gnus-tmp-level) (if (and (eq gnus-summary-make-false-root 'empty) (memq number gnus-tmp-gathered) gnus-tmp-prev-subject - (inline (gnus-subject-equal - gnus-tmp-prev-subject subject))) + (string= gnus-tmp-prev-subject simp-subject)) gnus-summary-same-subject subject)) (t gnus-summary-same-subject))) @@ -4664,7 +4688,7 @@ or a straight list of headers." (gnus-run-hooks 'gnus-summary-update-hook) (forward-line 1)) - (setq gnus-tmp-prev-subject subject))) + (setq gnus-tmp-prev-subject simp-subject))) (when (nth 1 thread) (push (list (max 0 gnus-tmp-level) diff --git a/lisp/gnus.el b/lisp/gnus.el index 3357532..760cb48 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1306,7 +1306,8 @@ If the number of articles in a newsgroup is greater than this value, confirmation is required for selecting the newsgroup. If it is `nil', no confirmation is required." :group 'gnus-group-select - :type 'integer) + :type '(choice (const :tag "No limit" nil) + integer)) (defcustom gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix))) "*Non-nil means that the default name of a file to save articles in is the group name. diff --git a/lisp/mml.el b/lisp/mml.el index 528acc1..6950d6c 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -1006,6 +1006,13 @@ If RAW, don't highlight the article." "*MIME preview of ") (buffer-name)))) (erase-buffer) (insert-buffer buf) + (let ((message-deletable-headers (if (message-news-p) + nil + message-deletable-headers))) + (message-generate-headers + (copy-sequence (if (message-news-p) + message-required-news-headers + message-required-mail-headers)))) (if (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n") nil t) (replace-match "\n")) diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 268dee6..c1c5767 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -55,6 +55,7 @@ ;; o What about Gnus's article editing, can we support it? NO! ;; o Use \Draft to support the draft group?? ;; o Duplicate suppression +;; o Rewrite UID SEARCH UID X as UID FETCH X (UID) for those with slow servers ;;; Code: @@ -281,9 +282,12 @@ typical complete file name would be (defvoo nnimap-nov-file-name-suffix ".novcache" "Suffix for NOV cache base filename.") -(defvoo nnimap-nov-is-evil nil - "If non-nil, nnimap will never generate or use a local nov database for this backend. -Using nov databases will speed up header fetching considerably. +(defvoo nnimap-nov-is-evil gnus-agent + "If non-nil, never generate or use a local nov database for this backend. +Using nov databases should speed up header fetching considerably. +However, it will invoke a UID SEARCH UID command on the server, and +some servers implement this command inefficiently by opening each and +every message in the group, thus making it quite slow. Unlike other backends, you do not need to take special care if you flip this variable.") diff --git a/lisp/nnweb.el b/lisp/nnweb.el index 9ae4303..9d4c18b 100644 --- a/lisp/nnweb.el +++ b/lisp/nnweb.el @@ -50,8 +50,7 @@ (defvoo nnweb-type 'google "What search engine type is being used. -Valid types include `google', `dejanews', `dejanewsold', `reference', -and `altavista'.") +Valid types include `google', `dejanews', `reference', and `altavista'.") (defvar nnweb-type-definition '((google diff --git a/lisp/sieve.el b/lisp/sieve.el index 0b4aa35..bb78008 100644 --- a/lisp/sieve.el +++ b/lisp/sieve.el @@ -176,6 +176,15 @@ require \"fileinto\"; (sieve-mode) (message "Press C-c C-l to upload script to server."))) +(defmacro sieve-change-region (&rest body) + "Turns off sieve-region before executing BODY, then re-enables it after. +Used to bracket operations which move point in the sieve-buffer." + `(progn + (sieve-highlight nil) + ,@body + (sieve-highlight t))) +(put 'sieve-change-region 'lisp-indent-function 0) + (defun sieve-next-line (&optional arg) (interactive) (unless arg @@ -248,15 +257,6 @@ Server : " server ":" (or port "2000") " (interactive "d") (get-char-property (or pos (point)) 'script-name)) -(defmacro sieve-change-region (&rest body) - "Turns off sieve-region before executing BODY, then re-enables it after. -Used to bracket operations which move point in the sieve-buffer." - `(progn - (sieve-highlight nil) - ,@body - (sieve-highlight t))) -(put 'sieve-change-region 'lisp-indent-function 0) - (eval-and-compile (defalias 'sieve-make-overlay (if (fboundp 'make-overlay) 'make-overlay diff --git a/texi/ChangeLog b/texi/ChangeLog index 95b2b0e..93ff83a 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,12 @@ +2002-05-23 Simon Josefsson + + * gnus.texi (Web Searches): Fix. Trivial change from Niklas + Morberg . + +2002-05-22 Simon Josefsson + + * gnus.texi (Mail): Add variable. + 2002-05-16 Simon Josefsson * gnus.texi (Loose Threads): Add gnus-simplify-all-whitespace. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 54420a8..c94d073 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -10149,6 +10149,12 @@ Superseding} を参照してください。 @vindex gnus-add-to-list @code{nil} でなければ、@kbd{a} をしたときに、@code{to-list} グループパラ メータをそれのないメールグループに付け加えます。 + +@item gnus-confirm-mail-reply-to-news +@vindex gnus-confirm-mail-reply-to-news +非-@code{nil}だったら、ニュース記事に返信するときに gnus は確認を求めま +す。メールで返信する気は無いのに時たまぞんざいに R を押してしまう癖があ +るならば、この変数はそんなあなたのためにあります。 @end table @node Posting Server @@ -13713,6 +13719,7 @@ gnus を終了したいかもしれません。 @node Web Searches @subsection ウェブ検索 @cindex nnweb +@cindex Google @cindex DejaNews @cindex Alta Vista @cindex InReference @@ -13758,8 +13765,8 @@ gnus を終了したいかもしれません。 @item nnweb-type @vindex nnweb-type どの検索エンジンを使っているか。現在サポートされている種類は、 -@code{dejanews}, @code{dejanewsold}, @code{altavista}, @code{reference} で -す。 +@code{google}, @code{dejanews}, @code{altavista} そし +て @code{reference} です。 @item nnweb-search @vindex nnweb-search diff --git a/texi/gnus.texi b/texi/gnus.texi index 93c0824..a8a6dfd 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -10643,6 +10643,12 @@ headers will be included in the sequence they are matched. If non-@code{nil}, add a @code{to-list} group parameter to mail groups that have none when you do a @kbd{a}. +@item gnus-confirm-mail-reply-to-news +@vindex gnus-confirm-mail-reply-to-news +If non-@code{nil}, Gnus requests confirmation when replying to news. +If you find yourself never wanting to reply to mail, but occasionally +press R anyway, this variable might be for you. + @end table @@ -14337,6 +14343,7 @@ is unnecessary in that case. @node Web Searches @subsection Web Searches @cindex nnweb +@cindex Google @cindex DejaNews @cindex Alta Vista @cindex InReference @@ -14383,7 +14390,7 @@ Virtual server variables: @item nnweb-type @vindex nnweb-type What search engine type is being used. The currently supported types -are @code{dejanews}, @code{dejanewsold}, @code{altavista} and +are @code{google}, @code{dejanews}, @code{altavista} and @code{reference}. @item nnweb-search