bug#81453: 31.0.90; VC reverts unsaved buffer after async checkin

Sean Whitton <[email protected]> Thu, 06 Aug 2026 12:50:18 +0100
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Version: 31.1

Aaron Zeng [05/Aug 12:25pm -04] wrote:
> On Thu, Jul 23, 2026 at 10:33 AM Sean Whitton <[email protected]> wrote:
>> I've now installed a fix on the emacs-31 branch.
>
> Thank you, I've tested and it seems to be fixed.

Thanks for confirming that.

>> > 4. If auto-save runs, the auto-save file ".#foo.txt" is unexpectedly
>> >    registered and committed, even though it did not appear in the VC-Dir
>> >    buffer.
>> >
>> > I suppose (4) is a natural consequence of passing the whole directory
>> > as an argument to "hg commit", but the behavior is somewhat surprising
>> > for auto-save at least.  (It can also be easily worked around by
>> > hgignoring auto-save files, so maybe it's not worth doing anything about
>> > this).
>>
>> I think it's unrelated, and I'm not sure what Emacs ought to do instead.
>> Possibly we could pass in some command line flags to Hg that would mean
>> our autosaves always get ignored?  We'd have to do that separately for
>> each backend.
>
> Yeah, it's unclear to me too.  I'm fine if you think it would
> appropriate to close
> this bug because the original issue is fixed, as it's not clear to me
> that this second
> thing is really a bug *in Emacs*.
>
> (If you ran `hg commit .` in a terminal and it was slow and then you continued
> editing files in Emacs, you might get the same behavior.  Or, maybe my
> ~/bin/slow-hg
> script is too artificial to say anything about Mercurial's actual
> behavior in this case.)

Yes.  Part of the problem is Emacs's defaults being a bit old.
We ought to save auto-saves under ~/.emacs.d/ by default, then it's a
non-issue.

-- 
Sean Whitton