emacs-devel
[Top][All Lists]
Advanced

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

Re: A whole lotta auto-saving going


From: Stefan Monnier
Subject: Re: A whole lotta auto-saving going
Date: Tue, 12 Jan 2021 10:18:42 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> From: Stefan Monnier <monnier@iro.umontreal.ca>
>> Cc: larsi@gnus.org,  aaronjensen@gmail.com,  emacs-devel@gnu.org
>> Date: Mon, 11 Jan 2021 13:00:33 -0500
>> 
>>     src/emacs -Q --eval '(start-process "toto" "*scratch*" "sh" "-c"
>> "while sleep 1; do echo hi; done")' ~/tmp/foo.c
>> 
>> This triggers the problem where auto-save is done pretty much after
>> every keystroke (with ~1s delay).  But if I change that to:
>> 
>>     src/emacs -Q --eval '(add-hook `post-command-hook (lambda ()
>> (start-process "toto" "*scratch*" "sh" "-c" "sleep 1; echo hi")))'
>> ~/tmp/foo.c
>> 
>> then the problem doesn't seem to occur any more (or rather it still
>> does, but more rarely, with a pattern I have trouble discerning).
>> It does occur, OTOH with:
>> 
>>     src/emacs -Q --eval '(add-hook `post-command-hook (lambda ()
>> (start-process "toto" "*scratch*" "sh" "-c" "sleep 1; echo hi; sleep
>> 1")))' ~/tmp/foo.c
>
> Not sure I understand: what exactly would call post-command-hook in
> such a session?  Or do you type something once Emacs starts?

Yes, I type random single characters, and the current bug is that the
file is auto-saved pretty much after every character I type (because
soon after you typed the character, the background process emits output,
which interrupts the `sit_for` without there being any pending input
event).


        Stefan




reply via email to

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