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

Merge changes made in Gnus trunk.

gnus.texi: Remove mentions of `recent', which are now obsolete.
 (Interactive): Document `quiet'.
nnimap.el: Redo the charset handling.  Let Gnus encode the names, as it does with all other backends, but decode the names immediately after getting them.
gnus-group.el (gnus-group-name-charset): Always return `utf-7' when decoding nnimap groups.
gnus.el (gnus-variable-list): Don't save `gnus-format-specs' in the newsrc file.  It doesn't seem like an important optimisation any more.
nnimap.el (nnimap-transform-headers): Fix regexp to be less prone to overflows.
gnus.el (gnus-article-mark-lists): Remove `recent'.
 (gnus-interactive-exit): Extend to `quiet'.
gnus-sum.el (gnus-offer-save-summaries): Use it.
gnus-art.el (gnus-treat-hide-citation-maybe): Add more doc to the string.
plstore.el (plstore--get-buffer): Silence compiler warnings by renaming function arguments from `this'.
gnus-sum.el (gnus-newsgroup-recent): Removed.
gnus-spec.el (gnus-lrm-string-p): `bidi-string-mark-left-to-right' has been renamed.
 (gnus-lrm-string-p): Include RLM and PDF, too.
gnus-int.el (gnus-open-server): Make the "denied" message clearer (bug#9225).
parent 3199b96f
2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi: Remove mentions of `recent', which are now obsolete.
(Interactive): Document `quiet'.
2011-08-15 Suvayu Ali <fatkasuvayu+linux@gmail.com> (tiny change)
* org.texi (Images in LaTeX export): rewrite.
......
......@@ -2983,7 +2983,7 @@ The available operators are @code{not}, @code{and} and @code{or}.
Predicates include @code{tick}, @code{unsend}, @code{undownload},
@code{unread}, @code{dormant}, @code{expire}, @code{reply},
@code{killed}, @code{bookmark}, @code{score}, @code{save},
@code{cache}, @code{forward}, @code{unseen} and @code{recent}.
@code{cache}, @code{forward}, and @code{unseen}.
@end table
......@@ -6164,19 +6164,10 @@ Articles ``saved'' (in some manner or other; not necessarily
religiously) are marked with an @samp{S} in the second column
(@code{gnus-saved-mark}).
@item
@vindex gnus-recent-mark
Articles that according to the server haven't been shown to the user
before are marked with a @samp{N} in the second column
(@code{gnus-recent-mark}). Note that not all servers support this
mark, in which case it simply never appears. Compare with
@code{gnus-unseen-mark}.
@item
@vindex gnus-unseen-mark
Articles that haven't been seen before in Gnus by the user are marked
with a @samp{.} in the second column (@code{gnus-unseen-mark}).
Compare with @code{gnus-recent-mark}.
@item
@vindex gnus-downloaded-mark
......@@ -22265,8 +22256,9 @@ is @code{t} by default.
@item gnus-interactive-exit
@vindex gnus-interactive-exit
Require confirmation before exiting Gnus. This variable is @code{t} by
default.
If non-@code{nil}, require a confirmation when exiting Gnus. If
@code{quiet}, update any active summary buffers automatically without
querying. The default value is @code{t}.
@end table
......@@ -27992,10 +27984,6 @@ If the new option @code{gnus-summary-display-while-building} is
non-@code{nil}, the summary buffer is shown and updated as it's being
built.
@item
The new @code{recent} mark @samp{.} indicates newly arrived messages (as
opposed to old but unread messages).
@item
Gnus supports RFC 2369 mailing list headers, and adds a number of
related commands in mailing list groups. @xref{Mailing List}.
......@@ -29572,9 +29560,9 @@ propagate the mark information to the server.
marks (preserving all marks not mentioned). @var{mark} is a list of
marks; where each mark is a symbol. Currently used marks are
@code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
@code{dormant}, @code{save}, @code{download}, @code{unsend},
@code{forward} and @code{recent}, but your back end should, if
possible, not limit itself to these.
@code{dormant}, @code{save}, @code{download}, @code{unsend}, and
@code{forward}, but your back end should, if possible, not limit
itself to these.
Given contradictory actions, the last action in the list should be the
effective one. That is, if your action contains a request to add the
2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* nnimap.el: Redo the charset handling. Let Gnus encode the names, as
it does with all other backends, but decode the names immediately after
getting them.
* gnus-group.el (gnus-group-name-charset): Always return `utf-7' when
decoding nnimap groups.
* gnus.el (gnus-variable-list): Don't save `gnus-format-specs' in the
newsrc file. It doesn't seem like an important optimisation any more.
2011-09-10 Dave Abrahams <dave@boostpro.com> (tiny change)
* nnimap.el (nnimap-transform-headers): Fix regexp to be less prone to
overflows.
2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.el (gnus-article-mark-lists): Remove `recent'.
(gnus-interactive-exit): Extend to `quiet'.
* gnus-sum.el (gnus-offer-save-summaries): Use it.
* gnus-art.el (gnus-treat-hide-citation-maybe): Add more doc to the
string.
* plstore.el (plstore--get-buffer): Silence compiler warnings by
renaming function arguments from `this'.
* gnus-sum.el (gnus-newsgroup-recent): Removed.
* gnus-spec.el (gnus-lrm-string-p): `bidi-string-mark-left-to-right'
has been renamed.
(gnus-lrm-string-p): Include RLM and PDF, too.
* gnus-int.el (gnus-open-server): Make the "denied" message clearer
(bug#9225).
2011-09-10 Eli Zaretskii <eliz@gnu.org>
Add autoload cookies for functions used by sendmail.el.
......
......@@ -1237,9 +1237,12 @@ predicate. See Info node `(gnus)Customizing Articles'."
:type gnus-article-treat-custom)
(defcustom gnus-treat-hide-citation-maybe nil
"Hide cited text.
"Hide cited text according to certain conditions.
Valid values are nil, t, `head', `first', `last', an integer or a
predicate. See Info node `(gnus)Customizing Articles'."
predicate. See Info node `(gnus)Customizing Articles'.
See `gnus-cite-hide-percentage' and `gnus-cite-hide-absolute' for
how to control what it hides."
:group 'gnus-article-treat
:link '(custom-manual "(gnus)Customizing Articles")
:type gnus-article-treat-custom)
......
......@@ -210,8 +210,8 @@
end nil))))))
(defmacro gnus-string-mark-left-to-right (string)
(if (fboundp 'string-mark-left-to-right)
`(string-mark-left-to-right ,string)
(if (fboundp 'bidi-string-mark-left-to-right)
`(bidi-string-mark-left-to-right ,string)
string))
(eval-and-compile
......
......@@ -1201,7 +1201,7 @@ The following commands are available:
(if (eq (car method) 'nnimap)
;; IMAP groups should not be encoded, since they do the encoding
;; in utf7 in the protocol.
nil
'utf-8
(let ((item (or (assoc method gnus-group-name-charset-method-alist)
(and (consp method)
(assoc (list (car method) (cadr method))
......@@ -4069,7 +4069,7 @@ If DONT-SCAN is non-nil, scan non-activated groups as well."
(gnus-group-update-group group nil t))
(if (eq (gnus-server-status (gnus-find-method-for-group group))
'denied)
(gnus-error 3 "Server denied access")
(gnus-error 3 "Server previously determined to be down; not retrying")
(gnus-error 3 "%s error: %s" group (gnus-status-message group)))))
(when beg
(goto-char beg))
......
......@@ -255,7 +255,8 @@ If it is down, start it up (again)."
;; If this method was previously denied, we just return nil.
(if (eq (nth 1 elem) 'denied)
(progn
(gnus-message 1 "Denied server %s" server)
(gnus-message
1 "Server %s previously determined to be down; not retrying" server)
nil)
;; Open the server.
(let* ((open-server-function
......
......@@ -91,8 +91,10 @@ text properties. This is only needed on XEmacs, as Emacs does this anyway."
(header gnus-tmp-from))
(defmacro gnus-lrm-string-p (string)
(if (fboundp 'string-mark-left-to-rigth)
`(eq (aref ,string (1- (length ,string))) 8206)
(if (fboundp 'bidi-string-mark-left-to-right)
;; LRM, RLM, PDF characters as integers to avoid breaking Emacs
;; 23.
`(memq (aref ,string (1- (length ,string))) '(8206 8207 8236))
nil))
(defvar gnus-lrm-string (if (ignore-errors (string 8206))
......
......@@ -1499,9 +1499,6 @@ the type of the variable (string, integer, character, etc).")
(defvar gnus-newsgroup-forwarded nil
"List of articles that have been forwarded in the current newsgroup.")
(defvar gnus-newsgroup-recent nil
"List of articles that have are recent in the current newsgroup.")
(defvar gnus-newsgroup-expirable nil
"Sorted list of articles in the current newsgroup that can be expired.")
......@@ -1578,7 +1575,6 @@ This list will always be a subset of gnus-newsgroup-undownloaded.")
gnus-newsgroup-saved
gnus-newsgroup-replied
gnus-newsgroup-forwarded
gnus-newsgroup-recent
gnus-newsgroup-expirable
gnus-newsgroup-killed
gnus-newsgroup-unseen
......@@ -3743,8 +3739,6 @@ buffer that was in action when the last article was fetched."
gnus-forwarded-mark)
((memq gnus-tmp-current gnus-newsgroup-saved)
gnus-saved-mark)
((memq gnus-tmp-number gnus-newsgroup-recent)
gnus-recent-mark)
((memq gnus-tmp-number gnus-newsgroup-unseen)
gnus-unseen-mark)
(t gnus-no-mark)))
......@@ -5395,8 +5389,6 @@ or a straight list of headers."
gnus-forwarded-mark)
((memq number gnus-newsgroup-saved)
gnus-saved-mark)
((memq number gnus-newsgroup-recent)
gnus-recent-mark)
((memq number gnus-newsgroup-unseen)
gnus-unseen-mark)
(t gnus-no-mark))
......@@ -5807,8 +5799,6 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(memq article gnus-newsgroup-forwarded))
((eq type 'seen)
(not (memq article gnus-newsgroup-unseen)))
((eq type 'recent)
(memq article gnus-newsgroup-recent))
(t t))))
(defun gnus-articles-to-read (group &optional read-all)
......@@ -10985,8 +10975,6 @@ If NO-EXPIRE, auto-expiry will be inhibited."
gnus-forwarded-mark)
((memq article gnus-newsgroup-saved)
gnus-saved-mark)
((memq article gnus-newsgroup-recent)
gnus-recent-mark)
((memq article gnus-newsgroup-unseen)
gnus-unseen-mark)
(t gnus-no-mark))
......@@ -12594,12 +12582,16 @@ UNREAD is a sorted list."
;; Go through all these summary buffers and offer to save them.
(when buffers
(save-excursion
(map-y-or-n-p
"Update summary buffer %s? "
(lambda (buf)
(switch-to-buffer buf)
(gnus-summary-exit))
buffers)))))
(if (eq gnus-interactive-exit 'quiet)
(dolist (buffer buffers)
(switch-to-buffer buffer)
(gnus-summary-exit))
(map-y-or-n-p
"Update summary buffer %s? "
(lambda (buf)
(switch-to-buffer buf)
(gnus-summary-exit))
buffers))))))
(defun gnus-summary-setup-default-charset ()
"Setup newsgroup default charset."
......
......@@ -1591,7 +1591,9 @@ commands will still require prompting."
:type 'boolean)
(defcustom gnus-interactive-exit t
"*If non-nil, require your confirmation when exiting Gnus."
"*If non-nil, require your confirmation when exiting Gnus.
If `quiet', update any active summary buffers automatically
first before exiting."
:group 'gnus-exit
:type 'boolean)
......@@ -2623,7 +2625,7 @@ a string, be sure to use a valid format, see RFC 2616."
(scored . score) (saved . save)
(cached . cache) (downloadable . download)
(unsendable . unsend) (forwarded . forward)
(recent . recent) (seen . seen)))
(seen . seen)))
(defconst gnus-article-special-mark-lists
'((seen range)
......@@ -2689,8 +2691,7 @@ such as a mark that says whether an article is stored in the cache
gnus-newsrc-last-checked-date
gnus-newsrc-alist gnus-server-alist
gnus-killed-list gnus-zombie-list
gnus-topic-topology gnus-topic-alist
gnus-format-specs)
gnus-topic-topology gnus-topic-alist)
"Gnus variables saved in the quick startup file.")
(defvar gnus-newsrc-alist nil
......
......@@ -168,6 +168,8 @@ textual parts.")
nnmail-extra-headers))))
(deffoo nnimap-retrieve-headers (articles &optional group server fetch-old)
(when group
(setq group (nnimap-decode-gnus-group group)))
(with-current-buffer nntp-server-buffer
(erase-buffer)
(when (nnimap-possibly-change-group group server)
......@@ -190,7 +192,7 @@ textual parts.")
(let (article bytes lines size string)
(block nil
(while (not (eobp))
(while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)"))
(while (not (looking-at "\\* [0-9]+ FETCH.+?UID \\([0-9]+\\)"))
(delete-region (point) (progn (forward-line 1) (point)))
(when (eobp)
(return)))
......@@ -523,6 +525,8 @@ textual parts.")
nnimap-status-string)
(deffoo nnimap-request-article (article &optional group server to-buffer)
(when group
(setq group (nnimap-decode-gnus-group group)))
(with-current-buffer nntp-server-buffer
(let ((result (nnimap-possibly-change-group group server))
parts structure)
......@@ -554,6 +558,8 @@ textual parts.")
(cons group article)))))))
(deffoo nnimap-request-head (article &optional group server to-buffer)
(when group
(setq group (nnimap-decode-gnus-group group)))
(when (nnimap-possibly-change-group group server)
(with-current-buffer (nnimap-buffer)
(when (stringp article)
......@@ -700,7 +706,11 @@ textual parts.")
(incf num)))
(nreverse parts)))
(defun nnimap-decode-gnus-group (group)
(decode-coding-string group 'utf-8))
(deffoo nnimap-request-group (group &optional server dont-check info)
(setq group (nnimap-decode-gnus-group group))
(let ((result (nnimap-possibly-change-group
;; Don't SELECT the group if we're going to select it
;; later, anyway.
......@@ -750,16 +760,19 @@ textual parts.")
t))))
(deffoo nnimap-request-create-group (group &optional server args)
(setq group (nnimap-decode-gnus-group group))
(when (nnimap-possibly-change-group nil server)
(with-current-buffer (nnimap-buffer)
(car (nnimap-command "CREATE %S" (utf7-encode group t))))))
(deffoo nnimap-request-delete-group (group &optional force server)
(setq group (nnimap-decode-gnus-group group))
(when (nnimap-possibly-change-group nil server)
(with-current-buffer (nnimap-buffer)
(car (nnimap-command "DELETE %S" (utf7-encode group t))))))
(deffoo nnimap-request-rename-group (group new-name &optional server)
(setq group (nnimap-decode-gnus-group group))
(when (nnimap-possibly-change-group nil server)
(with-current-buffer (nnimap-buffer)
(nnimap-unselect-group)
......@@ -774,6 +787,7 @@ textual parts.")
(nnimap-command "EXAMINE DOES.NOT.EXIST"))
(deffoo nnimap-request-expunge-group (group &optional server)
(setq group (nnimap-decode-gnus-group group))
(when (nnimap-possibly-change-group group server)
(with-current-buffer (nnimap-buffer)
(car (nnimap-command "EXPUNGE")))))
......@@ -801,6 +815,7 @@ textual parts.")
(deffoo nnimap-request-move-article (article group server accept-form
&optional last internal-move-group)
(setq group (nnimap-decode-gnus-group group))
(with-temp-buffer
(mm-disable-multibyte)
(when (funcall (if internal-move-group
......@@ -829,6 +844,7 @@ textual parts.")
result)))))))
(deffoo nnimap-request-expire-articles (articles group &optional server force)
(setq group (nnimap-decode-gnus-group group))
(cond
((null articles)
nil)
......@@ -956,6 +972,8 @@ textual parts.")
"delete this article now"))))))
(deffoo nnimap-request-scan (&optional group server)
(when group
(setq group (nnimap-decode-gnus-group group)))
(when (and (nnimap-possibly-change-group nil server)
nnimap-inbox
nnimap-split-methods)
......@@ -971,6 +989,7 @@ textual parts.")
flags))
(deffoo nnimap-request-update-group-status (group status &optional server)
(setq group (nnimap-decode-gnus-group group))
(when (nnimap-possibly-change-group nil server)
(let ((command (assoc
status
......@@ -981,6 +1000,7 @@ textual parts.")
(nnimap-command "%s %S" (cadr command) (utf7-encode group t)))))))
(deffoo nnimap-request-set-mark (group actions &optional server)
(setq group (nnimap-decode-gnus-group group))
(when (nnimap-possibly-change-group group server)
(let (sequence)
(with-current-buffer (nnimap-buffer)
......@@ -1005,6 +1025,7 @@ textual parts.")
(nnimap-wait-for-response sequence))))))
(deffoo nnimap-request-accept-article (group &optional server last)
(setq group (nnimap-decode-gnus-group group))
(when (nnimap-possibly-change-group nil server)
(nnmail-check-syntax)
(let ((message-id (message-field-value "message-id"))
......@@ -1081,6 +1102,7 @@ textual parts.")
result))
(deffoo nnimap-request-replace-article (article group buffer)
(setq group (nnimap-decode-gnus-group group))
(let (group-art)
(when (and (nnimap-possibly-change-group group nil)
;; Put the article into the group.
......@@ -1186,7 +1208,8 @@ textual parts.")
;; what and how to request the data.
(dolist (info infos)
(setq params (gnus-info-params info)
group (gnus-group-real-name (gnus-info-group info))
group (nnimap-decode-gnus-group
(gnus-group-real-name (gnus-info-group info)))
active (cdr (assq 'active params))
uidvalidity (cdr (assq 'uidvalidity params))
modseq (cdr (assq 'modseq params)))
......@@ -1262,13 +1285,15 @@ textual parts.")
(active (gnus-active group)))
(when active
(insert (format "%S %d %d y\n"
(gnus-group-real-name group)
(decode-coding-string
(gnus-group-real-name group) 'utf-8)
(cdr active)
(car active)))))))))))
(defun nnimap-update-infos (flags infos)
(dolist (info infos)
(let* ((group (gnus-group-real-name (gnus-info-group info)))
(let* ((group (nnimap-decode-gnus-group
(gnus-group-real-name (gnus-info-group info))))
(marks (cdr (assoc group flags))))
(when marks
(nnimap-update-info info marks)))))
......@@ -1570,6 +1595,8 @@ textual parts.")
(articles &optional limit force-new dependencies))
(deffoo nnimap-request-thread (header &optional group server)
(when group
(setq group (nnimap-decode-gnus-group group)))
(if gnus-refer-thread-use-nnir
(nnir-search-thread header)
(when (nnimap-possibly-change-group group server)
......
......@@ -135,38 +135,38 @@ May either be a string or a list of strings.")
(message "%s...%d%%" handback
(if (> total 0) (floor (* (/ current (float total)) 100)) 0))))
(defun plstore--get-buffer (this)
(aref this 0))
(defun plstore--get-buffer (arg)
(aref arg 0))
(defun plstore--get-alist (this)
(aref this 1))
(defun plstore--get-alist (arg)
(aref arg 1))
(defun plstore--get-encrypted-data (this)
(aref this 2))
(defun plstore--get-encrypted-data (arg)
(aref arg 2))
(defun plstore--get-secret-alist (this)
(aref this 3))
(defun plstore--get-secret-alist (arg)
(aref arg 3))
(defun plstore--get-merged-alist (this)
(aref this 4))
(defun plstore--get-merged-alist (arg)
(aref arg 4))
(defun plstore--set-buffer (this buffer)
(aset this 0 buffer))
(defun plstore--set-buffer (arg buffer)
(aset arg 0 buffer))
(defun plstore--set-alist (this plist)
(aset this 1 plist))
(defun plstore--set-alist (arg plist)
(aset arg 1 plist))
(defun plstore--set-encrypted-data (this encrypted-data)
(aset this 2 encrypted-data))
(defun plstore--set-encrypted-data (arg encrypted-data)
(aset arg 2 encrypted-data))
(defun plstore--set-secret-alist (this secret-alist)
(aset this 3 secret-alist))
(defun plstore--set-secret-alist (arg secret-alist)
(aset arg 3 secret-alist))
(defun plstore--set-merged-alist (this merged-alist)
(aset this 4 merged-alist))
(defun plstore--set-merged-alist (arg merged-alist)
(aset arg 4 merged-alist))
(defun plstore-get-file (this)
(buffer-file-name (plstore--get-buffer this)))
(defun plstore-get-file (arg)
(buffer-file-name (plstore--get-buffer arg)))
(defun plstore--make (&optional buffer alist encrypted-data secret-alist
merged-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