Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: its a multiline feed title
Date: Fri, 10 Jul 2009 09:47:49 +0900	[thread overview]
Message-ID: <b4m1vopicsq.fsf@jpl.org> (raw)
In-Reply-To: <87tz1lphj5.fsf@jidanni.org>

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



  reply	other threads:[~2009-07-10  0:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09 23:23 jidanni
2009-07-10  0:47 ` Katsumi Yamaoka [this message]
2009-07-10 12:06   ` Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4m1vopicsq.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).