Subject: bug#18336: 24.4.50; When editing externally changed file, Emacs asks too many questions

From: Stefan Kangas <[email-masked]>
Date: Mon, 02 Mar 2020 10:04:06 +0100

Eli Zaretskii <[email-masked]> writes:

>> From: Stefan Kangas <[email-masked]>
>> Cc: Eli Zaretskii <[email-masked]>,  David Kastrup <[email-masked]>,  [email-masked]
>> Date: Mon, 02 Mar 2020 09:39:14 +0100
>> 
>> 0. emacs -Q
>> 1. C-x C-f /tmp/moo.txt RET
>> 2. abc C-x C-s
>> 3. From terminal: echo "foo" >> /tmp/moo.txt
>> 4. type something, get these messages:
>> moo.txt changed on disk; really edit the buffer? (y, n, r or C-h) y
>> 5. Answer 'y', save the file, get:
>> - do you really want to save? [not logged]
>> - moo.txt changed on disk; really edit the buffer? (y, n, r or C-h) y
>
> First, this is not what David reported, see his description up-thread.

Isn't it?  He described:

    [Original change behind Emacs' back, the trying to edit buffer]
    smobs.cc changed on disk; really edit the buffer? (y, n, r or C-h) y
    File on disk now will become a backup file if you save these changes.
    [So far so good.  Now pressing C-x C-s]
    Saving file /usr/local/tmp/lilypond/lily/smobs.cc...
    [That message is ok]
    smobs.cc changed on disk; really edit the buffer? (y, n, r or C-h) y
    [That question is ludicrous.  I am saving the file, not editing it.]

I don't think I see what the difference is from what I reported.

(Or maybe my description wasn't clear?)

> And second: are you saying you get the question
>
>   do you really want to save? [not logged]
>
> right after "C-x C-s", then the question
>
>   moo.txt changed on disk; really edit the buffer? (y, n, r or C-h)
>
> right after Emacs says "Wrote moo.txt"?  That is, you didn't do
> anything after saving to get the last prompt?

Yes.

Best regards,
Stefan Kangas