On May 16, 4:59 am, Michael Henry wrote:
>
> How does the following sound for damage control?  If Vim
> encounters an encoding error during a write, it could
> automatically re-try the write with utf-8 (or whatever fail-safe
> encoding makes sense) to prevent leaving the user with an empty
> file.

Wouldn't it be better if Vim would ask the user what to do when
encoding
with 'fenc' fails?  Some of the options could be:
   - save with 'enc' encoding
   - save with 'fenc' encoding and replace invalid characters with '?'
   - don't save anything, I'll fix it

This options should be give no matter what the value of 'writebackup'
is.
Until the user selects an option, nothing should be written to disk.
Only
then the user can be blamed if he looses data.

On May 15, 1:33pm, Bram Moolenaar wrote:
>
> If a user switches off 'writebackup' he must be prepared for losing
> work.  Perhaps this is not sufficiently clear to the user?

The file should never be truncated because of some 'error' in the
settings.
The user that removed the 'writebackup' may not be the same user that
set
'fenc'. It is not fair for the second user to pay the price of
someone
else's 'mistake'. The software is there to handle such cases without
loosing any data.

Marko

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to