emacs-devel
[Top][All Lists]
Advanced

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

Re: reverting non-existent file


From: Colin Baxter
Subject: Re: reverting non-existent file
Date: Thu, 14 May 2020 19:52:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

>>>>> Eli Zaretskii <address@hidden> writes:

    >> From: Colin Baxter <address@hidden> Date: Thu, 14 May 2020
    >> 17:13:22 +0100
    >> 
    >> 1. emacs -Q <RET> 2. C-x C-f some-non-existing-file-name <RET>
    >> 3. M-x add-file-local-variable-prop-line <RET> 4. coding <RET>
    >> 5. iso-2022-jp <RET> 6. Told to revert file for effect to take
    >> place.  7. M-x revert-buffer <RET> 8. yes <RET> 9. Told cannot
    >> revert nonexistent file.
    >> 
    >> The same effect occurs with other codings, for example utf-16 -
    >> but not with utf-8-unix. I'm using emacs-28.0.50.

    > I get the error message even if I don't do steps 3 to 6.  And that
    > is expected, as a non-existent file cannot be reverted.  So what
    > did you find surprising in this behavior?

    > (I'm guessing that your locale uses UTF-8 as its codeset, so the
    > new file's buffer has utf-8 encoding from the get-go, and thus
    > adding the local variable doesn't change the coding-system, and
    > you are not asked to revert the buffer.  Which is also expected.)

    > Confused.

Not now, thanks. I think I was confused by the response "revert-buffer"
when I knew I'd yet to save it. And yes, my locale is utf-8. Sorry to waste
your time.

Best wishes,



-- 
Colin Baxter
URL: http://www.Colin-Baxter.com



reply via email to

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