* specifying coding system on the first/second line
@ 2005-10-11 12:55 Radomir Hejl
0 siblings, 0 replies; 5+ messages in thread
From: Radomir Hejl @ 2005-10-11 12:55 UTC (permalink / raw)
On the second line of my file I have the following text:
# -*- coding: utf-8;-*-
The first line is an interpreter command.
Nevertheless when the file is loaded, it preserves its default coding.
Running emacs on unix is ok and putting the construct on the first line
is ok as well.
GNU Emacs 21.3.1 (i386-mingw-nt5.1.2600)
What should I fix to remedy this?
Thanks.
--
Radek
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <mailman.10871.1129036362.20277.help-gnu-emacs@gnu.org>]
* Re: specifying coding system on the first/second line
[not found] <mailman.10871.1129036362.20277.help-gnu-emacs@gnu.org>
@ 2005-10-11 17:28 ` Reiner Steib
2005-10-11 19:49 ` Radomir Hejl
2005-10-12 15:44 ` Stefan Monnier
1 sibling, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2005-10-11 17:28 UTC (permalink / raw)
On Tue, Oct 11 2005, Radomir Hejl wrote:
> On the second line of my file I have the following text:
> # -*- coding: utf-8;-*-
> The first line is an interpreter command.
[...]
> What should I fix to remedy this?
,----[ (info "(emacs)File Variables") ]
| In shell scripts, the first line is used to identify the script
| interpreter, so you cannot put any local variables there. To
| accommodate for this, when Emacs visits a shell script, it looks for
| local variable specifications in the _second_ line.
|
| A "local variables list" goes near the end of the file, in the last
| page. (It is often best to put it on a page by itself.) The local
| variables list starts with a line containing the string `Local
| Variables:', and ends with a line containing the string `End:'. In
| between come the variable names and values, one set per line, as
| `VARIABLE: VALUE'. The VALUEs are not evaluated; they are used
| literally. If a file has both a local variables list and a `-*-' line,
| Emacs processes _everything_ in the `-*-' line first, and _everything_
| in the local variables list afterward.
|
| Here is an example of a local variables list: [...]
`----
Example:
# Local Variables:
# coding: utf-8
# End:
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: specifying coding system on the first/second line
2005-10-11 17:28 ` Reiner Steib
@ 2005-10-11 19:49 ` Radomir Hejl
0 siblings, 0 replies; 5+ messages in thread
From: Radomir Hejl @ 2005-10-11 19:49 UTC (permalink / raw)
Reiner Steib <reinersteib+from-uce@imap.cc> writes:
>
> ,----[ (info "(emacs)File Variables") ]
> | In shell scripts, the first line is used to identify the script
> | interpreter, so you cannot put any local variables there. To
> | accommodate for this, when Emacs visits a shell script, it looks for
> | local variable specifications in the _second_ line.
> |
> | A "local variables list" goes near the end of the file, in the last
> | page. (It is often best to put it on a page by itself.) The local
> | variables list starts with a line containing the string `Local
> | Variables:', and ends with a line containing the string `End:'. In
> | between come the variable names and values, one set per line, as
> | `VARIABLE: VALUE'. The VALUEs are not evaluated; they are used
> | literally. If a file has both a local variables list and a `-*-' line,
> | Emacs processes _everything_ in the `-*-' line first, and _everything_
> | in the local variables list afterward.
> |
> | Here is an example of a local variables list: [...]
> `----
>
Thanks, a "local variables list" works. I expected a '-*-' construct on the
second line will work too.
--
Radek
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: specifying coding system on the first/second line
[not found] <mailman.10871.1129036362.20277.help-gnu-emacs@gnu.org>
2005-10-11 17:28 ` Reiner Steib
@ 2005-10-12 15:44 ` Stefan Monnier
2005-10-12 19:49 ` Radomir Hejl
1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2005-10-12 15:44 UTC (permalink / raw)
> On the second line of my file I have the following text:
> # -*- coding: utf-8;-*-
> The first line is an interpreter command.
> Nevertheless when the file is loaded, it preserves its default coding.
> Running emacs on unix is ok and putting the construct on the first line
> is ok as well.
> GNU Emacs 21.3.1 (i386-mingw-nt5.1.2600)
Presuming that by "interpreter command" you mean that the first line starts
with #!, then it sounds like a bug. Try M-x report-emacs-bug
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: specifying coding system on the first/second line
2005-10-12 15:44 ` Stefan Monnier
@ 2005-10-12 19:49 ` Radomir Hejl
0 siblings, 0 replies; 5+ messages in thread
From: Radomir Hejl @ 2005-10-12 19:49 UTC (permalink / raw)
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> On the second line of my file I have the following text:
>> # -*- coding: utf-8;-*-
>> The first line is an interpreter command.
>> Nevertheless when the file is loaded, it preserves its default coding.
>> Running emacs on unix is ok and putting the construct on the first line
>> is ok as well.
>> GNU Emacs 21.3.1 (i386-mingw-nt5.1.2600)
>
> Presuming that by "interpreter command" you mean that the first line starts
> with #!, then it sounds like a bug. Try M-x report-emacs-bug
>
>
> Stefan
Yes, I will (report a bug).
--
Radek
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-10-12 19:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-11 12:55 specifying coding system on the first/second line Radomir Hejl
[not found] <mailman.10871.1129036362.20277.help-gnu-emacs@gnu.org>
2005-10-11 17:28 ` Reiner Steib
2005-10-11 19:49 ` Radomir Hejl
2005-10-12 15:44 ` Stefan Monnier
2005-10-12 19:49 ` Radomir Hejl
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).