Gnus development mailing list
 help / color / mirror / Atom feed
* its a multiline feed title
@ 2009-07-09 23:23 jidanni
  2009-07-10  0:47 ` Katsumi Yamaoka
  0 siblings, 1 reply; 3+ messages in thread
From: jidanni @ 2009-07-09 23:23 UTC (permalink / raw)
  To: ding

If one does G R
URL to Search for RSS: http://www.wretch.cc/album/album_rss.php?id=e0456789j
and blindly says RET to the two questions gnus then asks,
Title:
      e0456789jAlbum
Description:
      e0456789jAlbum
without trimming them to one line,
one is then in for a world of headaches in the *Group* buffer.

P.S., that feed has problems anyway, else one could find showstopper
http://www.wretch.cc/album/show.php?i=e0456789j&b=23&f=1100870981&p=6



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

* Re: its a multiline feed title
  2009-07-09 23:23 its a multiline feed title jidanni
@ 2009-07-10  0:47 ` Katsumi Yamaoka
  2009-07-10 12:06   ` Katsumi Yamaoka
  0 siblings, 1 reply; 3+ messages in thread
From: Katsumi Yamaoka @ 2009-07-10  0:47 UTC (permalink / raw)
  To: ding

>>>>> jidanni@jidanni.org wrote:

> If one does G R
> URL to Search for RSS: http://www.wretch.cc/album/album_rss.php?id=e0456789j
> and blindly says RET to the two questions gnus then asks,
> Title:
>       e0456789jAlbum
> Description:
>       e0456789jAlbum
> without trimming them to one line,
> one is then in for a world of headaches in the *Group* buffer.

That's serious, I think, and should be fixed.  Could someone
find any harm with the following patch?  This strips leading and
trailing whitespace (including newlines), and converts every
whitespace between words into a single space.
(I believe `split-string' doesn't return ""s because of no second
 arg.  Am I right?)

> P.S., that feed has problems anyway, else one could find showstopper
> http://www.wretch.cc/album/show.php?i=e0456789j&b=23&f=1100870981&p=6

--8<---------------cut here---------------start------------->8---
--- gnus-group.el~	2009-01-22 08:09:02 +0000
+++ gnus-group.el	2009-07-10 00:46:14 +0000
@@ -3055,12 +3055,21 @@
 	(let* ((title (gnus-newsgroup-savable-name
 		       (read-from-minibuffer "Title: "
 					     (gnus-newsgroup-savable-name
-					      (or (cdr (assoc 'title
-							      feedinfo))
-						  "")))))
+					      (mapconcat
+					       'identity
+					       (split-string
+						(or (cdr (assoc 'title
+								feedinfo))
+						    ""))
+					       " ")))))
 	       (desc  (read-from-minibuffer "Description: "
-					    (cdr (assoc 'description
-							feedinfo))))
+					    (mapconcat
+					     'identity
+					     (split-string
+					      (or (cdr (assoc 'description
+							      feedinfo))
+						  ""))
+					     " ")))
 	       (href (cdr (assoc 'href feedinfo)))
 	       (coding (gnus-group-name-charset '(nnrss "") title)))
 	  (when coding
--8<---------------cut here---------------end--------------->8---



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

* Re: its a multiline feed title
  2009-07-10  0:47 ` Katsumi Yamaoka
@ 2009-07-10 12:06   ` Katsumi Yamaoka
  0 siblings, 0 replies; 3+ messages in thread
From: Katsumi Yamaoka @ 2009-07-10 12:06 UTC (permalink / raw)
  To: ding

>>>>> Katsumi Yamaoka wrote:
>>>>>> jidanni@jidanni.org wrote:

>> If one does G R
>> URL to Search for RSS: http://www.wretch.cc/album/album_rss.php?id=e0456789j
>> and blindly says RET to the two questions gnus then asks,
>> Title:
>>       e0456789jAlbum
>> Description:
>>       e0456789jAlbum
>> without trimming them to one line,
>> one is then in for a world of headaches in the *Group* buffer.

> That's serious, I think, and should be fixed.  Could someone
> find any harm with the following patch?  This strips leading and
> trailing whitespace (including newlines), and converts every
> whitespace between words into a single space.

[...]

Committed.



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

end of thread, other threads:[~2009-07-10 12:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-09 23:23 its a multiline feed title jidanni
2009-07-10  0:47 ` Katsumi Yamaoka
2009-07-10 12:06   ` Katsumi Yamaoka

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).