unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Mike Gran <spk121@yahoo.com>
To: Andy Wingo <wingo@pobox.com>, Sven Hartrumpf <hartrumpf@gmx.net>
Cc: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: propagating a coding setting across source files
Date: Wed, 11 Jan 2012 10:13:05 -0800 (PST)	[thread overview]
Message-ID: <1326305585.65006.YahooMailNeo@web37902.mail.mud.yahoo.com> (raw)
In-Reply-To: <8762gidsqu.fsf@pobox.com>

>>>>  I added to the master file the following comment:
>>>> 
>>>>  ; coding: iso-8859-1
>>>> 
>>>>  which works as documented.
>>>>  How can I avoid to add this comment line to all the other files
>>>>  which are currently included by the master file using 
> "load"?
>>> 
>>>  You can (fluid-set! %default-port-encoding "iso-8859-1").
>>> 
>>>  Let us know if this doesn't work.
>> 
>>  If I add this to my master file it does not help.
>>  Where should I put your command?
> 
> It could be that there is an issue regarding compile-time versus
> run-time;
> 
>   http://www.gnu.org/software/guile/manual/html_node/Eval-When.html
> 
> If you put this at the top of your file, before any use-modules or
> anything like that, does it work?
> 
>   (eval-when (eval load compile)
>     (fluid-set!  %default-port-encoding "iso-8859-1"))
> 
> You might need to run with --auto-compile=fresh to invalidate the
> caches.
 
Hey Andy, 
 
I tried to dig through the logic of this the other day, and I'm not
sure that your suggestion can work.  If "load" ends up calling
"primitive-load", then any file without a "coding:" line is UTF-8.
%default-port-encoding doesn't enter in to it.
 
But there is a lot between "load" and "primitive-load" that I didn't
try to trace through.  I'm not sure under what conditions "load" calls
"primitive load".
 
Thanks,
 
Mike



  reply	other threads:[~2012-01-11 18:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02  8:06 propagating a coding setting across source files Sven Hartrumpf
2011-12-02 10:41 ` rixed
2011-12-02 12:41   ` Paul Smith
2011-12-02 12:46     ` rixed
2011-12-02 12:55 ` Mike Gran
2011-12-02 13:41   ` Sven Hartrumpf
2011-12-02 14:23     ` Mike Gran
2011-12-05 17:25   ` Ludovic Courtès
2012-01-09 22:51 ` Andy Wingo
2012-01-10  8:51   ` Sven Hartrumpf
2012-01-11 18:00     ` Andy Wingo
2012-01-11 18:13       ` Mike Gran [this message]
2012-01-15 21:51         ` Ludovic Courtès
2012-01-16  9:07           ` Andy Wingo
2012-01-16 23:41             ` Ludovic Courtès
2013-01-07 21:28               ` Andy Wingo

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=1326305585.65006.YahooMailNeo@web37902.mail.mud.yahoo.com \
    --to=spk121@yahoo.com \
    --cc=guile-user@gnu.org \
    --cc=hartrumpf@gmx.net \
    --cc=wingo@pobox.com \
    /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).