From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry OReilly Newsgroups: gmane.emacs.bugs Subject: bug#16818: Acknowledgement (Undo in region after markers in undo history relocated) Date: Wed, 12 Mar 2014 21:59:55 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b33d2444fa85604f4734fbc X-Trace: ger.gmane.org 1394676253 2553 80.91.229.3 (13 Mar 2014 02:04:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Mar 2014 02:04:13 +0000 (UTC) Cc: 16818@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 13 03:04:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1WNv0N-0001Oj-Gi for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Mar 2014 03:04:19 +0100 Original-Received: from localhost ([::1]:36399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNv0M-0007aI-NC for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Mar 2014 22:04:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNv0D-0007Ym-7N for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 22:04:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNv07-0004hZ-6m for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 22:04:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNuwH-0003hJ-I6 for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 22:00:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WNuwG-0006Il-Jc for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 22:00:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Barry OReilly Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Mar 2014 02:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16818 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16818-submit@debbugs.gnu.org id=B16818.139467600024179 (code B ref 16818); Thu, 13 Mar 2014 02:00:04 +0000 Original-Received: (at 16818) by debbugs.gnu.org; 13 Mar 2014 02:00:00 +0000 Original-Received: from localhost ([127.0.0.1]:35147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNuwB-0006Ht-4b for submit@debbugs.gnu.org; Wed, 12 Mar 2014 21:59:59 -0400 Original-Received: from mail-ob0-f176.google.com ([209.85.214.176]:44123) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNuw8-0006Hg-UT for 16818@debbugs.gnu.org; Wed, 12 Mar 2014 21:59:57 -0400 Original-Received: by mail-ob0-f176.google.com with SMTP id wp18so376977obc.7 for <16818@debbugs.gnu.org>; Wed, 12 Mar 2014 18:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9KcqC6kY2Azta+Zzpg/pe0lkmD02U+PPUuxeSyiAX8Q=; b=jRix5NBY3dkXqJvlhOLolmgn9GDpJAjXpKWjQFLJmXjlXeqEno7IoFgMqmGV/6pxwu kO+yDGvCOzDqCWxF3CfWONPCuEty7Sa4TYV5rJhTIT+CTgXaNmB+Bu3+H6BOL/7R/U2b l4ETcOq8fcSPVPYAAsfBqMCs9vbiaxMrQyRHHn6R4PYiugjP+rkBTnN1HFW99OVIQ3yo WNz3QXmvikCt82EGwdcHlgU3DPL1fZ9YeYayFpj+z9dd+tUHC/hMt5k4sA5Uz5GfOWVv ThBsmjrmFtdG+O3By5nKRCA9cQ47DA8qGLqogBwGxk65aeQNCOqKKZF3WqYwhts1GgYA WE4A== X-Received: by 10.60.77.35 with SMTP id p3mr701689oew.46.1394675995878; Wed, 12 Mar 2014 18:59:55 -0700 (PDT) Original-Received: by 10.76.6.44 with HTTP; Wed, 12 Mar 2014 18:59:55 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:86806 Archived-At: --047d7b33d2444fa85604f4734fbc Content-Type: text/plain; charset=ISO-8859-1 > Thinking more about this, I think this is fixing the symptom, but > not the cause. The cause is that primitive-undo shouldn't blindly > obey a (MARKER . OFFSET) entry. Instead it should only obey it if > the marker still points at the corresponding place. >From what I can tell, the root cause is relocating markers to unrelated locations in the buffer while another part of Emacs still has a reference to it. Your counter proposal is a step from the root. For instance, the markers within the mark rings will not adjust correctly, whilst with my patch they will. I think your proposal sounds good nonetheless. I don't doubt there are other markers that could get swept up into the undo history, become relocated, and then annoy users of undo in region. > (creating new markers each time instead) My patch actually results in fewer markers created. --047d7b33d2444fa85604f4734fbc Content-Type: text/html; charset=ISO-8859-1
> Thinking more about this, I think this is fixing the symptom, but
> not the cause. The cause is that primitive-undo shouldn't blindly
> obey a (MARKER . OFFSET) entry. Instead it should only obey it if
> the marker still points at the corresponding place.

From what I can tell, the root cause is relocating markers to
unrelated locations in the buffer while another part of Emacs still
has a reference to it.

Your counter proposal is a step from the root. For instance, the
markers within the mark rings will not adjust correctly, whilst with
my patch they will.

I think your proposal sounds good nonetheless. I don't doubt there are
other markers that could get swept up into the undo history, become
relocated, and then annoy users of undo in region.

> (creating new markers each time instead)

My patch actually results in fewer markers created.

--047d7b33d2444fa85604f4734fbc--