unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* [r6rs] no way to turn of coding: comment interpretation?
@ 2010-06-07 19:53 Marco Maggi
  2010-06-07 21:40 ` Andy Wingo
  0 siblings, 1 reply; 9+ messages in thread
From: Marco Maggi @ 2010-06-07 19:53 UTC (permalink / raw)
  To: guile-user

... and just go with UTF8?

Many of my files start with ";;; -*- coding: utf-8-unix -*-".
-- 
Marco Maggi



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [r6rs] no way to turn of coding: comment interpretation?
  2010-06-07 19:53 [r6rs] no way to turn of coding: comment interpretation? Marco Maggi
@ 2010-06-07 21:40 ` Andy Wingo
  2010-06-08  4:55   ` Marco Maggi
  0 siblings, 1 reply; 9+ messages in thread
From: Andy Wingo @ 2010-06-07 21:40 UTC (permalink / raw)
  To: Marco Maggi; +Cc: guile-user

Hi Marco,

Mike can perhaps elaborate more on your specific question, however I wonder:

On Mon 07 Jun 2010 21:53, Marco Maggi <marco.maggi-ipsu@poste.it> writes:

> Many of my files start with ";;; -*- coding: utf-8-unix -*-".

What is this? Is it general enough to add to Guile's name->encoding
tables?

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [r6rs] no way to turn of coding: comment interpretation?
  2010-06-07 21:40 ` Andy Wingo
@ 2010-06-08  4:55   ` Marco Maggi
  2010-06-08  5:53     ` Mike Gran
  0 siblings, 1 reply; 9+ messages in thread
From: Marco Maggi @ 2010-06-08  4:55 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-user

"Andy Wingo" wrote:
>> Many of my files start with ";;; -*- coding: utf-8-unix -*-".
>
> What  is this?  Is it  general  enough to  add to  Guile's
> name->encoding tables?

It  is  an  Emacs  coding,  UTF-8 with  the  suffix  "-unix"
(explained  in the  Emacs  info doc  node "Coding  Systems")
which  means  no   end-of-line  conversion  and  newline  to
separate lines.
-- 
Marco Maggi



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [r6rs] no way to turn of coding: comment interpretation?
  2010-06-08  4:55   ` Marco Maggi
@ 2010-06-08  5:53     ` Mike Gran
  2010-06-08  7:32       ` Andy Wingo
  2010-06-08 21:37       ` Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: Mike Gran @ 2010-06-08  5:53 UTC (permalink / raw)
  To: Marco Maggi, Andy Wingo; +Cc: guile-user

> From: Marco Maggi <marco.maggi-ipsu@poste.it>


> It  is  an  Emacs  coding,  UTF-8 
> with  the  suffix  "-unix"
> (explained  in the  
> Emacs  info doc  node "Coding  Systems")
> which  
> means  no   end-of-line  conversion  and  newline  
> to
> separate lines.

We talked about making a list of aliases between
Emacs coding names and standard encoding names
at one point.

http://lists.gnu.org/archive/html/guile-devel/2009-09/msg00045.html

And, a version of that idea made it into one of
the non-master git branches.

http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commit;h=8241a7d8d27ffcccdc2fac180f55df7f655f3773

But, at the time, I didn't like putting that list in C code 
and I wanted it to go into the scheme code, which was more 
complicated.  And then I guess I never got around to it.

I don't know if anyone else followed up on that idea.

-Mike 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [r6rs] no way to turn of coding: comment interpretation?
  2010-06-08  5:53     ` Mike Gran
@ 2010-06-08  7:32       ` Andy Wingo
  2010-06-08 14:16         ` Mike Gran
  2010-06-08 21:37       ` Ludovic Courtès
  1 sibling, 1 reply; 9+ messages in thread
From: Andy Wingo @ 2010-06-08  7:32 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-user

On Tue 08 Jun 2010 07:53, Mike Gran <spk121@yahoo.com> writes:

>> From: Marco Maggi <marco.maggi-ipsu@poste.it>
>
>
>> It  is  an  Emacs  coding,  UTF-8 
>> with  the  suffix  "-unix"
>> (explained  in the  
>> Emacs  info doc  node "Coding  Systems")
>> which  
>> means  no   end-of-line  conversion  and  newline  
>> to
>> separate lines.
>
> We talked about making a list of aliases between
> Emacs coding names and standard encoding names
> at one point.

