From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCHES] Keyword args for file openers; coding scan off by default Date: Sun, 07 Apr 2013 21:18:04 +0200 Message-ID: <87ehemtaj7.fsf@gnu.org> References: <878v4uu92d.fsf@tines.lan> <87d2u6v5hn.fsf@gnu.org> <87r4ims3le.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1365362304 22899 80.91.229.3 (7 Apr 2013 19:18:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Apr 2013 19:18:24 +0000 (UTC) Cc: guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Apr 07 21:18:27 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UOv6f-0000Eb-Sn for guile-devel@m.gmane.org; Sun, 07 Apr 2013 21:18:26 +0200 Original-Received: from localhost ([::1]:46085 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOv6f-0006On-D9 for guile-devel@m.gmane.org; Sun, 07 Apr 2013 15:18:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOv6Z-0006OS-S5 for guile-devel@gnu.org; Sun, 07 Apr 2013 15:18:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOv6W-00037P-PS for guile-devel@gnu.org; Sun, 07 Apr 2013 15:18:19 -0400 Original-Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=35011 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOv6W-00035l-J8 for guile-devel@gnu.org; Sun, 07 Apr 2013 15:18:16 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id E3744267F; Sun, 7 Apr 2013 21:18:05 +0200 (CEST) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dRas7F6Mpv1C; Sun, 7 Apr 2013 21:18:05 +0200 (CEST) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 1BD9D1F18; Sun, 7 Apr 2013 21:18:05 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 Germinal an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87r4ims3le.fsf@tines.lan> (Mark H. Weaver's message of "Sun, 07 Apr 2013 12:33:17 -0400") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2a01:e0b:1:123:ca0a:a9ff:fe03:271e X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16193 Archived-At: Mark H Weaver skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Looks good. >> >> Minor comments: [...] >>> +Unless binary mode is requested, the character encoding of the new port >>> +is determined as follows: First, if @var{guess-encoding} is true, >>> +heuristics will be used to guess the encoding of the file. If it is >> >> =E2=80=9Cheuristics=E2=80=9D is vague. I=E2=80=99d prefer =E2=80=9Cthe = =E2=80=98file-encoding=E2=80=99 procedure is >> called to check for Emacs-style coding declarations (@pxref{Character >> Encoding of Source Files})=E2=80=9D. Should BOMs also be mentioned? > > Makes sense. Following our discussion on IRC, the patch below has the > following wording: > > Unless binary mode is requested, the character encoding of the new > port is determined as follows: First, if @var{guess-encoding} is true, > the @code{file-encoding} procedure is used to guess the encoding of > the file (@pxref{Character Encoding of Source Files}). [...] Perfect. > I left out the "Emacs-style coding declarations" language here, because > I want to leave open the possibility of adding additional heuristics to > 'file-encoding' in the future. Good idea. [...] > From 3e9890ea809bd77a36c1005935b73cf4ca18e691 Mon Sep 17 00:00:00 2001 > From: Mark H Weaver > Date: Sun, 7 Apr 2013 12:07:33 -0400 > Subject: [PATCH 2/2] Clarify 'file-encoding' docs: heuristics may be impr= oved > later. > > * doc/ref/api-evaluation.texi (Character Encoding of Source Files): > Mention UTF-8 as another common encoding used for Scheme source files, > and that it is used by default. Change the description to leave open > the possibility of adding additional heuristics in the future. > Mention that if the coding declaration is in a #!-style block comment, > it must be the first such comment in the file. Mention the > '#:guess-encoding' keyword argument. Looks good too. Please push both! Ludo=E2=80=99.