* Problem with coding system and emacsclient
@ 2004-08-19 8:12 Juraj Kubelka
0 siblings, 0 replies; 5+ messages in thread
From: Juraj Kubelka @ 2004-08-19 8:12 UTC (permalink / raw)
Hi!
I have problem with opening files with emacsclient in different
coding.
My default coding system is:
------- M-x describe-coding-system RET RET
Coding system for saving this buffer:
2 -- iso-8859-2 (alias of iso-latin-2)
Default coding system (for new files):
2 -- iso-8859-2 (alias of iso-latin-2)
Coding system for keyboard input:
nil
Coding system for terminal output:
2 -- iso-8859-2 (alias of iso-latin-2)
Defaults for subprocess I/O:
decoding: 2 -- iso-8859-2 (alias of iso-latin-2)
encoding: 2 -- iso-8859-2 (alias of iso-latin-2)
Priority order for recognizing coding systems when reading files:
1. iso-8859-2 (alias of iso-latin-2)
2. iso-latin-1 (alias: iso-8859-1 latin-1)
3. iso-2022-jp (alias: junet)
4. iso-2022-7bit
5. iso-2022-7bit-lock (alias: iso-2022-int-1)
6. iso-2022-8bit-ss2
7. emacs-mule
8. raw-text
9. japanese-shift-jis (alias: shift_jis sjis)
10. chinese-big5 (alias: big5 cn-big5)
11. no-conversion (alias: binary)
12. mule-utf-8 (alias: utf-8)
-------
I can open file with coding system cp1250:
C-x RET c cp1250-unix RET C-x C-f file_coding.txt
Everything is correct. Now I save and close file.
I can open file again with same sequence above. But when I want open
file with emacsclient I cannot use prefix "C-x RET c cp1250-unix RET"
and file is opened in "Unibyte raw-coding".
------- M-x describe-coding-system RET RET
Coding system for saving this buffer:
t -- raw-text
-------
Characters are strange of course. I can use "C-x RET f cp1250-unix
RET" and file is now opened in "Unibyte cp1250-unix".
------- M-x describe-coding-system RET RET
Coding system for saving this buffer:
D -- cp1250-unix
-------
But old text is still displayed strange. And new characters added to
file are strange too.
Do you have any solution for it? How open file in different coding with
emacsclient (I know coding of file)?
Thanks.
Jura
--
+ Juraj Kubelka +++++++++++++++++++++
+ emailto:Juraj.Kubelka at email.cz +
+ jabber://cesta at jabber.cz +
+ icq: 25932918 +
+++++++++++++++++++++++++++++++++++++
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with coding system and emacsclient
[not found] <mailman.1886.1092903443.2011.help-gnu-emacs@gnu.org>
@ 2004-08-21 10:55 ` Oliver Scholz
2004-08-23 16:46 ` Kevin Rodgers
0 siblings, 1 reply; 5+ messages in thread
From: Oliver Scholz @ 2004-08-21 10:55 UTC (permalink / raw)
Unfortunately I am right now doomed to work on the operating system
that dare not say its name; I can't make any test with emacsclient.
So I am probably not the right person to answer your question right
now. However, since nobody else has replied so far, I might as well
try my best.
Juraj Kubelka <Juraj.Kubelka@email.cz> writes:
> Hi!
>
> I have problem with opening files with emacsclient in different
> coding.
>
> My default coding system is:
>
> ------- M-x describe-coding-system RET RET
> Coding system for saving this buffer:
> 2 -- iso-8859-2 (alias of iso-latin-2)
[...]
> Priority order for recognizing coding systems when reading files:
> 1. iso-8859-2 (alias of iso-latin-2)
> 2. iso-latin-1 (alias: iso-8859-1 latin-1)
> 3. iso-2022-jp (alias: junet)
> 4. iso-2022-7bit
> 5. iso-2022-7bit-lock (alias: iso-2022-int-1)
> 6. iso-2022-8bit-ss2
> 7. emacs-mule
> 8. raw-text
> 9. japanese-shift-jis (alias: shift_jis sjis)
> 10. chinese-big5 (alias: big5 cn-big5)
> 11. no-conversion (alias: binary)
> 12. mule-utf-8 (alias: utf-8)
> I can open file with coding system cp1250:
>
> C-x RET c cp1250-unix RET C-x C-f file_coding.txt
>
> Everything is correct. Now I save and close file.
>
> I can open file again with same sequence above. But when I want open
> file with emacsclient I cannot use prefix "C-x RET c cp1250-unix RET"
> and file is opened in "Unibyte raw-coding".
[...]
> Characters are strange of course. I can use "C-x RET f cp1250-unix
> RET" and file is now opened in "Unibyte cp1250-unix".
When the character encoding scheme has not been properly detected on
visiting the file, then it's too late to do `C-x RET f'. Recent CVS
Emacs provides the command
`C-x RET r' (`revert-buffer-with-coding-system') which, erm, reverts
the buffer with a different coding system.
[...]
> Do you have any solution for it? How open file in different coding with
> emacsclient (I know coding of file)?
It would be nice, if emacsclient had some sort of --encoding option to
specify the encoding on the command line (but maybe it does? Have you
checked?). Failing that I can think of two ways to get what you want:
The best way is probably to put a coding system cookie into the file:
At the beginning:
-*- coding: windows-1250 -*-
At the end:
Local Variables:
coding: windows-1250
End:
See (info "(emacs)Recognize Coding").
Another way would be to frob the coding system priorities:
;; Move windows-1250 (aka cp1250) to front.
(prefer-coding-system 'windows-1250)
;; Move Latin-2 to front again, because that's what is actually
;; prefered.
(prefer-coding-system 'iso-latin-2)
Oliver
--
4 Fructidor an 212 de la Révolution
Liberté, Egalité, Fraternité!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with coding system and emacsclient
2004-08-21 10:55 ` Problem with coding system and emacsclient Oliver Scholz
@ 2004-08-23 16:46 ` Kevin Rodgers
2004-08-31 12:33 ` Juraj Kubelka
[not found] ` <mailman.849.1093955960.1998.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 5+ messages in thread
From: Kevin Rodgers @ 2004-08-23 16:46 UTC (permalink / raw)
Oliver Scholz wrote:
> When the character encoding scheme has not been properly detected on
> visiting the file, then it's too late to do `C-x RET f'. Recent CVS
> Emacs provides the command
> `C-x RET r' (`revert-buffer-with-coding-system') which, erm, reverts
> the buffer with a different coding system.
In Emacs 21.3 you can get the same effect with `C-x RET c whatever RET
C-x C-v RET'.
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with coding system and emacsclient
2004-08-23 16:46 ` Kevin Rodgers
@ 2004-08-31 12:33 ` Juraj Kubelka
[not found] ` <mailman.849.1093955960.1998.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 5+ messages in thread
From: Juraj Kubelka @ 2004-08-31 12:33 UTC (permalink / raw)
[-- Attachment #1.1: Type: text/plain, Size: 1027 bytes --]
Thank you very much, prefer-coding-system and `C-x RET c whatever RET
C-x C-v RET' are what I need.
Regards,
Jura
On Po 23.srp 10:46, Kevin Rodgers wrote:
> Oliver Scholz wrote:
> > When the character encoding scheme has not been properly detected on
> > visiting the file, then it's too late to do `C-x RET f'. Recent CVS
> > Emacs provides the command
> > `C-x RET r' (`revert-buffer-with-coding-system') which, erm, reverts
> > the buffer with a different coding system.
>
> In Emacs 21.3 you can get the same effect with `C-x RET c whatever RET
> C-x C-v RET'.
>
> --
> Kevin Rodgers
>
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
--
+ Juraj Kubelka +++++++++++++++++++++
+ emailto:Juraj.Kubelka at email.cz +
+ jabber://cesta at jabber.cz +
+ icq: 25932918 +
+ www: http://cestikovo.com +
+++++++++++++++++++++++++++++ Cesta +
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 481 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with coding system and emacsclient
[not found] ` <mailman.849.1093955960.1998.help-gnu-emacs@gnu.org>
@ 2004-09-01 2:55 ` Edward Casey
0 siblings, 0 replies; 5+ messages in thread
From: Edward Casey @ 2004-09-01 2:55 UTC (permalink / raw)
"Juraj Kubelka" <Juraj.Kubelka@email.cz> wrote in message
news:mailman.849.1093955960.1998.help-gnu-emacs@gnu.org...
This is a topic of particular interest to me but I am not about to open
any attachments. Can you resubmit in the body of the email?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-09-01 2:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.1886.1092903443.2011.help-gnu-emacs@gnu.org>
2004-08-21 10:55 ` Problem with coding system and emacsclient Oliver Scholz
2004-08-23 16:46 ` Kevin Rodgers
2004-08-31 12:33 ` Juraj Kubelka
[not found] ` <mailman.849.1093955960.1998.help-gnu-emacs@gnu.org>
2004-09-01 2:55 ` Edward Casey
2004-08-19 8:12 Juraj Kubelka
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.