Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] Make message-insert-citation-line works with nnrss groups
@ 2006-09-14 19:41 Andrea Russo
  2006-09-14 23:57 ` Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Andrea Russo @ 2006-09-14 19:41 UTC (permalink / raw)


Hi,

There is a bug in `message-insert-citation-line' that happens when
trying to reply to an article in a nnrss group.

Various blogging software doesn't set a `From' header in blog posts,
so when gnus tries to cite the author of the post, it hits a `Wrong
type argument' error.

This patch tries to fix this.

Best Regards,
Andrea Russo.

--- orig/lisp/gnus/ChangeLog
+++ mod/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-14  Andrea Russo  <rast4ndy@gmail.com>
+
+	* message.el (message-insert-citation-line): Check if the from header
+	is nil.  This may happens in articles from nnrss groups.
+


--- orig/lisp/gnus/message.el
+++ mod/lisp/gnus/message.el
@@ -3346,9 +3346,11 @@
 (defun message-insert-citation-line ()
   "Insert a simple citation line."
   (when message-reply-headers
-    (insert (mail-header-from message-reply-headers) " writes:")
-    (newline)
-    (newline)))
+    (let ((from (mail-header-from message-reply-headers)))
+      (when from
+	(insert from " writes:"))
+      (newline)
+      (newline))))
 
 (defun message-position-on-field (header &rest afters)
   (let ((case-fold-search t))




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-09-16 10:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-14 19:41 [PATCH] Make message-insert-citation-line works with nnrss groups Andrea Russo
2006-09-14 23:57 ` Katsumi Yamaoka
2006-09-16  6:52   ` Katsumi Yamaoka
2006-09-16 10:50   ` Andrea Russo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).