From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] fix/no-undo-boundary-on-secondary-buffer-change c7a6601 1/5: undo-size can count number of boundaries. Date: Tue, 22 Sep 2015 21:23:37 -0400 Message-ID: References: <20150915152129.671.61929@vcs.savannah.gnu.org> <8761395uxx.fsf@russet.org.uk> <8737yd2iju.fsf@russet.org.uk> <87k2rizq9w.fsf@russet.org.uk> <874mim6sj2.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1442971445 10005 80.91.229.3 (23 Sep 2015 01:24:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Sep 2015 01:24:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 23 03:23:56 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 1ZeYmq-0006Ih-8P for ged-emacs-devel@m.gmane.org; Wed, 23 Sep 2015 03:23:56 +0200 Original-Received: from localhost ([::1]:44146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeYmp-0001vU-Jg for ged-emacs-devel@m.gmane.org; Tue, 22 Sep 2015 21:23:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeYme-0001vM-32 for emacs-devel@gnu.org; Tue, 22 Sep 2015 21:23:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeYmZ-0000a7-V3 for emacs-devel@gnu.org; Tue, 22 Sep 2015 21:23:44 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:12097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeYmZ-0000Zi-RG for emacs-devel@gnu.org; Tue, 22 Sep 2015 21:23:39 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CtCwA731xV/2yixEVcgxCEAsEMCYdLBAICgTw5FAEBAQEBAQGBCkEFg10BAQMBViMFCws0BwsUGA2IWwjPIwEBAQcBAQEBHos6hC1YB4QtAQSFCZZbl1uBRSOCO4FZIoE1gUMBAQE X-IPAS-Result: A0CtCwA731xV/2yixEVcgxCEAsEMCYdLBAICgTw5FAEBAQEBAQGBCkEFg10BAQMBViMFCws0BwsUGA2IWwjPIwEBAQcBAQEBHos6hC1YB4QtAQSFCZZbl1uBRSOCO4FZIoE1gUMBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="165591780" Original-Received: from 69-196-162-108.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.162.108]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 22 Sep 2015 21:23:38 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id BA7CBAECF0; Tue, 22 Sep 2015 21:23:37 -0400 (EDT) In-Reply-To: <874mim6sj2.fsf@russet.org.uk> (Phillip Lord's message of "Tue, 22 Sep 2015 22:41:37 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:190260 Archived-At: > Okay. So, I'll recap, and then explain the logic that I am trying to > implement. So, IIUC this undo-buffer-undoably-changed is meant to distinguish "new change since boundary" from "new change since last timer run"). OK, so we were indeed miscommunicating. But I get the impression that you didn't pay attention to another part of the logic that we need: the part that pushes a boundary at the end of a command. Currently this is done in the C code and is applied only to the current buffer, but we should change this so it is applied to all buffers that were modified during the last command. > - every ten seconds check the size of the undo list, and iff it is > bigger than undo-limit, and has less than 2 boundaries, add one at the > start. Why not just unconditionally add a boundary (i.e. regardless of the undo list size)? That would make it more useful (because more predictable and avoid too large undo steps), and would remove the need for undo-buffer-undoably-changed. Stefan