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: disabling undo boundaries Date: Wed, 13 May 2015 08:32:59 -0400 Message-ID: References: <87fv746rd5.fsf@newcastle.ac.uk> <87617zl4kh.fsf@newcastle.ac.uk> <87h9rjhy8w.fsf@newcastle.ac.uk> <87oalqrgm7.fsf@newcastle.ac.uk> <87ioby3tdy.fsf@newcastle.ac.uk> <87y4kth5ps.fsf@newcastle.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1431520396 32248 80.91.229.3 (13 May 2015 12:33:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 May 2015 12:33:16 +0000 (UTC) Cc: Emacs-Devel devel To: phillip.lord@newcastle.ac.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 13 14:33:07 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 1YsVqV-0002li-0F for ged-emacs-devel@m.gmane.org; Wed, 13 May 2015 14:33:07 +0200 Original-Received: from localhost ([::1]:48738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsVqU-0008Gm-C8 for ged-emacs-devel@m.gmane.org; Wed, 13 May 2015 08:33:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsVqR-0008Gd-NG for emacs-devel@gnu.org; Wed, 13 May 2015 08:33:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsVqO-0003YK-SL for emacs-devel@gnu.org; Wed, 13 May 2015 08:33:03 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:40987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsVqO-0003V6-Nu for emacs-devel@gnu.org; Wed, 13 May 2015 08:33:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUFAGvvdVRFpYts/2dsb2JhbAA3DoFFoW+BCIF1AQEEAVYjBQsLNBIUGA2IN6IRjBtJCQMDgz4Dg3AEo2OEBVM X-IPAS-Result: AgUFAGvvdVRFpYts/2dsb2JhbAA3DoFFoW+BCIF1AQEEAVYjBQsLNBIUGA2IN6IRjBtJCQMDgz4Dg3AEo2OEBVM X-IronPort-AV: E=Sophos;i="5.11,557,1422939600"; d="scan'208";a="119534587" Original-Received: from 69-165-139-108.dsl.teksavvy.com (HELO ceviche.home) ([69.165.139.108]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 May 2015 08:32:59 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 1685A66132; Wed, 13 May 2015 08:32:59 -0400 (EDT) In-Reply-To: <87y4kth5ps.fsf@newcastle.ac.uk> (Phillip Lord's message of "Tue, 12 May 2015 21:59:59 +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:186476 Archived-At: > My fault for not being clear. AFAICT, undo-boundary does not set > last_undo_buffer at all. Oh, indeed, it sets last_boundary_buffer but not last_undo_buffer! Duh! > I'm still trying to understand the reason behind the logic in the first > place; unfortunately, the code seems to predate the earliest VC records. IIUC the reason is for modifications in another buffer that take place either within a command or between commands (e.g. process output), so they don't accumulate arbitrarily within a single undo-boundary. E.g. if you have a command "add timestamp to log buffer" which you typically use from another buffer then, without this logic, running this command 100 times would result in all entries in the buffer being lumped together into a single undo-unit, so you couldn't undo them separately. Stefab