emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: setting utf-16 as file-name-coding-system locks up e


From: Stefan Monnier
Subject: Re: address@hidden: setting utf-16 as file-name-coding-system locks up emacs]
Date: 10 Aug 2004 13:15:39 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> See now how emacs seems to "freeze". It is possible to unfreeze it
> using C-g and then a debug outout like this is displayed:

>   ange-ftp-completion-hook-function(file-exists-p "/")
>   file-exists-p("/")
>   make-directory("/home/mathias/.emacs.d/auto-save-list/" t)

Yes, the problem is as follows:

  (file-exists-p "/home/mathias/.emacs.d/auto-save-list/") -> nil

so make-directory decides the dir needs to be created, but he first checks
to see if the parent needs to be created as well:

  (file-exists-p "/home/mathias/.emacs.d/") -> nil

so it tris to create the parent, check its own parent:

  (file-exists-p "/home/mathias/") -> nil
...
  (file-exists-p "/home/") -> nil
...
  (file-exists-p "/") -> nil
...
  (file-exists-p "/") -> nil
...
  (file-exists-p "/") -> nil
...
because the parent of "/" is "/" and because after encoding in utf-16,
even "/" doesn't exist.

Such an encoding is clearly completely wrong for such a system, so I'm not
sure how important it is to protect oneself against such situations.
After all, there are several other ways to screw oneself and this one is at
least reasonably easy to revert.  Try the following ed-emulator:

        M-: (use-global-map (make-keymap)) RET


-- Stefan




reply via email to

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