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: disabling undo boundaries Date: Wed, 12 Aug 2015 23:34:26 +0100 Message-ID: <871tf8cf0t.fsf@russet.org.uk> References: <87fv746rd5.fsf@newcastle.ac.uk> <87y4kkkzlo.fsf@newcastle.ac.uk> <87mw0zk7yp.fsf@newcastle.ac.uk> <87617mgp1b.fsf@newcastle.ac.uk> <871ti9ammc.fsf@newcastle.ac.uk> <878ucaqm3g.fsf@newcastle.ac.uk> <87y4hrm911.fsf@newcastle.ac.uk> <87wpx79pz6.fsf@newcastle.ac.uk> <87pp2wmpxy.fsf@russet.org.uk> <878u9kcsot.fsf@newcastle.ac.uk> <87vbcnh4sp.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1439418901 12043 80.91.229.3 (12 Aug 2015 22:35:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Aug 2015 22:35:01 +0000 (UTC) Cc: Emacs-Devel devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 13 00:34:52 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 1ZPebi-0000eZ-D5 for ged-emacs-devel@m.gmane.org; Thu, 13 Aug 2015 00:34:50 +0200 Original-Received: from localhost ([::1]:40320 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPebh-0007Tq-8J for ged-emacs-devel@m.gmane.org; Wed, 12 Aug 2015 18:34:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPebc-0007Tg-GD for emacs-devel@gnu.org; Wed, 12 Aug 2015 18:34:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPebY-00048i-GO for emacs-devel@gnu.org; Wed, 12 Aug 2015 18:34:44 -0400 Original-Received: from cheviot12.ncl.ac.uk ([128.240.234.12]:60070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPebY-000463-9e for emacs-devel@gnu.org; Wed, 12 Aug 2015 18:34:40 -0400 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot12.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1ZPebT-0006Q8-BT; Wed, 12 Aug 2015 23:34:35 +0100 Original-Received: from cpc6-benw10-2-0-cust45.gate.cable.virginm.net ([92.238.179.46] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1ZPebR-0001t4-6x; Wed, 12 Aug 2015 23:34:34 +0100 In-Reply-To: (Stefan Monnier's message of "Wed, 12 Aug 2015 17:15:07 -0400") 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.12 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:188768 Archived-At: Stefan Monnier writes: >> My own feeling is that undo-boundaries should be the task of the mode >> author, with sensible default behaviour (like the current one) for >> user-centric modes (i.e. non process buffers). > > In 99.9% of the cases, authors don't want to know about undo boundaries, > they should "just work", so the default is very important. I would agree, but I still need to something that breaks so I can check it is all working. The closest I have got so far is with cider interaction mode (i.e. the repl). I managed to get this to crash out with the "excessively large undo this is probably a bug" error message after my patch, running (doall (map #(println %)) (range 100000)) However, without my patch, emacs just runs to hang as it gets into a tight GC cycle, presumably as the buffer gets enormous, so in fact this really is a bug (i.e. the buffer is never truncated), and my patch improves things. Implementing "add an undo-boundary if there isn't one in any buffer with a big buffer-undo-list" I can certainly do. Any reason to not do this on a timer (i.e. why tie it to the command cycle)? In lisp? This is a ten minute job. In C, it will take longer. Phil