From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/58952 Path: main.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Re: Suggest to change gnus-sum.el -- deal with float number for Date: Thu, 21 Oct 2004 12:34:11 +0200 Organization: Dept. of Theoretical Physics, University of Ulm Sender: ding-owner@lists.math.uh.edu Message-ID: References: Reply-To: Reiner Steib NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1098357965 11022 80.91.229.6 (21 Oct 2004 11:26:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Oct 2004 11:26:05 +0000 (UTC) Original-X-From: ding-owner+M7490@lists.math.uh.edu Thu Oct 21 13:25:52 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CKb4q-0005cy-00 for ; Thu, 21 Oct 2004 13:25:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1CKb3r-0003Sb-00; Thu, 21 Oct 2004 06:24:51 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1CKb3m-0003SW-00 for ding@lists.math.uh.edu; Thu, 21 Oct 2004 06:24:46 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1CKb3k-0001eG-Ri for ding@lists.math.uh.edu; Thu, 21 Oct 2004 06:24:44 -0500 Original-Received: from main.gmane.org (main.gmane.org [80.91.229.2]) by justine.libertine.org (Postfix) with ESMTP id 9B9C73A003B for ; Thu, 21 Oct 2004 06:24:43 -0500 (CDT) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CKb3h-0001Sz-00 for ; Thu, 21 Oct 2004 13:24:41 +0200 Original-Received: from lumberjack.physik.uni-ulm.de ([134.60.10.173]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Oct 2004 13:24:41 +0200 Original-Received: from Reiner.Steib by lumberjack.physik.uni-ulm.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Oct 2004 13:24:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Original-Lines: 44 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: lumberjack.physik.uni-ulm.de X-Face: #vK]N[`vqjuod*|)'[iD7/"3AB-ApT%fmN"LWAg@oS7OesGv~)n[OBTLM#I="J'Y^-7I I/ps7o_'IK@#-Rs{::DZ@O8yS|fexe,XslY[:dNWOb~>?mC-&i_c)say:"\IpA.5U.b]'NY;Pks{lb h.+#6%DpZuaK3dcHB`Av3zc:r!C%~s0&m,tWj]&},qg.+0ww2gK%f!:GK|wMl.I!(voY*1"^li8"~B BNG)9LvPi?^DMR-GVDnZqhu*3Hi,+g=wFhI)BL6&u{EOVEHjVEVq~d?_}lMntWAc3(6?kftjc>_f>! g0wM(qPM$d5]^TT_Qyi&L?LGVG)SHN;Gk/,pkY9,~ Mail-Copies-To: nobody User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:Bq3TUDMf1SCoL57EaimrPPSVZKo= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:58952 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:58952 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/