[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Do not scan for coding declarations in open-file
From: |
Mark H Weaver |
Subject: |
Re: [PATCH] Do not scan for coding declarations in open-file |
Date: |
Thu, 31 Jan 2013 13:58:19 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Hi Andy,
Andy Wingo <address@hidden> writes:
> The patch looks good to me but I am concerned about the behavior
> change, and that it is inconvenient to get the previous behavior.
>
> My instinct is that we should not merge this patch without including a
> way to enable the coding sniff; which seems to mean adding keywords or
> somehow extending the arguments of:
>
> open-file
> with-input-from-file
> with-output-to-file
> call-with-output-file
> call-with-input-file
> open-input-file
I'd be glad to do this. I've long wanted these to accept keyword
arguments for encoding and binary mode. We could also have a keyword to
ask Guile to guess the encoding. This could be used to simplify the
code used in 'compile-file' etc.
We could also add a fluid to specify whether 'open-file' should try to
guess the encoding, if that helps.
What do you think?
Mark