> From: Kenichi Handa <[EMAIL PROTECTED]>
> CC: [email protected]
> Date: Wed, 16 Aug 2006 14:18:29 +0900
> 
> (let (coding-system)
>   (switch-to-buffer (find-file-noselect "temp"))
>   (setq coding-system buffer-file-coding-system)
>   (erase-buffer)
>   (let ((coding-system-for-read 'auto-save-coding))
>     (insert-file-contents "#temp#"))
>   (set-buffer-file-coding-system coding-system))
> 
> So, if the correct encoding can be detected from "temp",
> Emacs wins.

I'm not sure I understand what did you mean by ``if the correct
encoding can be detected from "temp"''.  Does it mean that only the
file name and perhaps its contents before the editing are used in the
usual way to determine or detect its EOL format?  If so, then the
following scenario will lose:

    C-x C-f temp RET
    C-x RET f dos
    ... edit the file's text ...
    M-x do-auto-save RET
    C-x C-c

If after this, you recover-file, and the original file "temp" had EOL
format other than -dos, then the recovered file will not have the -dos
EOL format.  Am I missing something?


_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to