unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* how to set language-env differently for some directories ?
@ 2008-06-09 14:34 Rémi Letot
  2008-06-09 16:02 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Rémi Letot @ 2008-06-09 14:34 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

I'm not an emacs or elisp expert, so when it comes to special things I
can only call for help :-)

My current emacs is in an UTF8 language-environment. For some
directories (actually a specific tree) I have to use Latin1. How can I
achieve that automatically ?

For the moment I manually switch when needed, but that's cumbersome
and prone to errors, so I'd like to automate it : all files under
"specific_dir" are to be treated in Latin1. Filenames and content.

Thanks,
-- 
Rémi





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

* Re: how to set language-env differently for some directories ?
  2008-06-09 14:34 how to set language-env differently for some directories ? Rémi Letot
@ 2008-06-09 16:02 ` Eli Zaretskii
  2008-06-09 16:35   ` Rémi Letot
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2008-06-09 16:02 UTC (permalink / raw)
  To: help-gnu-emacs

> From: =?utf-8?Q?R=C3=A9mi?= Letot <hobbes@poukram.net>
> Date: Mon, 09 Jun 2008 16:34:29 +0200
> 
> My current emacs is in an UTF8 language-environment. For some
> directories (actually a specific tree) I have to use Latin1. How can I
> achieve that automatically ?
> 
> For the moment I manually switch when needed, but that's cumbersome
> and prone to errors, so I'd like to automate it : all files under
> "specific_dir" are to be treated in Latin1. Filenames and content.

I'd try customizing file-coding-system-alist.  If that somehow doesn't
work, please describe more details on emacs-devel@gnu.org, perhaps
there's some bug or missing feature.

Out of curiosity: how come this specific tree is in a different
encoding?  Is it a volume mounted from another machine, or some
removable media?




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

* Re: how to set language-env differently for some directories ?
  2008-06-09 16:02 ` Eli Zaretskii
@ 2008-06-09 16:35   ` Rémi Letot
  2008-06-09 17:25     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Rémi Letot @ 2008-06-09 16:35 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: =?utf-8?Q?R=C3=A9mi?= Letot <hobbes@poukram.net>
>> Date: Mon, 09 Jun 2008 16:34:29 +0200
>> 
>> My current emacs is in an UTF8 language-environment. For some
>> directories (actually a specific tree) I have to use Latin1. How can I
>> achieve that automatically ?
>> 
>> For the moment I manually switch when needed, but that's cumbersome
>> and prone to errors, so I'd like to automate it : all files under
>> "specific_dir" are to be treated in Latin1. Filenames and content.
>
> I'd try customizing file-coding-system-alist.  If that somehow doesn't
> work, please describe more details on emacs-devel@gnu.org, perhaps
> there's some bug or missing feature.

Thanks, I'll try that. 

Question : Does it deal only with content of files or also file names?

> Out of curiosity: how come this specific tree is in a different
> encoding?  Is it a volume mounted from another machine, or some
> removable media?

Oh no, simpler than that : that directory and everything in it is a
"mirror" of memos on my palm device, but the palm doesn't deal well
with UTF names and content, so I have to keep it Latin9 when I work in
it.

Thanks,
-- 
Rémi





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

* Re: how to set language-env differently for some directories ?
       [not found] <mailman.12940.1213025111.18990.help-gnu-emacs@gnu.org>
@ 2008-06-09 17:15 ` Pascal Quesseveur
  2008-06-12 14:50   ` Debian User
  0 siblings, 1 reply; 6+ messages in thread
From: Pascal Quesseveur @ 2008-06-09 17:15 UTC (permalink / raw)
  To: help-gnu-emacs

>"RL" == Rémi Letot <hobbes@poukram.net> writes:

  RL> My current emacs is in an UTF8 language-environment. For some
  RL> directories (actually a specific tree) I have to use Latin1. How can I
  RL> achieve that automatically ?

Try using modify-coding-system-alist:

,----
| (modify-coding-system-alist
|  'file "specific_tree_regexp" 'iso-latin-1-unix)
`----


-- 
Pascal Quesseveur
pascal.quesseveur@free.fr


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

* Re: how to set language-env differently for some directories ?
  2008-06-09 16:35   ` Rémi Letot
@ 2008-06-09 17:25     ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2008-06-09 17:25 UTC (permalink / raw)
  To: help-gnu-emacs

> From: =?utf-8?Q?R=C3=A9mi?= Letot <hobbes@poukram.net>
> Date: Mon, 09 Jun 2008 18:35:08 +0200
> 
> > I'd try customizing file-coding-system-alist.  If that somehow doesn't
> > work, please describe more details on emacs-devel@gnu.org, perhaps
> > there's some bug or missing feature.
> 
> Thanks, I'll try that. 
> 
> Question : Does it deal only with content of files or also file names?

The doc string sounds like it should deal with any file operation, but
I've never tried it for anything but file contents.  Again, if it
doesn't live up to its doc string, tell the details on emacs-devel.




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

* Re: how to set language-env differently for some directories ?
  2008-06-09 17:15 ` Pascal Quesseveur
@ 2008-06-12 14:50   ` Debian User
  0 siblings, 0 replies; 6+ messages in thread
From: Debian User @ 2008-06-12 14:50 UTC (permalink / raw)
  To: help-gnu-emacs

Pascal Quesseveur <pascal.quesseveur@free.fr> writes:

>>"RL" == Rémi Letot <hobbes@poukram.net> writes:
>
>   RL> My current emacs is in an UTF8 language-environment. For some
>   RL> directories (actually a specific tree) I have to use Latin1. How can I
>   RL> achieve that automatically ?
>
> Try using modify-coding-system-alist:
>
> ,----
> | (modify-coding-system-alist
> |  'file "specific_tree_regexp" 'iso-latin-1-unix)
> `----

great, it works now like a charm.

Thanks all,
-- 
Rémi





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

end of thread, other threads:[~2008-06-12 14:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-09 14:34 how to set language-env differently for some directories ? Rémi Letot
2008-06-09 16:02 ` Eli Zaretskii
2008-06-09 16:35   ` Rémi Letot
2008-06-09 17:25     ` Eli Zaretskii
     [not found] <mailman.12940.1213025111.18990.help-gnu-emacs@gnu.org>
2008-06-09 17:15 ` Pascal Quesseveur
2008-06-12 14:50   ` Debian User

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