emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: detecting charset of directories


From: Kevin Rodgers
Subject: Re: detecting charset of directories
Date: Thu, 19 Oct 2006 09:54:12 -0600
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

Kenichi Handa wrote:
In article <address@hidden>, Dan Jacobson <address@hidden> writes:

One can "set coding system for the next command" to dired a mounted
CDROM directory in the proper charset (big5 in my case). But the
moment one types g to refresh the dired, the dired is back in the
default charset.

So emacs is very clever in detecting the coding systems of files, but
not very cooperative for directories full of filenames all in a
particular coding system.

Detecting a coding system of filenames in a directory is
difficult to implement, but it won't be that difficult to
respect a coding system explicitly specified by C-x C-m c
for dired.  Perhaps, it can be done by locally setting
file-name-coding-system of that buffer and making
dired-revert to pay attention to that value.

`C-x C-m c' temporarily binds coding-system-for-read and
coding-system-for-write, so wouldn't it be more transparent to locally
set those variables (in dired-mode, where the other buffer-local
variables are set)?

Also, how can one ensure that `C-x m c CODING-SYSTEM g' will (1) have
its intended effect and (2) persist its effect, for subsequent `g'
commands?

As I've never touch the code of dired.el, I'm not sure how
such a change is safe.  So, shall I try it in
emacs-unicode-2 branch?

--
Kevin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]