unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: Strange behaviour with dired and UTF8
Date: Fri, 2 May 2003 17:56:44 +0900 (JST)	[thread overview]
Message-ID: <200305020856.RAA16599@etlken.m17n.org> (raw)
In-Reply-To: <6DDE98F0-7C76-11D7-8080-00039363E640@swipnet.se> (jan.h.d@swipnet.se)

In article <6DDE98F0-7C76-11D7-8080-00039363E640@swipnet.se>, "Jan D." <jan.h.d@swipnet.se> writes:
>>  How about this?
>> 
>>  (1) Make a customizable variable
>>      file-name-coding-system-alist; the format is the same as
>>      file-coding-system-alist.
>> 
>>  (2) Make the macro ENCODE_FILE and DECODE_FILE to check that
>>      variable before using file-name-coding-system and
>>      default-file-name-coding-system.
>> 
>>  (3) Enhance the function dired-revert to update
>>      file-name-coding-system-alist automatically if it is
>>      called with coding-system-for-read being bound to
>>      non-nil.  In that case, it may also have to ask a user
>>      to save that modification for the future session (via
>>      customize).
>> 
>>  What do people think?  Aren't there any better idea?

> This sounds very complicated.  As I understand it, dired first gets
> the file name from ls (original representation), then converts that to
> whatever encoding it shall use to show it in the buffer (view
> representation).  When dired operates on the file (opening for example),
> it converts back from the view representation, hoping to get the
> original representation.  But this may fail, since conversion
> from view back to original is not one-to-one.

It is sure that there's a possibility that encoding a
filename can't get the original filename.  But, Emacs anyway
can't handle such a filename.

> This work (original representation -> view representation -> original
> representation) should not be needed, IMHO.  Why just not keep the
> original representation around (some kind of text property on the file
> name?) and always use that when operating on the file?  That change 
> would be transparent to users.

A user may type C-x C-f FILENAME in the dired buffer.  With
the above method, we don't know how to encode FILENAME.

And, even if one types `f' to visit a file, in that file
buffer, we loose the information of the original
representation.

---
Ken'ichi HANDA
handa@m17n.org

  reply	other threads:[~2003-05-02  8:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-24 11:43 Strange behaviour with dired and UTF8 Jan D.
2003-04-25 13:20 ` Kai Großjohann
2003-05-01  6:52 ` Kenichi Handa
2003-05-02  6:41   ` Kai Großjohann
2003-05-02  8:16   ` Jan D.
2003-05-02  8:56     ` Kenichi Handa [this message]
2003-05-02  9:59       ` Jan D.
2003-05-02 11:22         ` Kenichi Handa
2003-05-02 12:44           ` Jan D.
2003-05-03 15:03             ` Richard Stallman
2003-05-03 18:04               ` Jan D.
2003-05-05 14:32                 ` Richard Stallman
2003-05-07 15:51                   ` Jan D.
2003-05-07 16:09                     ` Stefan Monnier
2003-05-09 11:19                       ` Richard Stallman
2003-05-03 15:59             ` Stephen J. Turnbull
2003-05-03 17:59               ` Jan D.
2003-05-05  9:20             ` Kenichi Handa
2003-05-06 18:05               ` Jan D.
2003-05-07  1:08                 ` Kenichi Handa
2003-05-07 15:43                   ` Jan D.
2003-05-03 15:03       ` Richard Stallman
2003-05-03 18:11         ` Jan D.
2003-05-06  5:39         ` Kenichi Handa
2003-05-06 14:41           ` Richard Stallman
2003-05-07 15:49           ` Jan D.
2003-05-07 16:31             ` Stefan Monnier
2003-05-07 17:40               ` Jan D.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200305020856.RAA16599@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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