** International host names (IDNA) can now be decoded inside article bodies
using `W i' (`gnus-summary-idna-message'). This requires that GNU Libidn
-(`http://www.gnu.org/software/libidn/') has been installed.
+(<http://www.gnu.org/software/libidn/>) has been installed.
** The non-ASCII group names handling has been much improved. The back
ends that fully support non-ASCII group names are now `nntp', `nnml',
** You can replace MIME parts with external bodies. See
`gnus-mime-replace-part' and `gnus-article-replace-part'. *Note MIME
-Commands::, *note Using MIME::.
+Commands::, *Note Using MIME::.
** The option `mm-fill-flowed' can be used to disable treatment of
format=flowed messages. Also, flowed text is disabled when sending
** The option `message-citation-line-format' controls the format of the
"Whomever writes:" line. You need to set
`message-citation-line-function' to
-`message-insert-formated-citation-line' as well.
+`message-insert-formatted-citation-line' as well.
\f
* Changes in back ends
* gnus-demon.el (gnus-demon):
* gnus-uu.el (gnus-uu-default-view-rules): Fix typos in docstrings.
+2007-11-15 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nntp.el (nntp-insert-buffer-substring, nntp-copy-to-buffer): New
+ macros.
+ (nntp-wait-for, nntp-retrieve-articles, nntp-async-trigger)
+ (nntp-retrieve-headers-with-xover): Use nntp-insert-buffer-substring to
+ copy data from unibyte buffer to multibyte current buffer.
+ (nntp-retrieve-headers, nntp-retrieve-groups); Use nntp-copy-to-buffer
+ to copy data from unibyte current buffer to multibyte buffer.
+ (nntp-make-process-buffer): Make process buffer unibyte.
+
+ * pop3.el (pop3-open-server): Fix typo in Lisp code.
+
+2007-11-14 Denys Duchier <denys.duchier@univ-orleans.fr> (tiny change)
+
+ * pop3.el (pop3-open-server): Accept and process data more robustly at
+ connexion start to avoid spurious "POP SSL connexion failed" errors.
+
+2007-11-14 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-start.el (gnus-active-to-gnus-format): Use unibyte buffer to
+ read group names.
+
+2007-11-12 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-msg.el (gnus-confirm-mail-reply-to-news): Adjust :version.
+
+2007-11-12 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nnmail.el (nnmail-parse-active): Make group names unibyte.
+ (nnmail-save-active): Use a unibyte buffer when saving active file,
+ which may contain non-ASCII group names.
+
+ * nnml.el (nnml-request-group): Decode group names in messages.
+
2007-11-05 Reiner Steib <Reiner.Steib@gmx.de>
* message.el (message-citation-line-function)
parameter, which should return non-nil if a confirmation is needed; or
a regexp, in which case a confirmation is asked for if the group name
matches the regexp."
- :version "22.1"
+ :version "23.0" ;; No Gnus (default changed)
:group 'gnus-message
:type '(choice (const :tag "No" nil)
(const :tag "Yes" t)
(if (equal method gnus-select-method)
(gnus-make-hashtable
(count-lines (point-min) (point-max)))
- (gnus-make-hashtable 4096)))))))
+ (gnus-make-hashtable 4096))))))
+ group max min)
;; Delete unnecessary lines.
(goto-char (point-min))
(cond
(insert prefix)
(zerop (forward-line 1)))))))
;; Store the active file in a hash table.
- (goto-char (point-min))
- (let (group max min)
+ ;; Use a unibyte buffer in order to make `read' read non-ASCII
+ ;; group names (which have been encoded) as unibyte strings.
+ (mm-with-unibyte-buffer
+ (insert-buffer-substring cur)
+ (setq cur (current-buffer))
+ (goto-char (point-min))
(while (not (eobp))
(condition-case ()
(progn
(setq group (symbol-name group)))
(if (and (numberp (setq max (read buffer)))
(numberp (setq min (read buffer))))
- (push (list group (cons min max))
+ (push (list (mm-string-as-unibyte group) (cons min max))
group-assoc)))
(error nil))
(widen)
(let ((coding-system-for-write nnmail-active-file-coding-system))
(when file-name
(with-temp-file file-name
+ (mm-disable-multibyte)
(nnmail-generate-active group-assoc)))))
(defun nnmail-generate-active (alist)
(string-to-number (file-name-nondirectory path)))))))
(deffoo nnml-request-group (group &optional server dont-check)
- (let ((file-name-coding-system nnmail-pathname-coding-system))
+ (let ((file-name-coding-system nnmail-pathname-coding-system)
+ (decoded (nnml-decoded-group-name group server)))
(cond
((not (nnml-possibly-change-directory group server))
(nnheader-report 'nnml "Invalid group (no such directory)"))
((not (file-directory-p nnml-current-directory))
(nnheader-report 'nnml "%s is not a directory" nnml-current-directory))
(dont-check
- (nnheader-report 'nnml "Group %s selected" group)
+ (nnheader-report 'nnml "Group %s selected" decoded)
t)
(t
(nnheader-re-read-dir nnml-current-directory)
(nnmail-activate 'nnml)
(let ((active (nth 1 (assoc group nnml-group-alist))))
(if (not active)
- (nnheader-report 'nnml "No such group: %s" group)
- (nnheader-report 'nnml "Selected group %s" group)
+ (nnheader-report 'nnml "No such group: %s" decoded)
+ (nnheader-report 'nnml "Selected group %s" decoded)
(nnheader-insert "211 %d %d %d %s\n"
(max (1+ (- (cdr active) (car active))) 0)
(car active) (cdr active) group)))))))
(throw 'nntp-with-open-group-error t))
+(defmacro nntp-insert-buffer-substring (buffer &optional start end)
+ "Copy string from unibyte buffer to multibyte current buffer."
+ (if (featurep 'xemacs)
+ `(insert-buffer-substring ,buffer ,start ,end)
+ `(if enable-multibyte-characters
+ (insert (with-current-buffer ,buffer
+ (mm-string-to-multibyte
+ ,(if (or start end)
+ `(buffer-substring (or ,start (point-min))
+ (or ,end (point-max)))
+ '(buffer-string)))))
+ (insert-buffer-substring ,buffer ,start ,end))))
+
+(defmacro nntp-copy-to-buffer (buffer start end)
+ "Copy string from unibyte current buffer to multibyte buffer."
+ (if (featurep 'xemacs)
+ `(copy-to-buffer ,buffer ,start ,end)
+ `(let ((string (buffer-substring ,start ,end)))
+ (with-current-buffer ,buffer
+ (erase-buffer)
+ (insert (if enable-multibyte-characters
+ (mm-string-to-multibyte string)
+ string))
+ (goto-char (point-min))
+ nil))))
+
(defsubst nntp-wait-for (process wait-for buffer &optional decode discard)
"Wait for WAIT-FOR to arrive from PROCESS."
(save-excursion
(set-buffer buffer)
(goto-char (point-max))
- (insert-buffer-substring (process-buffer process))
+ (nntp-insert-buffer-substring (process-buffer process))
;; Nix out "nntp reading...." message.
(when nntp-have-messaged
(setq nntp-have-messaged nil)
nntp-server-buffer))
(buffer (and process
(process-buffer process))))
- ;; When I an able to identify the
+ ;; When I am able to identify the
;; connection to the server AND I've
;; received NO reponse for
;; nntp-connection-timeout seconds.
(nnheader-fold-continuation-lines)
;; Remove all "\r"'s.
(nnheader-strip-cr)
- (copy-to-buffer nntp-server-buffer (point-min) (point-max))
+ (nntp-copy-to-buffer nntp-server-buffer (point-min) (point-max))
'headers)))))
(deffoo nntp-retrieve-groups (groups &optional server)
(if (not nntp-server-list-active-group)
(progn
- (copy-to-buffer nntp-server-buffer (point-min) (point-max))
+ (nntp-copy-to-buffer nntp-server-buffer
+ (point-min) (point-max))
'group)
;; We have read active entries, so we just delete the
;; superfluous gunk.
(while (re-search-forward "^[.2-5]" nil t)
(delete-region (match-beginning 0)
(progn (forward-line 1) (point))))
- (copy-to-buffer nntp-server-buffer (point-min) (point-max))
+ (nntp-copy-to-buffer nntp-server-buffer (point-min) (point-max))
'active)))))))
(deffoo nntp-retrieve-articles (articles &optional group server)
(narrow-to-region
(setq point (goto-char (point-max)))
(progn
- (insert-buffer-substring buf last-point (cdr entry))
+ (nntp-insert-buffer-substring buf last-point (cdr entry))
(point-max)))
(setq last-point (cdr entry))
(nntp-decode-text)
(format " *server %s %s %s*"
nntp-address nntp-port-number
(gnus-buffer-exists-p buffer))))
- (mm-enable-multibyte)
+ (mm-disable-multibyte)
(set (make-local-variable 'after-change-functions) nil)
(set (make-local-variable 'nntp-process-wait-for) nil)
(set (make-local-variable 'nntp-process-callback) nil)
(goto-char (point-max))
(save-restriction
(narrow-to-region (point) (point))
- (insert-buffer-substring buf start)
+ (nntp-insert-buffer-substring buf start)
(when decode
(nntp-decode-text))))))
;; report it.
(when in-process-buffer-p
(set-buffer buf)
(goto-char (point-max))
- (insert-buffer-substring process-buffer)
+ (nntp-insert-buffer-substring process-buffer)
(set-buffer process-buffer)
(erase-buffer)
(set-buffer buf))
mailhost port)))
(when process
;; There's a load of info printed that needs deleting.
- (while (when (memq (process-status process) '(open run))
- (pop3-accept-process-output process)
- (goto-char (point-max))
- (forward-line -1)
- (if (looking-at "\\+OK")
- (progn
- (delete-region (point-min) (point))
- nil)
+ (let ((again 't))
+ ;; repeat until
+ ;; - either we received the +OK line
+ ;; - or accept-process-output timed out without getting
+ ;; anything
+ (while (and again
+ (setq again (memq (process-status process)
+ '(open run))))
+ (setq again (pop3-accept-process-output process))
+ (goto-char (point-max))
+ (forward-line -1)
+ (cond ((looking-at "\\+OK")
+ (setq again nil)
+ (delete-region (point-min) (point)))
+ ((not again)
(pop3-quit process)
- (error "POP SSL connexion failed"))))
+ (error "POP SSL connexion failed")))))
process)))
((eq pop3-stream-type 'starttls)
;; gnutls-cli, openssl don't accept service names