unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel@gnu.org
Subject: Re: [PATCHES] Keyword args for file openers; coding scan off by default
Date: Sun, 07 Apr 2013 21:18:04 +0200	[thread overview]
Message-ID: <87ehemtaj7.fsf@gnu.org> (raw)
In-Reply-To: <87r4ims3le.fsf@tines.lan> (Mark H. Weaver's message of "Sun, 07 Apr 2013 12:33:17 -0400")

Mark H Weaver <mhw@netris.org> skribis:

> ludo@gnu.org (Ludovic Courtès) 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
>>
>> “heuristics” is vague.  I’d prefer “the ‘file-encoding’ procedure is
>> called to check for Emacs-style coding declarations (@pxref{Character
>> Encoding of Source Files})”.  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 <mhw@netris.org>
> Date: Sun, 7 Apr 2013 12:07:33 -0400
> Subject: [PATCH 2/2] Clarify 'file-encoding' docs: heuristics may be improved
>  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’.



      reply	other threads:[~2013-04-07 19:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-07  6:52 [PATCHES] Keyword args for file openers; coding scan off by default Mark H Weaver
2013-04-07 13:00 ` Ludovic Courtès
2013-04-07 13:09 ` Ludovic Courtès
2013-04-07 13:24 ` Ludovic Courtès
2013-04-07 16:33   ` Mark H Weaver
2013-04-07 19:18     ` Ludovic Courtès [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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=87ehemtaj7.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.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 read-only IMAP folder(s) and NNTP newsgroup(s).