From unknown Fri Aug 08 22:15:29 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#10491 <10491@debbugs.gnu.org> To: bug#10491 <10491@debbugs.gnu.org> Subject: Status: unread-char and eof Reply-To: bug#10491 <10491@debbugs.gnu.org> Date: Sat, 09 Aug 2025 05:15:29 +0000 retitle 10491 unread-char and eof reassign 10491 guile submitter 10491 Aleix Conchillo Flaqu=C3=A9 severity 10491 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 12 15:30:47 2012 Received: (at submit) by debbugs.gnu.org; 12 Jan 2012 20:30:47 +0000 Received: from localhost ([127.0.0.1]:55475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RlRIN-00036y-E4 for submit@debbugs.gnu.org; Thu, 12 Jan 2012 15:30:47 -0500 Received: from eggs.gnu.org ([140.186.70.92]:50311) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RlR2n-0002jZ-Gb for submit@debbugs.gnu.org; Thu, 12 Jan 2012 15:14:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlR2F-0001Ea-Od for submit@debbugs.gnu.org; Thu, 12 Jan 2012 15:14:08 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=no version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:43659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlR2F-0001EW-NC for submit@debbugs.gnu.org; Thu, 12 Jan 2012 15:14:07 -0500 Received: from eggs.gnu.org ([140.186.70.92]:41640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlR2E-0003g3-OP for bug-guile@gnu.org; Thu, 12 Jan 2012 15:14:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlR2D-0001E9-Pn for bug-guile@gnu.org; Thu, 12 Jan 2012 15:14:06 -0500 Received: from mail-bk0-f41.google.com ([209.85.214.41]:62287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlR2D-0001E2-Kr for bug-guile@gnu.org; Thu, 12 Jan 2012 15:14:05 -0500 Received: by bkuw5 with SMTP id w5so1998551bku.0 for ; Thu, 12 Jan 2012 12:14:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=nPaHcNF4BgoXGsunhnBOTOesXznZ12MN/9dhFYXOQyw=; b=i9mpO1vRDbbwP3ZBK6xFH0vAqtZIHiqrjOp6Qrkd0qW4G42aVZwq91FHk6e/7D1mr0 TDZGiTHqLj6ztkORbLeSf0bm5mYpy77Ukze7xACkmgu9ZIxMqXIluEC7yFhf/HnmTCJx tXhkUDGf1aCQLYRTPrVT5HiEA0tsSvmkqp4DI= MIME-Version: 1.0 Received: by 10.204.152.219 with SMTP id h27mr1760598bkw.75.1326399244650; Thu, 12 Jan 2012 12:14:04 -0800 (PST) Received: by 10.204.55.68 with HTTP; Thu, 12 Jan 2012 12:14:04 -0800 (PST) Date: Thu, 12 Jan 2012 12:14:04 -0800 Message-ID: Subject: unread-char and eof From: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= To: bug-guile@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 12 Jan 2012 15:30:45 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) Whenever eof is reach in a port, a call to unread-char passing eof triggers an error. I'm not sure what's the right behavior for this, but I guess the way it is now is just as the user should be responsible to check eof. A note in the documentation would help in any case. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 05:35:22 2012 Received: (at 10491) by debbugs.gnu.org; 13 Jan 2012 10:35:22 +0000 Received: from localhost ([127.0.0.1]:55871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RleTh-0005Qj-6V for submit@debbugs.gnu.org; Fri, 13 Jan 2012 05:35:21 -0500 Received: from mail-iy0-f172.google.com ([209.85.210.172]:35338) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RleTc-0005QY-5k for 10491@debbugs.gnu.org; Fri, 13 Jan 2012 05:35:20 -0500 Received: by iaae16 with SMTP id e16so3769642iaa.3 for <10491@debbugs.gnu.org>; Fri, 13 Jan 2012 02:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=+hlcORZRDr9ltKBDB5XJKPo9ABvTSmPVOATOgU0Tx3s=; b=UVkUP4OJDurv+J8xDmrXWaxVzhqgRfvca0hPwjBAXDfOdmsJUQjcF3cTcct11k0lDe 47R+sZBBun823stXZJQTr7sA5gajjkYMALuWV57WuCdMgOkuaWk9RWGxKSmCB/+nt7Ep PK/spgpKU8U6ySwyJia/y12iaoaZL8ThPwg9M= MIME-Version: 1.0 Received: by 10.50.157.131 with SMTP id wm3mr284039igb.13.1326450879293; Fri, 13 Jan 2012 02:34:39 -0800 (PST) Received: by 10.231.48.68 with HTTP; Fri, 13 Jan 2012 02:34:39 -0800 (PST) In-Reply-To: References: Date: Fri, 13 Jan 2012 18:34:39 +0800 Message-ID: Subject: Re: bug#10491: unread-char and eof From: Daniel Hartwig To: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10491 Cc: 10491@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 13 January 2012 04:14, Aleix Conchillo Flaqu=C3=A9 wrote: > Whenever eof is reach in a port, a call to unread-char passing eof > triggers an error. I'm not sure what's the right behavior for this, > but I guess the way it is now is just as the user should be > responsible to check eof. The user should indeed be checking for this because eof is not a character, rather, a special value used to indicate that no more data is available on the port. This value is not read from the port, it does not make sense to unread it. > > A note in the documentation would help in any case. Suggestions welcome. Personally I find the documentation sufficiently clear on the usage of unread-char only accepting a character value and equally clear that an eof value is not a character. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 16 13:58:42 2012 Received: (at 10491) by debbugs.gnu.org; 16 Jan 2012 18:58:42 +0000 Received: from localhost ([127.0.0.1]:60613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RmrlS-00067n-HC for submit@debbugs.gnu.org; Mon, 16 Jan 2012 13:58:42 -0500 Received: from mail-bk0-f44.google.com ([209.85.214.44]:50012) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RmrlQ-00067g-GP for 10491@debbugs.gnu.org; Mon, 16 Jan 2012 13:58:41 -0500 Received: by bkwq16 with SMTP id q16so3837593bkw.3 for <10491@debbugs.gnu.org>; Mon, 16 Jan 2012 10:57:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=TUsLQ0yP4QgvguBpU9Tf5K8NBJC80dPh3DSALQDzfH4=; b=UlnICotJSUBD8++35puOVYjsUC+3JVUs4/1/qSTZzwfhf0YkJZkHK/QF/jOM2PC83r QlntJ3sLYkJhRykpoi7sdk29yi+4nrPevm5Xpk7o24D6yIa2/2PO59+CPgUug/SReTSj neds8G0bjfCp1OUaYdoVgcX55nFighQPDrzS8= MIME-Version: 1.0 Received: by 10.205.133.137 with SMTP id hy9mr3656172bkc.46.1326740264104; Mon, 16 Jan 2012 10:57:44 -0800 (PST) Received: by 10.204.120.20 with HTTP; Mon, 16 Jan 2012 10:57:44 -0800 (PST) In-Reply-To: References: Date: Mon, 16 Jan 2012 10:57:44 -0800 Message-ID: Subject: Re: bug#10491: unread-char and eof From: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= To: Daniel Hartwig Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10491 Cc: 10491@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Fri, Jan 13, 2012 at 2:34 AM, Daniel Hartwig wrote: > > Suggestions welcome. =C2=A0Personally I find the documentation sufficient= ly > clear on the usage of unread-char only accepting a character value and > equally clear that an eof value is not a character. I totally agree. However, I think the documentation should help any kind of user level. The documentation also does not say of any kind of error reported by the function. So, something like this, I think would help: "Procedure will report an error if a non-character object (e.g. end-of-file object) is given to it.". Or something similar. I don't have a strong opinion on this, so you can certainly mark the bug as won't do. But I think it would help. Best, Aleix From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 16 22:32:15 2012 Received: (at 10491) by debbugs.gnu.org; 17 Jan 2012 03:32:15 +0000 Received: from localhost ([127.0.0.1]:60921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RmzmQ-0001Re-Fa for submit@debbugs.gnu.org; Mon, 16 Jan 2012 22:32:15 -0500 Received: from mail-iy0-f172.google.com ([209.85.210.172]:58742) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RmzmM-0001RV-ER for 10491@debbugs.gnu.org; Mon, 16 Jan 2012 22:32:11 -0500 Received: by iaae16 with SMTP id e16so9225868iaa.3 for <10491@debbugs.gnu.org>; Mon, 16 Jan 2012 19:31:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=9nSkvv+iBc1xULkRmT3bqr9LlkmpLHQO/bL/bLQHDnY=; b=QfD9S8H+r7lD1p5as9KD2ehs05KqJVnPJujraJ5wSwURPoDJ2VGSaEUvurNZxG5KY4 OohATeb13wtpCgtoDm9a5mOqFai07+n4A6iQz2QOO2ykGu99LugpYZWQdw+lLNNPEABn BaaqTE7ntZ9wrwfV7QL9yxUX8JmdhKDTWO6Nw= MIME-Version: 1.0 Received: by 10.50.168.2 with SMTP id zs2mr12823484igb.9.1326771072281; Mon, 16 Jan 2012 19:31:12 -0800 (PST) Received: by 10.231.48.68 with HTTP; Mon, 16 Jan 2012 19:31:12 -0800 (PST) In-Reply-To: References: Date: Tue, 17 Jan 2012 11:31:12 +0800 Message-ID: Subject: Re: bug#10491: unread-char and eof From: Daniel Hartwig To: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10491 Cc: 10491@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 17 January 2012 02:57, Aleix Conchillo Flaqu=C3=A9 wrote: > > I totally agree. However, I think the documentation should help any > kind of user level. The documentation also does not say of any kind of > error reported by the function. Nor are type errors mentioned by most other functions, they are simply implied. This convention is mentioned in the revised report [1]: It is an error for an operation to be presented with an argument that it is not specified to handle. For succinctness, we follow the convention that if an argument name is also the name of a type listed in section *note Disjointness of types::, then that argument must be of the named type. For example, ... [1] http://people.csail.mit.edu/jaffer/r5rs_3.html#SEC11 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 17 19:58:47 2012 Received: (at 10491) by debbugs.gnu.org; 18 Jan 2012 00:58:47 +0000 Received: from localhost ([127.0.0.1]:33995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RnJrS-0000x4-Nm for submit@debbugs.gnu.org; Tue, 17 Jan 2012 19:58:47 -0500 Received: from mail-bk0-f44.google.com ([209.85.214.44]:57892) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RnJrP-0000wt-Nr for 10491@debbugs.gnu.org; Tue, 17 Jan 2012 19:58:44 -0500 Received: by bkbzs2 with SMTP id zs2so410083bkb.3 for <10491@debbugs.gnu.org>; Tue, 17 Jan 2012 16:57:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=xPub2/wftOZNxTsk8j2g+zYxpNxhuyIN5Jq3OZl35a8=; b=HH95b4M/Q4l9melTz+zEeLfC8Ak559pyN4lvj+KiJxXoqAOpDrYESUJakQYMYRLjaU aDZi0vgheRq7OguDI3p3iGS0tbOOUDTpnc8+NnxULWJLdhdjLv/HgdtNxtpQvLt7Fup1 NhpjtNIFWVUFd3mnlC6xSrHQMQ+5FjVIqQ80M= MIME-Version: 1.0 Received: by 10.204.133.212 with SMTP id g20mr7855784bkt.82.1326848257400; Tue, 17 Jan 2012 16:57:37 -0800 (PST) Received: by 10.204.120.20 with HTTP; Tue, 17 Jan 2012 16:57:37 -0800 (PST) In-Reply-To: References: Date: Tue, 17 Jan 2012 16:57:37 -0800 Message-ID: Subject: Re: bug#10491: unread-char and eof From: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= To: Daniel Hartwig Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10491 Cc: 10491@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Mon, Jan 16, 2012 at 7:31 PM, Daniel Hartwig wrote: > > Nor are type errors mentioned by most other functions, they are simply > implied. =C2=A0This convention is mentioned in the revised report [1]: > > =C2=A0It is an error for an operation to be presented with an argument th= at it > =C2=A0is not specified to handle. =C2=A0For succinctness, we follow the c= onvention > =C2=A0that if an argument name is also the name of a type listed in secti= on > =C2=A0*note Disjointness of types::, then that argument must be of the na= med > =C2=A0type. =C2=A0For example, ... > > [1] http://people.csail.mit.edu/jaffer/r5rs_3.html#SEC11 I see, convinced. Thanks for the feedback. You can mark it as invalid and close it. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 17 20:08:38 2012 Received: (at 10491-done) by debbugs.gnu.org; 18 Jan 2012 01:08:38 +0000 Received: from localhost ([127.0.0.1]:34000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RnK10-0001BI-5Y for submit@debbugs.gnu.org; Tue, 17 Jan 2012 20:08:38 -0500 Received: from mail-iy0-f172.google.com ([209.85.210.172]:40661) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RnK0y-0001BB-D8 for 10491-done@debbugs.gnu.org; Tue, 17 Jan 2012 20:08:37 -0500 Received: by iaae16 with SMTP id e16so10773526iaa.3 for <10491-done@debbugs.gnu.org>; Tue, 17 Jan 2012 17:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=fRNTDFTazZcbPygA5ZHqiE6HH1aSm6Nm4APVAOiBL+I=; b=bX2B8GNgcHgkjWDYSoEvPGPu4DaFXIzFWiet7N9PixdQaNXjuWZxcyb1WDNY+Yu8y8 TJSjkaqAdPgbMKmfupbFsWyLQXNF+C46PSQAcyxplUF4EK6nxSk7zaHQpKvP4aKfN9/b QYrPB3W+kJxGf7U5Iw2WEgWrS2P9DFNl/qb7o= MIME-Version: 1.0 Received: by 10.50.10.225 with SMTP id l1mr20080845igb.9.1326848852043; Tue, 17 Jan 2012 17:07:32 -0800 (PST) Received: by 10.231.48.68 with HTTP; Tue, 17 Jan 2012 17:07:31 -0800 (PST) In-Reply-To: References: Date: Wed, 18 Jan 2012 09:07:31 +0800 Message-ID: Subject: Re: bug#10491: unread-char and eof From: Daniel Hartwig To: 10491-done@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10491-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 18 January 2012 08:57, Aleix Conchillo Flaqu=C3=A9 wrote: > On Mon, Jan 16, 2012 at 7:31 PM, Daniel Hartwig wrote= : >> >> Nor are type errors mentioned by most other functions, they are simply >> implied. =C2=A0This convention is mentioned in the revised report [1]: >> >> =C2=A0It is an error for an operation to be presented with an argument t= hat it >> =C2=A0is not specified to handle. =C2=A0For succinctness, we follow the = convention >> =C2=A0that if an argument name is also the name of a type listed in sect= ion >> =C2=A0*note Disjointness of types::, then that argument must be of the n= amed >> =C2=A0type. =C2=A0For example, ... >> >> [1] http://people.csail.mit.edu/jaffer/r5rs_3.html#SEC11 > > > I see, convinced. Thanks for the feedback. > > You can mark it as invalid and close it. From unknown Fri Aug 08 22:15:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 15 Feb 2012 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator