Subject: bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax

From: "Drew Adams" <[email-masked]>
Date: Fri, 17 Oct 2008 09:09:03 -0700

> I think the problem is a bad interaction between your language
> environment and the file in question.
> 
> Does the following command load vline.el successfully?
> 
> emacs -Q --eval '(let ((coding-system-for-read (quote utf-8)))
> (load-file "path/to/vline.el"))'

Yes, that works. (Actually, I just put the sexp in *scratch* and eval'd it
there.

> For me, the above works regardless of my LANG environment
> variable however:
> 
> LANG=en_US emacs -Q --eval '(load-file "path/to/vline.el")'
> 
> Loading /Home/s0198183/tmp/vline.el (source)...
> Invalid read syntax: "?"
> 
> In this case, emacs uses the iso-latin-1 coding-system to open
> the file and barfs when trying to read the utf-8 character in it.

OK, I guess you found the problem, but what is the solution? Are users expected
to set `coding-system-for-read'? Is vline.el expected to use a local variable to
state that it is UTF-8?

This seemed to work OK in Emacs 22 without users doing anything special. But, as
Eli said (or perhaps it was you), perhaps Emacs 22 was simply ignoring some of
the code.

Is this a vline.el bug or an Emacs 23 bug or an Emacs 22 bug or a user problem
(language environment)?