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: Sun, 10 Jan 2021 23:23:23 -0500 Message-ID: References: <8735zdyly0.fsf@gnus.org> <87y2h1vyhq.fsf@gnus.org> <877dokq0fz.fsf@gnus.org> <83y2h0g0rk.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="28476"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 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 Mon Jan 11 05:24:05 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 1kyokL-0007Fw-QM for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Jan 2021 05:24:01 +0100 Original-Received: from localhost ([::1]:57074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyokK-0004Mg-Sm for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Jan 2021 23:24:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyojq-0003yC-Dd for emacs-devel@gnu.org; Sun, 10 Jan 2021 23:23:30 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47432) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyojn-00025i-V4; Sun, 10 Jan 2021 23:23:29 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2943C80BA3; Sun, 10 Jan 2021 23:23:26 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D43A080853; Sun, 10 Jan 2021 23:23:24 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1610339004; bh=085kP5k3zhpKcL6CjyrPM6adk5S0+o/c9SheS3o9WVs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=cNOYJe58X9wiAW4i6wM1eH0oFFc0zy4RqdeakrPYVmzojyLlPJlSmwciZTDTyFizI ICdPVWcPd8t4v+wujuPzehS4chLequqd5jTSdgdbAj1wNXYw8Nj2W7D/2DFQuOez2m 5Ib+ikY//lkhG6fSP4PvEGT3EiNrsEXriMj0FTdGT2uwdK9+0zxhJyKP/nvWMgmgX1 VREI0fXjynfL9CK6PnPapAOLP+2Fd/esGtdNYaxKimRuouZaRmfJ31jyAOurALuD1S IzHWrP2lHElgsL+1H8lsdGBoRLH3Tl9Y/b8eGRVSU2LrSKavSADjq3a+zfeqxXahWz 2+TjNc5VEIhnQ== Original-Received: from alfajor (unknown [45.72.224.181]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7F513120334; Sun, 10 Jan 2021 23:23:24 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Sun, 10 Jan 2021 12:38:31 -0500") 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:262895 Archived-At: > From what I can tell, in the recipe I used, the do-auto-save function is > not called because of the number of non-menu events but because of the > "idle timeout" (and indeed, AFAICT the process output does not generate > any "events"). Apparently, the early exit from `wait_reading_process_output` comes from the following `break`: if (!process_skipped && got_some_output > 0 && (timeout.tv_sec > 0 || timeout.tv_nsec > 0)) { if (!timespec_valid_p (got_output_end_time)) break; Does someone here understanding something of what `wait_reading_process_output` does and what it is expected to do? Why does it exit here before the end of the timeout? IIUC it is supposed to exit as soon as we got some output from `wait_proc`, but in this case `wait_proc` is NULL. Is it also supposed to exit when some process output arrives? If so, shouldn't `sit_for` wrap the call to `wait_reading_process_output` inside a loop to make sure we wait the whole timeout? Stefan