From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: A whole lotta auto-saving going Date: Tue, 12 Jan 2021 10:18:42 -0500 Message-ID: References: <8735zdyly0.fsf@gnus.org> <87y2h1vyhq.fsf@gnus.org> <877dokq0fz.fsf@gnus.org> <83y2h0g0rk.fsf@gnu.org> <83k0sjfrad.fsf@gnu.org> <831rerfm7p.fsf@gnu.org> <83sg76dwxe.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34364"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: larsi@gnus.org, aaronjensen@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 12 16:19:54 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kzLSc-0008q6-9t for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Jan 2021 16:19:54 +0100 Original-Received: from localhost ([::1]:49664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzLSb-00036V-Cu for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Jan 2021 10:19:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzLRc-0002g7-3I for emacs-devel@gnu.org; Tue, 12 Jan 2021 10:18:52 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:14404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzLRW-00042b-W1; Tue, 12 Jan 2021 10:18:50 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E8F43101D23; Tue, 12 Jan 2021 10:18:44 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AA3A5100222; Tue, 12 Jan 2021 10:18:43 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1610464723; bh=qY+XNBYnxo8R+Sa6uZWyQo024be6n3vDNR3HeBFlavo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=W/nKQNM2+71W7MElN/zgnMQ8Brffl+No9OPh2Q+4tvPej2eMQe6uCxLgdLMVIBJcg JTr1SMFnAARvERiMcvebSgkUKHg9rFmJZPnHbCDzul/DdsUP0DRcALwhPmTad4iTSc kr6pAVlWBPOCLPcq55vPy6aHZT4GR0y/POdGEzQy8RxhZEb3A/3qz3hnH782PmNcGN h/LY/BdEoYwTiAxV9WyH9ut9k+ic83qxXF1chagFFBXGeP9UVwYFT6BiSqc8vWUW/F TjV9+sX0p1JkrTjZEQmDUV7/uoqPfM1NGPjjo4lybQATRlrpyuze1331gMvmTceIMe yCRjnYJz0X4nw== Original-Received: from alfajor (unknown [45.72.224.181]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 713E8120352; Tue, 12 Jan 2021 10:18:43 -0500 (EST) In-Reply-To: <83sg76dwxe.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 12 Jan 2021 16:58:21 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262984 Archived-At: >> From: Stefan Monnier >> 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