Commit a3f57c41 authored by Gnus developers's avatar Gnus developers Committed by Katsumi Yamaoka

Merge changes made in Gnus trunk.

gnus-registry.el: Fix and extend header docs.  Move the nnregistry feature check.
nnimap.el (nnimap-update-info): Ignore groups that have no UIDNEXT values.
nnimap.el: Implement nnimap-request-newgroups.
gnus-group.el (gnus-group-completing-read): Return the symbol name, not the value from the collection.
nnimap.el: Don't error out on empty non-UIDNEXT groups.
nnmail.el (nnmail-article-group): Allow using the fancy split method directly.
gnus.el (gnus-continuum-version): Make inactive, since it doesn't really message anything to the user.
gnus-msg.el (gnus-summary-resend-message): When resending, don't externalize attachments.
gnus.el (gnus-large-newsgroup): Mention gnus-large-ephemeral-newsgroup.
gnus-sum.el (gnus-summary-scroll-up): Add more documentation.
message.el (message-shorten-references): Comment on the number "21".
mm-encode.el (mm-content-transfer-encoding-defaults): Try to make the documentation clearer.
ChangeLog: jidanni -> Dan Jacobson.
nnmbox.el (nnmbox-read-mbox): Mark buffer for deletion on Gnus exit.
gnus-sum.el, gnus-win.el: Change the `h' command to only show the article buffer.
gnus-art.el (gnus-summary-save-in-file, gnus-summary-save-in-rmail): Use with-current-buffer instead of gnus-eval-in-buffer-window to avoid popping up frames.
gnus-sum.el (gnus-summary-clear-local-variables): Removed.
gnus-async.el (gnus-async-delete-prefetched-entry): Remove from hash table, too.
gnus-async.el: Try to keep the async hash table size reasonable.
nndoc.el (nndoc-type-alist): Do babyl before mime-parts.
gnus-start.el (gnus-check-bogus-newsgroups): Say how many groups we're being queried about.
parent 0ebf79de
......@@ -9477,6 +9477,14 @@ signature should be removed, or other symbol, meaning that the
corresponding regular expression in @code{gnus-article-banner-alist} is
used.
For instance:
@lisp
(setq gnus-article-banner-alist
((googleGroups .
"^\n*--~--~---------\\(.+\n\\)+")))
@end lisp
Regardless of a group, you can hide things like advertisements only when
the sender of an article has a certain mail address specified in
@code{gnus-article-address-banner-alist}.
......@@ -15102,6 +15110,9 @@ arguments in a buffer narrowed to the headers of an incoming mail
message. The function should return a list of group names that it
thinks should carry this mail message.
This variable can also be a fancy split method. See @xref{Fancy Mail
Splitting} for the syntax.
Note that the mail back ends are free to maul the poor, innocent,
incoming headers all they want to. They all add @code{Lines} headers;
some add @code{X-Gnus-Group} headers; most rename the Unix mbox
2010-10-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-start.el (gnus-check-bogus-newsgroups): Say how many groups
we're being queried about. Suggested by Dan Jacobson.
* nndoc.el (nndoc-type-alist): Do babyl before mime-parts. Suggested
by Jason Eisner.
* gnus-async.el (gnus-async-delete-prefetched-entry): Remove from hash
table, too. Suggested by Stefan Wiens.
(gnus-async-prefetched-article-entry): Use intern-soft to avoid growing
the table unnecessary. Suggested by Stefan Wiens.
* gnus-sum.el (gnus-summary-clear-local-variables): This is probably no
longer needed, and probably doesn't work either, as pointed out by
Stefan Wiens.
(gnus-summary-exit): Remove call to the clearing function.
(gnus-summary-exit-no-update): Ditto.
* gnus-art.el (gnus-summary-save-in-file): Use with-current-buffer
instead of gnus-eval-in-buffer-window to avoid popping up frames.
Reported by Stefan Monnier.
(gnus-summary-save-in-rmail): Ditto.
* gnus-sum.el (gnus-summary-select-article-buffer): Show only the
article buffer, instead of both the article buffer and the summary
buffer. Sort of suggested by Dan Jacobson.
* gnus-win.el (gnus-buffer-configuration): Add an only-article spec.
* nnmbox.el (nnmbox-read-mbox): Mark buffer for deletion on Gnus exit.
Suggested by Dan Jacobson.
* mm-encode.el (mm-content-transfer-encoding-defaults): Try to make the
documentation clearer.
* message.el (message-shorten-references): Comment on the number "21".
Suggested by Stefan Monnier.
* gnus-sum.el (gnus-summary-scroll-up): Add more documentation.
Suggested by Dan Jacobson.
* gnus.el (gnus-large-newsgroup): Mention
gnus-large-ephemeral-newsgroup. Suggested by Dan Jacobson.
* gnus-msg.el (gnus-summary-resend-message): When resending, don't
externalize attachments. Bug reported by Steve Wen.
* gnus.el (gnus-continuum-version): Make inactive, since it doesn't
really message anything to the user.
* nnmail.el (nnmail-article-group): Allow using the fancy split method
directly.
* nnimap.el (nnimap-request-group): Low higher than high to signal no
messages in empty groups.
2010-10-01 Ted Zlatanov <tzz@lifelogs.com>
* nnimap.el (nnimap-request-group): Don't bug out when there's an empty
non-UIDNEXT group.
2010-10-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-group.el (gnus-group-completing-read): Return the symbol name,
not the value from the collection.
* nnimap.el (nnimap-update-info): Ignore groups that have no UIDNEXT
values. This sometimes happens on some groups that have no info.
(nnimap-request-newgroups): New function.
2010-10-01 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-registry.el (gnus-registry-install-nnregistry): Move the feature
check into `gnus-registry-initialize'.
(gnus-registry-initialize): Ditto.
Fix and extend header docs.
2010-10-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-html.el (gnus-html-prefetch-images): Adjust regexp to avoid
......
......@@ -3958,7 +3958,7 @@ Directory to save to is default to `gnus-article-save-directory'."
"Save %s in rmail file" filename
gnus-rmail-save-name gnus-newsgroup-name
gnus-current-headers 'gnus-newsgroup-last-rmail))
(gnus-eval-in-buffer-window gnus-save-article-buffer
(with-current-buffer gnus-save-article-buffer
(save-excursion
(save-restriction
(widen)
......@@ -3976,7 +3976,7 @@ Directory to save to is default to `gnus-article-save-directory'."
"Save %s in Unix mail file" filename
gnus-mail-save-name gnus-newsgroup-name
gnus-current-headers 'gnus-newsgroup-last-mail))
(gnus-eval-in-buffer-window gnus-save-article-buffer
(with-current-buffer gnus-save-article-buffer
(save-excursion
(save-restriction
(widen)
......@@ -3997,7 +3997,7 @@ Directory to save to is default to `gnus-article-save-directory'."
"Save %s in file" filename
gnus-file-save-name gnus-newsgroup-name
gnus-current-headers 'gnus-newsgroup-last-file))
(gnus-eval-in-buffer-window gnus-save-article-buffer
(with-current-buffer gnus-save-article-buffer
(save-excursion
(save-restriction
(widen)
......@@ -4029,7 +4029,7 @@ The directory to save in defaults to `gnus-article-save-directory'."
"Save %s body in file" filename
gnus-file-save-name gnus-newsgroup-name
gnus-current-headers 'gnus-newsgroup-last-file))
(gnus-eval-in-buffer-window gnus-save-article-buffer
(with-current-buffer gnus-save-article-buffer
(save-excursion
(save-restriction
(widen)
......@@ -4108,7 +4108,7 @@ and the raw article including all headers will be piped."
(if default
(setq command default)
(error "A command is required")))
(gnus-eval-in-buffer-window save-buffer
(with-current-buffer save-buffer
(save-restriction
(widen)
(shell-command-on-region (point-min) (point-max) command nil)))
......
......@@ -316,7 +316,8 @@ that was fetched."
(set-marker (caddr entry) nil))
(gnus-async-with-semaphore
(setq gnus-async-article-alist
(delq entry gnus-async-article-alist))))
(delq entry gnus-async-article-alist))
(unintern (car entry) gnus-async-hashtb)))
(defun gnus-async-prefetch-remove-group (group)
"Remove all articles belonging to GROUP from the prefetch buffer."
......@@ -332,8 +333,8 @@ that was fetched."
"Return the entry for ARTICLE in GROUP if it has been prefetched."
(let ((entry (save-excursion
(gnus-async-set-buffer)
(assq (intern (format "%s-%d" group article)
gnus-async-hashtb)
(assq (intern-soft (format "%s-%d" group article)
gnus-async-hashtb)
gnus-async-article-alist))))
;; Perhaps something has emptied the buffer?
(if (and entry
......
......@@ -2170,21 +2170,21 @@ be permanent."
The arguments are the same as `completing-read' except that COLLECTION
and HIST default to `gnus-active-hashtb' and `gnus-group-history'
respectively if they are omitted."
(let* ((choices (mapcar (lambda (symbol)
(let* ((collection (or collection (or gnus-active-hashtb [0])))
(choices (mapcar (lambda (symbol)
(let ((group (symbol-name symbol)))
(if (string-match "[^\000-\177]" group)
(gnus-group-decoded-name group)
group)))
(remove-if-not
'symbolp
(or collection (or gnus-active-hashtb [0])))))
(remove-if-not 'symbolp collection)))
(group
(gnus-completing-read (or prompt "Group") choices
require-match initial-input
(or hist 'gnus-group-history)
def)))
(or (symbol-value (intern-soft group collection))
(mm-encode-coding-string group (gnus-group-name-charset nil group)))))
(if (symbol-value (intern-soft group collection))
group
(mm-encode-coding-string group (gnus-group-name-charset nil group)))))
;;;###autoload
(defun gnus-fetch-group (group &optional articles)
......
......@@ -1265,7 +1265,8 @@ For the `inline' alternatives, also see the variable
(dolist (article (gnus-summary-work-articles n))
(gnus-summary-select-article nil nil nil article)
(with-current-buffer gnus-original-article-buffer
(message-resend address))
(let ((gnus-gcc-externalize-attachments nil))
(message-resend address)))
(gnus-summary-mark-article-as-forwarded article)))
;; From: Matthieu Moy <Matthieu.Moy@imag.fr>
......
......@@ -36,10 +36,12 @@
;; Put this in your startup file (~/.gnus.el for instance)
;; (require 'nnregistry) ;; optional, or see below (automatically calls `gnus-registry-install-nnregistry' when `gnus-registry-initialize' is called)
;; (setq gnus-registry-max-entries 2500
;; gnus-registry-use-long-group-names t)
;; (gnus-registry-initialize)
;; (gnus-registry-install-nnregistry) ;; optional, or see above (loading nnregistry makes it unnecessary)
;; Then use this in your fancy-split:
......@@ -1129,7 +1131,8 @@ Returns the first place where the trail finds a group name."
(setq gnus-registry-install t) ; in case it was 'ask or nil
(gnus-registry-install-hooks)
(gnus-registry-install-shortcuts)
(gnus-registry-install-nnregistry)
(when (featurep 'nnregistry)
(gnus-registry-install-nnregistry))
(gnus-registry-read))
;;;###autoload
......@@ -1150,14 +1153,13 @@ Returns the first place where the trail finds a group name."
(defun gnus-registry-install-nnregistry ()
"Install the nnregistry refer method in `gnus-refer-article-method'."
(interactive)
(when (featurep 'nnregistry)
(setq gnus-refer-article-method
(delete-dups
(append
(if (listp gnus-refer-article-method)
gnus-refer-article-method
(list gnus-refer-article-method))
(list 'nnregistry))))))
(setq gnus-refer-article-method
(delete-dups
(append
(if (listp gnus-refer-article-method)
gnus-refer-article-method
(list gnus-refer-article-method))
(list 'nnregistry)))))
(defun gnus-registry-unload-hook ()
"Uninstall the registry hooks."
......
......@@ -1465,7 +1465,7 @@ newsgroup."
(push group bogus)))
(if confirm
(map-y-or-n-p
"Remove bogus group %s? "
(format "Remove bogus group %%s (of %d groups)? " (length bogus))
(lambda (group)
;; Remove all bogus subscribed groups by first killing them, and
;; then removing them from the list of killed groups.
......
......@@ -3109,16 +3109,6 @@ The following commands are available:
;; Simple nil-valued local variable.
(set (make-local-variable local) nil)))))
(defun gnus-summary-clear-local-variables ()
(let ((locals gnus-summary-local-variables))
(while locals
(if (consp (car locals))
(and (symbolp (caar locals))
(set (caar locals) nil))
(and (symbolp (car locals))
(set (car locals) nil)))
(setq locals (cdr locals)))))
;; Summary data functions.
(defmacro gnus-data-number (data)
......@@ -6939,12 +6929,12 @@ displayed, no centering will be performed."
;; Various summary commands
(defun gnus-summary-select-article-buffer ()
"Reconfigure windows to show article buffer."
"Reconfigure windows to show the article buffer."
(interactive)
(if (not (gnus-buffer-live-p gnus-article-buffer))
(error "There is no article buffer for this summary buffer")
(gnus-configure-windows 'article)
(select-window (get-buffer-window gnus-article-buffer))))
(select-window (get-buffer-window gnus-article-buffer))
(gnus-configure-windows 'only-article t)))
(defun gnus-summary-universal-argument (arg)
"Perform any operation on all articles that are process/prefixed."
......@@ -7129,13 +7119,6 @@ If FORCE (the prefix), also save the .newsrc file(s)."
(progn
(gnus-deaden-summary)
(setq mode nil))
;; We set all buffer-local variables to nil. It is unclear why
;; this is needed, but if we don't, buffer-local variables are
;; not garbage-collected, it seems. This would the lead to en
;; ever-growing Emacs.
(gnus-summary-clear-local-variables)
(let ((gnus-summary-local-variables gnus-newsgroup-variables))
(gnus-summary-clear-local-variables))
(when (get-buffer gnus-article-buffer)
(bury-buffer gnus-article-buffer))
;; Return to group mode buffer.
......@@ -7194,9 +7177,6 @@ If FORCE (the prefix), also save the .newsrc file(s)."
(if (not gnus-kill-summary-on-exit)
(gnus-deaden-summary)
(gnus-close-group group)
(gnus-summary-clear-local-variables)
(let ((gnus-summary-local-variables gnus-newsgroup-variables))
(gnus-summary-clear-local-variables))
(gnus-kill-buffer gnus-summary-buffer))
(unless gnus-single-article-buffer
(setq gnus-article-current nil))
......@@ -7844,7 +7824,8 @@ If at the beginning of the article, go to the next article."
(defun gnus-summary-scroll-up (lines)
"Scroll up (or down) one line current article.
Argument LINES specifies lines to be scrolled up (or down if negative)."
Argument LINES specifies lines to be scrolled up (or down if negative).
If no article is selected, then the current article will be selected first."
(interactive "p")
(gnus-configure-windows 'article)
(gnus-summary-show-thread)
......@@ -7860,7 +7841,8 @@ Argument LINES specifies lines to be scrolled up (or down if negative)."
(defun gnus-summary-scroll-down (lines)
"Scroll down (or up) one line current article.
Argument LINES specifies lines to be scrolled down (or up if negative)."
Argument LINES specifies lines to be scrolled down (or up if negative).
If no article is selected, then the current article will be selected first."
(interactive "p")
(gnus-summary-scroll-up (- lines)))
......
......@@ -107,6 +107,9 @@ used to display Gnus windows."
(vertical 1.0
(summary 0.25)
(faq 1.0 point)))
(only-article
(vertical 1.0
(article 1.0 point)))
(edit-article
(vertical 1.0
(article 1.0 point)))
......
......@@ -1491,7 +1491,9 @@ newsgroups."
"*The number of articles which indicates a large newsgroup.
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."
If it is nil, no confirmation is required.
Also see `gnus-large-ephemeral-newsgroup'."
:group 'gnus-group-select
:type '(choice (const :tag "No limit" nil)
integer))
......@@ -3206,7 +3208,6 @@ If ARG, insert string at point."
(defun gnus-continuum-version (&optional version)
"Return VERSION as a floating point number."
(interactive)
(unless version
(setq version gnus-version))
(when (or (string-match "^\\([^ ]+\\)? ?Gnus v?\\([0-9.]+\\)$" version)
......
......@@ -812,7 +812,10 @@ If NO-DECODE is non-nil, don't decode STRING."
;;;
(defvar mailcap-mime-extensions
'(("" . "text/plain")
'(("" . "text/plain")
(".1" . "text/plain") ;; Manual pages
(".3" . "text/plain")
(".8" . "text/plain")
(".abs" . "audio/x-mpeg")
(".aif" . "audio/aiff")
(".aifc" . "audio/aiff")
......@@ -828,6 +831,7 @@ If NO-DECODE is non-nil, don't decode STRING."
(".css" . "text/css")
(".dvi" . "application/x-dvi")
(".diff" . "text/x-patch")
(".dpatch". "test/x-patch")
(".el" . "application/emacs-lisp")
(".eps" . "application/postscript")
(".etx" . "text/x-setext")
......@@ -869,6 +873,7 @@ If NO-DECODE is non-nil, don't decode STRING."
(".pict" . "image/pict")
(".png" . "image/png")
(".pnm" . "image/x-portable-anymap")
(".pod" . "text/plain")
(".ppm" . "image/portable-pixmap")
(".ps" . "application/postscript")
(".qt" . "video/quicktime")
......
......@@ -6049,6 +6049,7 @@ If the current line has `message-yank-prefix', insert it on the new line."
When sending via news, also check that the REFERENCES are less
than 988 characters long, and if they are not, trim them until
they are."
;; 21 is the number suggested by USEAGE.
(let ((maxcount 21)
(count 0)
(cut 2)
......
......@@ -42,15 +42,8 @@
If the encoding is `qp-or-base64', then either quoted-printable
or base64 will be used, depending on what is more efficient.
`qp-or-base64' has another effect. It will fold long lines so that
MIME parts may not be broken by MTA. So do `quoted-printable' and
`base64'.
Note: It affects body encoding only when a part is a raw forwarded
message (which will be made by `gnus-summary-mail-forward' with the
arg 2 for example) or is neither the text/* type nor the message/*
type. Even though in those cases, you can use the `encoding' MML tag
to specify encoding of non-ASCII MIME parts."
This list is only consulted when encoding MIME parts in the
bodies -- not for the regular non-MIME-ish messages."
:type '(repeat (list (regexp :tag "MIME type")
(choice :tag "encoding"
(const 7bit)
......
......@@ -74,14 +74,14 @@ from the document.")
(mbox
(article-begin-function . nndoc-mbox-article-begin)
(body-end-function . nndoc-mbox-body-end))
(mime-parts
(generate-head-function . nndoc-generate-mime-parts-head)
(article-transform-function . nndoc-transform-mime-parts))
(babyl
(article-begin . "\^_\^L *\n")
(body-end . "\^_")
(body-begin-function . nndoc-babyl-body-begin)
(head-begin-function . nndoc-babyl-head-begin))
(mime-parts
(generate-head-function . nndoc-generate-mime-parts-head)
(article-transform-function . nndoc-transform-mime-parts))
(exim-bounce
(article-begin . "^------ This is a copy of the message, including all the headers. ------\n\n")
(body-end-function . nndoc-exim-bounce-body-end-function))
......
......@@ -623,10 +623,11 @@ textual parts.")
(nnimap-update-infos marks (list info)))
(goto-char (point-max))
(let ((uidnext (nth 5 (car marks))))
(setq high (if uidnext
(1- uidnext)
(nth 3 (car marks)))
low (or (nth 4 (car marks)) uidnext)))))
(setq high (or (if uidnext
(1- uidnext)
(nth 3 (car marks)))
0)
low (or (nth 4 (car marks)) uidnext 1)))))
(erase-buffer)
(insert
(format
......@@ -912,6 +913,16 @@ textual parts.")
(or highest exists)))))))))
t))))
(deffoo nnimap-request-newgroups (date &optional server)
(nnimap-possibly-change-group nil server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(dolist (group (with-current-buffer (nnimap-buffer)
(nnimap-get-groups)))
(unless (assoc group nnimap-current-infos)
;; Insert dummy numbers here -- they don't matter.
(insert (format "%S 0 1 y\n" group))))))
(deffoo nnimap-retrieve-group-data-early (server infos)
(when (nnimap-possibly-change-group nil server)
(with-current-buffer (nnimap-buffer)
......@@ -990,7 +1001,9 @@ textual parts.")
(nnimap-update-info info (cdr (assoc group flags))))))
(defun nnimap-update-info (info marks)
(when marks
(when (and marks
;; Ignore groups with no UIDNEXT values.
(nth 4 marks))
(destructuring-bind (existing flags high low uidnext start-article
permanent-flags) marks
(let ((group (gnus-info-group info))
......
......@@ -104,7 +104,9 @@ mail belongs in that group.
The last element should always have \"\" as the regexp.
This variable can also have a function as its value."
This variable can also have a function as its value, and it can
also have a fancy split method as its value. See
`nnmail-split-fancy' for an explanation of that syntax."
:group 'nnmail-split
:type '(choice (repeat :tag "Alist" (group (string :tag "Name")
(choice regexp function)))
......@@ -1145,21 +1147,33 @@ FUNC will be called with the group name to determine the article number."
(run-hooks 'nnmail-split-hook)
(when (setq nnmail-split-tracing trace)
(setq nnmail-split-trace nil))
(if (and (symbolp nnmail-split-methods)
(fboundp nnmail-split-methods))
(let ((split
(condition-case error-info
;; `nnmail-split-methods' is a function, so we
;; just call this function here and use the
;; result.
(or (funcall nnmail-split-methods)
(and (not nnmail-inhibit-default-split-group)
'("bogus")))
(error
(nnheader-message
5 "Error in `nnmail-split-methods'; using `bogus' mail group: %S" error-info)
(sit-for 1)
'("bogus")))))
(if (or (and (symbolp nnmail-split-methods)
(fboundp nnmail-split-methods))
(and (listp nnmail-split-methods)
;; Not a regular split method, so it has to be a
;; fancy one.
(not (let ((top-element (car-safe nnmail-split-methods)))
(and (= 2 (length top-element))
(stringp (nth 0 top-element))
(stringp (nth 1 top-element)))))))
(let* ((method-function
(if (and (symbolp nnmail-split-methods)
(fboundp nnmail-split-methods))
nnmail-split-methods
'nnmail-split-fancy))
(split
(condition-case error-info
;; `nnmail-split-methods' is a function, so we
;; just call this function here and use the
;; result.
(or (funcall method-function)
(and (not nnmail-inhibit-default-split-group)
'("bogus")))
(error
(nnheader-message
5 "Error in `nnmail-split-methods'; using `bogus' mail group: %S" error-info)
(sit-for 1)
'("bogus")))))
(setq split (mm-delete-duplicates split))
;; The article may be "cross-posted" to `junk'. What
;; to do? Just remove the `junk' spec. Don't really
......
......@@ -640,6 +640,7 @@
nnmbox-mbox-file t t))))
(mm-enable-multibyte)
(buffer-disable-undo)
(gnus-add-buffer)
;; Go through the group alist and compare against the mbox file.
(while alist
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment