summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog44
-rw-r--r--lisp/gnus/compface.el40
-rw-r--r--lisp/gnus/gnus-util.el11
-rw-r--r--lisp/gnus/gnus.el9
-rw-r--r--lisp/gnus/mm-extern.el2
-rw-r--r--lisp/gnus/nnheader.el20
-rw-r--r--lisp/gnus/nnweb.el11
7 files changed, 106 insertions, 31 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index beccd918c3e..6927e3bfbac 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,47 @@
+2006-08-23 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
+
+ [ Backported bug fix from No Gnus. ]
+
+ * gnus.el (gnus-find-method-for-group): On killed/unknown groups, try
+ looking up the method using GROUP's prefix before inventing a new one.
+ It is used on killed/unknown groups in various places where returning
+ an all-new method isn't expected by the caller.
+
+ * gnus-util.el (gnus-group-server): Copy required macro from No Gnus.
+
+2006-08-13 Romain Francoise <romain@orebokech.com>
+
+ * mm-extern.el (mm-extern-mail-server): End `y-or-n-p' prompt with a
+ space.
+
+2006-08-09 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * compface.el (uncompface): Use binary rather than raw-text-unix.
+
+2006-08-09 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * compface.el (uncompface): Make sure the eol conversion doesn't take
+ place when communicating with the external programs. Reported by
+ ARISAWA Akihiro <ari@mbf.ocn.ne.jp>.
+
+2006-07-31 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nnheader.el (nnheader-insert-head): Fix typo in comment.
+
+2006-07-31 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
+
+ * nnweb.el (nnweb-google-parse-1): Update regexp for author and date.
+ Make it more robust by parsing author and date independently.
+
+2006-07-28 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nnheader.el (nnheader-insert-head): Make it work with Mac as well.
+
+2006-07-27 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nnheader.el (nnheader-insert-head): Make it work even if the file
+ uses CRLF for the line-break code.
+
2006-07-19 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
* mm-url.el (mm-url-insert-file-contents): Inhibit Connection: close
diff --git a/lisp/gnus/compface.el b/lisp/gnus/compface.el
index f6bd9bfd720..33e05046e84 100644
--- a/lisp/gnus/compface.el
+++ b/lisp/gnus/compface.el
@@ -34,24 +34,28 @@ GNU/Linux system these might be in packages with names like `compface'
or `faces-xface' and `netpbm' or `libgr-progs', for instance."
(with-temp-buffer
(insert face)
- (and (eq 0 (apply 'call-process-region (point-min) (point-max)
- "uncompface"
- 'delete '(t nil) nil))
- (progn
- (goto-char (point-min))
- (insert "/* Width=48, Height=48 */\n")
- ;; I just can't get "icontopbm" to work correctly on its
- ;; own in XEmacs. And Emacs doesn't understand un-raw pbm
- ;; files.
- (if (not (featurep 'xemacs))
- (eq 0 (call-process-region (point-min) (point-max)
- "icontopbm"
- 'delete '(t nil)))
- (shell-command-on-region (point-min) (point-max)
- "icontopbm | pnmnoraw"
- (current-buffer) t)
- t))
- (buffer-string))))
+ (let ((coding-system-for-read 'raw-text)
+ ;; At least "icontopbm" doesn't work with Windows because
+ ;; the line-break code is converted into CRLF by default.
+ (coding-system-for-write 'binary))
+ (and (eq 0 (apply 'call-process-region (point-min) (point-max)
+ "uncompface"
+ 'delete '(t nil) nil))
+ (progn
+ (goto-char (point-min))
+ (insert "/* Width=48, Height=48 */\n")
+ ;; I just can't get "icontopbm" to work correctly on its
+ ;; own in XEmacs. And Emacs doesn't understand un-raw pbm
+ ;; files.
+ (if (not (featurep 'xemacs))
+ (eq 0 (call-process-region (point-min) (point-max)
+ "icontopbm"
+ 'delete '(t nil)))
+ (shell-command-on-region (point-min) (point-max)
+ "icontopbm | pnmnoraw"
+ (current-buffer) t)
+ t))
+ (buffer-string)))))
(provide 'compface)
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 6b525fc490c..6f706fabce5 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -607,6 +607,17 @@ If N, return the Nth ancestor instead."
(substring gname (match-end 0))
gname)))
+(defmacro gnus-group-server (group)
+ "Find the server name of a foreign newsgroup.
+For example, (gnus-group-server \"nnimap+yxa:INBOX.foo\") would
+yield \"nnimap:yxa\"."
+ `(let ((gname ,group))
+ (if (string-match "^\\([^:+]+\\)\\(?:\\+\\([^:]*\\)\\)?:" gname)
+ (format "%s:%s" (match-string 1 gname) (or
+ (match-string 2 gname)
+ ""))
+ (format "%s:%s" (car gnus-select-method) (cadr gnus-select-method)))))
+
(defun gnus-make-sort-function (funs)
"Return a composite sort condition based on the functions in FUNS."
(cond
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 7a04c61151a..8554b1332f1 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -4079,8 +4079,13 @@ If NEWSGROUP is nil, return the global kill file name instead."
(or gnus-override-method
(and (not group)
gnus-select-method)
- (and (not (gnus-group-entry group)) ;; a new group
- (gnus-group-name-to-method group))
+ (and (not (gnus-group-entry group))
+ ;; Killed or otherwise unknown group.
+ (or
+ ;; If we know a virtual server by that name, return its method.
+ (gnus-server-to-method (gnus-group-server group))
+ ;; Guess a new method as last resort.
+ (gnus-group-name-to-method group)))
(let ((info (or info (gnus-get-info group)))
method)
(if (or (not info)
diff --git a/lisp/gnus/mm-extern.el b/lisp/gnus/mm-extern.el
index c574bd6156e..f4c728541e9 100644
--- a/lisp/gnus/mm-extern.el
+++ b/lisp/gnus/mm-extern.el
@@ -97,7 +97,7 @@
(subject (or (cdr (assq 'subject params)) "none"))
(buf (current-buffer))
info)
- (if (y-or-n-p (format "Send a request message to %s?" server))
+ (if (y-or-n-p (format "Send a request message to %s? " server))
(save-window-excursion
(message-mail server subject)
(message-goto-body)
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index d564d42414e..82e1d3ab554 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -586,17 +586,27 @@ the line could be found."
(if (eq nnheader-max-head-length t)
;; Just read the entire file.
(nnheader-insert-file-contents file)
- ;; Read 1K blocks until we find a separator.
+ ;; Read blocks of the size specified by `nnheader-head-chop-length'
+ ;; until we find a separator.
(let ((beg 0)
- format-alist)
+ (start (point))
+ ;; Use `binary' to prevent the contents from being decoded,
+ ;; or it will change the number of characters that
+ ;; `insert-file-contents' returns.
+ (coding-system-for-read 'binary))
(while (and (eq nnheader-head-chop-length
- (nth 1 (nnheader-insert-file-contents
+ (nth 1 (mm-insert-file-contents
file nil beg
(incf beg nnheader-head-chop-length))))
- (prog1 (not (search-forward "\n\n" nil t))
+ ;; CRLF or CR might be used for the line-break code.
+ (prog1 (not (re-search-forward "\n\r?\n\\|\r\r" nil t))
(goto-char (point-max)))
(or (null nnheader-max-head-length)
- (< beg nnheader-max-head-length))))))
+ (< beg nnheader-max-head-length))))
+ ;; Finally decode the contents.
+ (when (mm-coding-system-p nnheader-file-coding-system)
+ (mm-decode-coding-region start (point-max)
+ nnheader-file-coding-system))))
t))
(defun nnheader-article-p ()
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el
index 7c0c8e0e444..d020d533aea 100644
--- a/lisp/gnus/nnweb.el
+++ b/lisp/gnus/nnweb.el
@@ -366,14 +366,15 @@ Valid types include `google', `dejanews', and `gmane'.")
(mm-url-decode-entities)
(search-backward " - ")
(when (looking-at
- " - \\([a-zA-Z]+\\) \\([0-9]+\\)\\(?: \\([0-9]\\{4\\}\\)\\)?[^\n]+by ?\n?\\([^<\n]+\\)\n")
- (setq From (match-string 4)
- Date (format "%s %s 00:00:00 %s"
+ "\\W+\\(\\w+\\) \\([0-9]+\\)\\(?: \\([0-9]\\{4\\}\\)\\)?")
+ (setq Date (format "%s %s 00:00:00 %s"
(match-string 1)
(match-string 2)
(or (match-string 3)
- (substring (current-time-string) -4)))))
-
+ (substring (current-time-string) -4))))
+ (goto-char (match-end 0)))
+ (when (looking-at "[^b]+by\\W+\\([^<\n]+\\)")
+ (setq From (match-string 1)))
(widen)
(forward-line 1)
(incf i)