From: Reiner Steib <reinersteib+gmane@imap.cc>
Subject: Re: Suggest to change gnus-sum.el -- deal with float number for
Date: Thu, 21 Oct 2004 12:34:11 +0200 [thread overview]
Message-ID: <v97jpk4axo.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <u7jpkcvjl.fsf@news.eqiao.com>
On Thu, Oct 21 2004, Cheng Gao wrote:
> Say a NG has 5000 articles.
> When you press SPC on it, you are prompted to input articles to read.
>
> 1. If you input "10abcd", 10 articles will be displayed as does by
> (setq select (if (stringp select) (string-to-number select) select))
>
> 2. If you input "10.11", you get error message, and no articles
> displayed.
GIGO (Garbage In Garbage Out).
> I think since case 1 is addressed in Gnus for error tolerance and
> user-friendliness,
I don't thinks so. It is most probably just because
`string-to-number' behaves like this. Striping non-number characters
is not even documented (beside spaces and tabs):
,----[ C-h f string-to-number RET ]
| string-to-number is a built-in function in `C source code'.
| (string-to-number STRING &optional BASE)
|
| Parse STRING as a decimal number and return the number.
| This parses both integers and floating point numbers.
| It ignores leading spaces and tabs.
|
| If BASE, interpret STRING as a number in that base. If BASE isn't
| present, base 10 is used. BASE must be between 2 and 16 (inclusive).
| If the base used is not 10, floating point is not recognized.
`----
> why not going a little further?
It makes the code more difficult to read without any gain, IMHO. _If_
anything should be changed, then Gnus should error out on "10abcd",
too. (But I don't think this is necessary.)
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
prev parent reply other threads:[~2004-10-21 10:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-21 2:01 Suggest to change gnus-sum.el -- deal with float number for article number to read Cheng Gao
2004-10-21 7:09 ` Suggest to change gnus-sum.el -- deal with float number for Reiner Steib
2004-10-21 8:41 ` Cheng Gao
2004-10-21 10:34 ` Reiner Steib [this message]
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=v97jpk4axo.fsf@marauder.physik.uni-ulm.de \
--to=reinersteib+gmane@imap.cc \
--cc=Reiner.Steib@gmx.de \
/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).