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: Fri, 15 May 2020 06:36:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

>>>>> Richard Copley <address@hidden> writes:

    > On Thu, 14 May 2020 at 20:03, Eli Zaretskii <address@hidden> wrote:
    >> 
    >> > From: Colin Baxter <address@hidden> > Cc:
    >> address@hidden > Date: Thu, 14 May 2020 19:52:29 +0100
    >> >
    >> > > 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.
    >> 
    >> Hmm... maybe we should not suggest reverting if the file doesn't
    >> exist?  Would that make this situation less confusing?

    > Why suggest reverting, whether or not the file exists? The buffer
    > change just made by add-file-local-variable-prop-line hasn't been
    > saved to any file yet. Reverting will undo the change, along with
    > any other unsaved changes.

    > It seems like a little mistake in the wording of the
    > suggestion. It might make more sense to advise the user to save
    > and then revert -- except that it wouldn't cause the file-local
    > variable to take effect anyway. Perhaps I'm misunderstanding what
    > the message means ("revisit"?).

    > I think it should say just say to run "normal-mode".

Why must a user who has run 'add-file-local-variable-prop-line' be prompted
with anything? What about just removing 'revert-buffer'?

Best wishes,

Colin.


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



reply via email to

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