help-emacs-windows
[Top][All Lists]
Advanced

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

[h-e-w] Corrected: Emacs unexpectedly deletes edited file


From: John J . Xenakis
Subject: [h-e-w] Corrected: Emacs unexpectedly deletes edited file
Date: Fri, 03 Jul 2015 12:24:46 -0400

The core problem that Emacs unexpectedly deletes file is still true,
but the sequence for getting the error was incorrect.

I apparently opened the file with the default coding system.  When
I "describe-current-coding-system", I get

Coding system for saving this buffer:
  * -- windows-1252-dos (alias: cp1252-dos)

However, if I open the file with
        (setq  save-buffer-coding-system 'windows-1252) ;; windows only

then I don't get the error message buffer when I save.  I remember now
that I put in the "setq save-buffer-coding-system" long ago precisely
to avoid the error message.

To make this easier to check out, I've saved a small text file that
generates the problem:

http://GenerationalDynamics.com/gdgraphics/emacsproblem.txt

Then if you want to have some fun, try the following:

1. Start Emacs.

2. Open emacsproblem.txt with default coding system.

3. Modify file and save it.

4. Get error message buffer, save as raw text.

5. Close emacs.

Then repeat steps 1-5 over and over.  Each time the file is saved, the
file gets longer and longer, as the string of UTC characters gets
longer and longer.  I don't know, but my guess is that this is a
feature not a bug.  This character encoding stuff really drives me
crazy.

John

-------------------

***** Old message:

1. Open file, setting coding system as follows:
        (setq  save-buffer-coding-system 'windows-1252) ;; windows only

2. Load a file containing \235 character.

3. Modify file and type Ctrl-X Ctrl-S.

4. Get error message buffer that begins: "These default coding systems 
   were tried to encode text ..."

5. Get minibuffer message: "Select coding system (default raw-text): "

6. Decide you don't want to save, click "X" to close emacs.

7. Discover that the entire file has been deleted (though a recovery
   file was saved).

John





reply via email to

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