[Top][All Lists]

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

Re: emacs misbehaves without --unibyte

From: Paul Stoeber
Subject: Re: emacs misbehaves without --unibyte
Date: Wed, 29 May 2002 15:13:41 +0200
User-agent: Mutt/1.3.28i

On Wed, 29 May 2002, Paul Stoeber wrote:
> If you simply want to use dired as a robust filesystem browser
> (like bash, only more comfortable), regardless of your language
> or the language of who created the files, then
>       (setq file-name-coding-system 'no-conversion)
> seems to be a solution.

Alas, this is no longer true:

address@hidden:~$ mkdir -p $'\340/\350'
address@hidden:~$ echo XXX > $'\340/\350/x'
address@hidden:~$ /e/bin/emacs --eval "(progn (setq file-name-coding-system 
'no-conversion) (dired \"~/\"))"

Go to \340.  RET.  Works.  Go to \350.  RET.
"File no longer exists; type `g' to update Dired buffer".

Again, --unibyte fixes this, even when not setting file-name-coding-system.

Emacs docs:
        dired-listing-switches's value is "-al"

        *Switches passed to `ls' for dired.  MUST contain the `l' option.
        May contain all other options that don't contradict `-l';
        may contain even `F', `b', `i' and `s'.  See also the variable
        `dired-ls-F-marks-symlinks' concerning the `F' switch.

This looks very promising, especially the `b' option.


        (setq dired-listing-switches "-alb")

, not using --unibyte, the above bug (changing into \340 but not \350) still
happens, but dired will correctly open the files $'a\340b' and even $'a\nb'
(filename with a newline in it.  and C-x C-s will even write to the correct

So, using the `b' option of ls seems to be the right
way to go for robustness, but the `b' support is still buggy:
dired won't open files with spaces in their name (for example

address@hidden:~$ echo XXX > 'a b'

). It says "File no longer exists; type `g' to update Dired buffer",
and of course *that* is not fixed by --unibyte.

When using the `b' option, dired-do-shell-command passes some filenames
incorrectly to the program: 'a b' and $'a\nb' are both passed as
'ab', but $'a\tb' and $'a\340b' are passed correctly (without --unibyte).

reply via email to

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