From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24640: Crashes in 25.1 Date: Wed, 12 Oct 2016 20:28:47 +0300 Message-ID: <83k2dda33k.fsf@gnu.org> References: <20161012165656.GA19297@marvin.cs.ucl.ac.uk> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1476293444 17304 195.159.176.226 (12 Oct 2016 17:30:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2016 17:30:44 +0000 (UTC) Cc: 24640@debbugs.gnu.org, phillip.lord@russet.org.uk, rrt@sc3d.org To: Toby Cubitt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 12 19:30:40 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buNMR-0003a7-Vv for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Oct 2016 19:30:36 +0200 Original-Received: from localhost ([::1]:34920 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buNMQ-0001dC-Kc for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Oct 2016 13:30:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buNM0-0001OT-QH for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 13:30:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buNLv-0003Nw-OZ for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 13:30:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buNLv-0003NU-Kl for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 13:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1buNLv-0004bo-Ap for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 13:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Oct 2016 17:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24640-submit@debbugs.gnu.org id=B24640.147629335917640 (code B ref 24640); Wed, 12 Oct 2016 17:30:03 +0000 Original-Received: (at 24640) by debbugs.gnu.org; 12 Oct 2016 17:29:19 +0000 Original-Received: from localhost ([127.0.0.1]:53300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buNL9-0004aP-EM for submit@debbugs.gnu.org; Wed, 12 Oct 2016 13:29:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38949) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buNL8-0004aA-3r for 24640@debbugs.gnu.org; Wed, 12 Oct 2016 13:29:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buNKz-00037e-0d for 24640@debbugs.gnu.org; Wed, 12 Oct 2016 13:29:08 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buNKy-00037A-TL; Wed, 12 Oct 2016 13:29:04 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3288 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1buNKw-0008Hl-Ju; Wed, 12 Oct 2016 13:29:03 -0400 In-reply-to: <20161012165656.GA19297@marvin.cs.ucl.ac.uk> (message from Toby Cubitt on Wed, 12 Oct 2016 17:56:56 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124405 Archived-At: > Date: Wed, 12 Oct 2016 17:56:56 +0100 > Cc: phillip.lord@russet.org.uk, rrt@sc3d.org, 24640@debbugs.gnu.org > From: Toby Cubitt > > > Does restoring undo-tree history manipulates buffer-undo-list of any > > buffers in any way? > > No. It just reads a lisp structure from file into the buffer-undo-tree > variable. In that case, changes in Emacs undo internals are probably off the hook. Hmm... which leaves us with what other suspects? > > > Since the timer can't run whilst undo-tree lisp code is running > > > > It can run if during restoring the history, undo-tree calls sit-for, or > > asks a question, or calls some other API that enters redisplay and/or > > involves user input. > > During history loading it doesn't access buffer-undo-list at all, so it > shouldn't matter if the timer runs. > > When undoing, everything that accesses or touches buffer-undo-list is > encapsulated in the three functions I listed. None of these call sit-for, > prompt for input, or display anything. As far as I understand it, they > shouldn't be able to trigger redisplay at all (caveat I'm no redisplay > expert - that's you!) Well, one place where redisplay could be triggered is those messages about failure to load history, like this one (which actually happens during restoring Emacs sessions from Reuben's desktop file): Error reading undo-tree history from "/home/user/.emacs.d/undo-tree/.!home!user!Foo!Bar!baz!doc!yyy.tex.~undo-tree~" (I obfuscated a few directory names here to protect Reuben's privacy.) Each such message enters redisplay. But again, the undo timer is not the culprit, so this is just for completeness. > I don't think the undo timer can trigger elsewhere during undo-tree > undo. Even if it does somehow trigger outside those three functions, this > shouldn't break anything. Depending on when it triggers, undo-tree will > either pick up the extra undo boundary added to buffer-undo-list this > time around, or next time you undo. I originally asked that question because Reuben's setup arranges for restoring the session lazily, which means buffers are restored from their files by functions that run off the idle timer. So I thought about two timers stepping on each other's toes. Again, that proved to be a dead end, at least for now. > Indeed. But even if it's not to blame here, I still ought double-check > the above carefully to make sure the new undo timer doesn't interact with > undo-tree in some subtle way I've overlooked. That's prudent, of course. Thanks.