From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: Calling Lisp from undo.c's record_* functions Date: Wed, 18 Nov 2015 12:31:33 +0000 Message-ID: <87610zsd3u.fsf@russet.org.uk> References: <83r3jpc2of.fsf@gnu.org> <87h9kkbz6k.fsf@russet.org.uk> <838u5wbmvu.fsf@gnu.org> <83ziyc9zs0.fsf@gnu.org> <83wptg9dcd.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447852434 29673 80.91.229.3 (18 Nov 2015 13:13:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Nov 2015 13:13:54 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 18 14:13:40 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zz2Y5-0008KI-PN for ged-emacs-devel@m.gmane.org; Wed, 18 Nov 2015 14:13:21 +0100 Original-Received: from localhost ([::1]:35888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz2Y0-0002wS-7b for ged-emacs-devel@m.gmane.org; Wed, 18 Nov 2015 08:13:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz2Xs-0002qA-KK for emacs-devel@gnu.org; Wed, 18 Nov 2015 08:13:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zz2Xm-00054w-QF for emacs-devel@gnu.org; Wed, 18 Nov 2015 08:13:08 -0500 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:50481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz2Xh-00053j-DT; Wed, 18 Nov 2015 08:12:57 -0500 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Zz1te-0001fp-Fv; Wed, 18 Nov 2015 12:31:34 +0000 Original-Received: from jangai.ncl.ac.uk ([10.66.67.223] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1Zz1td-0000zF-VZ; Wed, 18 Nov 2015 12:31:33 +0000 In-Reply-To: <83wptg9dcd.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Nov 2015 05:49:06 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:194707 Archived-At: Eli Zaretskii writes: >> That would work similarly to an idle timer, so yes, that would be OK >> (tho an idle timer would be simpler). It suffers from the same problem >> as the idle timer: if there's no user interaction but there's continued >> process output, we'll fail to re-run the undo-auto-timer after the >> first N seconds of idleness. Nothing too serious (it's still better >> than what we have now anyway), tho. > > So we could start the timer not in the command loop, but somewhere in > the loop that waits for process output, perhaps. > > But if an idle timer is fine, I think Phillip already has everyuthing > sorted out on a branch. Not entirely. Either the idle timer runs all the time (which Stefan doesn't like), or we only run it once (which missed the case when a process runs). This is (in my experience) an edge case, but then the timer is there for an edge case anyway. In most circumstances, the undo-boundaries are inserted by the command-loop, or explicitly. I don't have a strong edge case for the timer at the moment. All the process handling modes that I have found add undo-boundaries correctly anyway. Phil