+2002-05-26 Simon Josefsson <jas@extundo.com>
+
+ * 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 <jas@extundo.com>
+
+ * 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 <harder@ifa.au.dk>
+
+ * 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 <jas@extundo.com>
+
+ * gnus-msg.el (gnus-confirm-mail-reply-to-news): Typo. Trivial
+ change from Benjamin Rutt <rutt+news@cis.ohio-state.edu>.
+
+ * nnweb.el (nnweb-type): Remove dejanewsold. Trivial change from
+ Niklas Morberg <niklas.morberg@axis.com>.
+
+2002-05-22 Simon Josefsson <jas@extundo.com>
+
+ * 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
+ <rutt+news@cis.ohio-state.edu>.
+
+ * nnimap.el (nnimap-nov-is-evil): Improve doc.
+
2002-05-21 Simon Josefsson <jas@extundo.com>
* sieve-mode.el (sieve-manage): Fix autoloads.
: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
(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.
(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)
["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]
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)
(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)
;; 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))
(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
(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
((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))
(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)))
(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)
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.
"*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"))
;; 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:
(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.")
(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
(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
(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
+2002-05-23 Simon Josefsson <jas@extundo.com>
+
+ * gnus.texi (Web Searches): Fix. Trivial change from Niklas
+ Morberg <niklas.morberg@axis.com>.
+
+2002-05-22 Simon Josefsson <jas@extundo.com>
+
+ * gnus.texi (Mail): Add variable.
+
2002-05-16 Simon Josefsson <jas@extundo.com>
* gnus.texi (Loose Threads): Add gnus-simplify-all-whitespace.
@vindex gnus-add-to-list
@code{nil} \e$B$G$J$1$l$P!"\e(B@kbd{a} \e$B$r$7$?$H$-$K!"\e(B@code{to-list} \e$B%0%k!<%W%Q%i\e(B
\e$B%a!<%?$r$=$l$N$J$$%a!<%k%0%k!<%W$KIU$12C$($^$9!#\e(B
+
+@item gnus-confirm-mail-reply-to-news
+@vindex gnus-confirm-mail-reply-to-news
+\e$BHs\e(B-@code{nil}\e$B$@$C$?$i!"%K%e!<%95-;v$KJV?.$9$k$H$-$K\e(B gnus \e$B$O3NG'$r5a$a$^\e(B
+\e$B$9!#%a!<%k$GJV?.$9$k5$$OL5$$$N$K;~$?$^$>$s$6$$$K\e(B R \e$B$r2!$7$F$7$^$&JJ$,$"\e(B
+\e$B$k$J$i$P!"$3$NJQ?t$O$=$s$J$"$J$?$N$?$a$K$"$j$^$9!#\e(B
@end table
@node Posting Server
@node Web Searches
@subsection \e$B%&%'%V8!:w\e(B
@cindex nnweb
+@cindex Google
@cindex DejaNews
@cindex Alta Vista
@cindex InReference
@item nnweb-type
@vindex nnweb-type
\e$B$I$N8!:w%(%s%8%s$r;H$C$F$$$k$+!#8=:_%5%]!<%H$5$l$F$$$k<oN`$O!"\e(B
-@code{dejanews}, @code{dejanewsold}, @code{altavista}, @code{reference} \e$B$G\e(B
-\e$B$9!#\e(B
+@code{google}, @code{dejanews}, @code{altavista} \e$B$=$7\e(B
+\e$B$F\e(B @code{reference} \e$B$G$9!#\e(B
@item nnweb-search
@vindex nnweb-search
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
@node Web Searches
@subsection Web Searches
@cindex nnweb
+@cindex Google
@cindex DejaNews
@cindex Alta Vista
@cindex InReference
@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