Ah, thanks for the links. What do you think is the best thing to do in
this case?

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [r6rs] no way to turn of coding: comment interpretation?
  2010-06-08  7:32       ` Andy Wingo
@ 2010-06-08 14:16         ` Mike Gran
  2010-06-09  6:36           ` Andy Wingo
  0 siblings, 1 reply; 9+ messages in thread
From: Mike Gran @ 2010-06-08 14:16 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-user

> Andy sez
>> Mike sez

>> We talked about making a list of aliases between

>> Emacs coding names and standard encoding names 
>> at one point.

> Ah, thanks for the links. What do you think is the best 
> thing to do in this case?

I'd say that we could keep it simple and hardcode a
list in libguile/read.c.  Google Codesearch and
koders.com show that there are only a handful of the 
Emacs coding aliases being used in scheme code, or
in code in general.

Or, to be more elegant, initialize a global variable
that contains an alist that maps Emacs coding aliases
to their standard counterparts, and add a function
to allow other pairs to be added, I guess.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [r6rs] no way to turn of coding: comment interpretation?
  2010-06-08  5:53     ` Mike Gran
  2010-06-08  7:32       ` Andy Wingo
@ 2010-06-08 21:37       ` Ludovic Courtès
  2010-06-09  6:46         ` Andy Wingo
  1 sibling, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2010-06-08 21:37 UTC (permalink / raw)
  To: guile-user

Hi,

Mike Gran <spk121@yahoo.com> writes:

>> From: Marco Maggi <marco.maggi-ipsu@poste.it>
>
>
>> It  is  an  Emacs  coding,  UTF-8 
>> with  the  suffix  "-unix"
>> (explained  in the  
>> Emacs  info doc  node "Coding  Systems")
>> which  
>> means  no   end-of-line  conversion  and  newline  
>> to
>> separate lines.
>
> We talked about making a list of aliases between
> Emacs coding names and standard encoding names
> at one point.

Bruno Haible once argued that we should stick to IANA encoding names
rather than follow Emacs’ lead in defining new names:

  http://lists.gnu.org/archive/html/guile-devel/2009-11/msg00053.html

From a practical viewpoint, though, it may make sense to allow more
Emacs encoding names in ‘coding:’ cookies, since these are an Emacs
thing anyway.

So, ‘file-encoding’ could be taught more encoding names than
‘set-port-encoding!’ (and it could be written in Scheme, too.)

WDYT?

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [r6rs] no way to turn of coding: comment interpretation?
  2010-06-08 14:16         ` Mike Gran
@ 2010-06-09  6:36           ` Andy Wingo
  0 siblings, 0 replies; 9+ messages in thread
From: Andy Wingo @ 2010-06-09  6:36 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-user

On Tue 08 Jun 2010 16:16, Mike Gran <spk121@yahoo.com> writes:

>> Andy sez
>>> Mike sez
>
>>> We talked about making a list of aliases between
>
>>> Emacs coding names and standard encoding names 
>>> at one point.
>
>> Ah, thanks for the links. What do you think is the best 
>> thing to do in this case?
>
> I'd say that we could keep it simple and hardcode a
> list in libguile/read.c.  Google Codesearch and
> koders.com show that there are only a handful of the 
> Emacs coding aliases being used in scheme code, or
> in code in general.
>
> Or, to be more elegant, initialize a global variable
> that contains an alist that maps Emacs coding aliases
> to their standard counterparts, and add a function
> to allow other pairs to be added, I guess.

Yeah, I reckon the alist would be the right solution.

A
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [r6rs] no way to turn of coding: comment interpretation?
  2010-06-08 21:37       ` Ludovic Courtès
@ 2010-06-09  6:46         ` Andy Wingo
  0 siblings, 0 replies; 9+ messages in thread
From: Andy Wingo @ 2010-06-09  6:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-user

Hi,

On Tue 08 Jun 2010 23:37, ludo@gnu.org (Ludovic Courtès) writes:

> So, ‘file-encoding’ could be taught more encoding names than
> ‘set-port-encoding!’ (and it could be written in Scheme, too.)

I'm OK with whatever we come up with, but I think we will need a
`file-encoding' in C for boot reasons, so I don't feel the need to
replace it with Scheme later.

Cheers,

A
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-06-09  6:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-07 19:53 [r6rs] no way to turn of coding: comment interpretation? Marco Maggi
2010-06-07 21:40 ` Andy Wingo
2010-06-08  4:55   ` Marco Maggi
2010-06-08  5:53     ` Mike Gran
2010-06-08  7:32       ` Andy Wingo
2010-06-08 14:16         ` Mike Gran
2010-06-09  6:36           ` Andy Wingo
2010-06-08 21:37       ` Ludovic Courtès
2010-06-09  6:46         ` Andy Wingo

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).