From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#25599: 26.0.50; "Marker does not point anywhere" error signaled by primitive-undo near an overlay with an auto-removal insert-in-front-hooks value Date: Wed, 1 Feb 2017 16:18:27 +0200 Message-ID: <28211825-9989-bd18-1f53-891506af9adf@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1485958753 28559 195.159.176.226 (1 Feb 2017 14:19:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 1 Feb 2017 14:19:13 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 To: 25599@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 01 15:19:08 2017 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 1cYvkZ-00079n-OM for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Feb 2017 15:19:08 +0100 Original-Received: from localhost ([::1]:51216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvke-0003Xt-RF for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Feb 2017 09:19:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvkY-0003Xk-6r for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 09:19:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvkU-0004q2-3t for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 09:19:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54772) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cYvkU-0004pw-0w for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 09:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cYvkT-0002dT-R7 for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 09:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Feb 2017 14:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.148595872410104 (code B ref -1); Wed, 01 Feb 2017 14:19:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Feb 2017 14:18:44 +0000 Original-Received: from localhost ([127.0.0.1]:52971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYvkC-0002cu-Id for submit@debbugs.gnu.org; Wed, 01 Feb 2017 09:18:44 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYvkA-0002cf-F7 for submit@debbugs.gnu.org; Wed, 01 Feb 2017 09:18:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvk4-0004iQ-Bd for submit@debbugs.gnu.org; Wed, 01 Feb 2017 09:18:37 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:52305) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYvk4-0004iL-8F for submit@debbugs.gnu.org; Wed, 01 Feb 2017 09:18:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvk2-0003Vi-WB for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 09:18:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvjz-0004i4-LC for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 09:18:34 -0500 Original-Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:33535) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cYvjz-0004hu-FJ for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 09:18:31 -0500 Original-Received: by mail-wm0-x233.google.com with SMTP id t18so29550017wmt.0 for ; Wed, 01 Feb 2017 06:18:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=9HVNJHnwJqp9f+gn3KFO3U6qEsIkf8X4/PAUIufJ6VI=; b=bB61Hd52kkMzGmH5RYnlYXv7yfV+hM13wbSZRy0vjuRIOr+OdjVMTb80jbGmYyaZ+A pnA1r8egAUK5EQUKpCzKPIMKnkcF4Y8iyenMGs8ZtZJEXGhyzyB0pdDBzsYzdNZQTszf dzP+5RCNefqxImkLJNfL6c+VcM9E1xxkpkIhl56GgWJJLbdDqB8ER/P+s5TSceYcUrz5 MBr1hj/mlT1+hT7N0GwM7dcUZ+kPcZFHV21T92XI3XFajC462Q0yWcAeDMtO/deAFJmg 09J3jfuL3Axuot+8P8bAQOwbs15xbCaoZxxzLARqGxbc/IGQJWpq8mULNvxzrkJghApz KBtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:from:subject:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=9HVNJHnwJqp9f+gn3KFO3U6qEsIkf8X4/PAUIufJ6VI=; b=JIPVME64xAmtEchB/pr1/8Sc7dQlCf73hdpKhZbHpMklgCsQCeBfvZkFMtnwd7UZZy 3r3kJddm3udfwzWEvOj3ViCj0uJG0op4gg82poTo7+OwIk5sYf9r3iOQaN7dcpTgphSH nKN2ZCD85PCETWOszqZNjewQFfHH1QAhofujFFJRsRZNPWDWHTulNrw195MPQOVegyFx fvwTkyUYXfb9vIGy56R5naKhwFvgX1dpFaiRZu39TKUOcsKd0GLwF1rXo3k7kriPjlKD atRFwFuD7RJDK4yjPkJcVgjgvhdpgDgaOnHEyeyyQwRoCRoKwaJpBWVodRe7EwrZDRh3 zgRw== X-Gm-Message-State: AIkVDXLd8CT0CffAV0WswgKbCpjniNtCEMoTPe6mA1g6k6i3tOBJhpPaAS1h0W1fEvbu6w== X-Received: by 10.223.135.146 with SMTP id b18mr2781835wrb.189.1485958710014; Wed, 01 Feb 2017 06:18:30 -0800 (PST) Original-Received: from [192.168.0.133] ([212.50.99.193]) by smtp.googlemail.com with ESMTPSA id x25sm34422853wrx.27.2017.02.01.06.18.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Feb 2017 06:18:29 -0800 (PST) Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:128864 Archived-At: In diff-hl, we create overlays to paint markers on the fringe. The overlays are set to be deleted when text inside (or very close nearby) is modified, for better user experience. Yet it seems to clash with "undo", original bug report here: https://github.com/dgutov/diff-hl/issues/84 Here's how to reproduce the problem without diff-hl installed: 1. Replace the contents of the scratch buffer with this: ---> ;; aaaaaaaaaaaaa ;; bbbbbbbbbbbbb (defun overlay-modified (ov after-p _beg _end &optional length) (unless after-p (when (overlay-buffer ov) (delete-overlay ov)))) (save-excursion (goto-char (point-min)) (let ((ov (make-overlay (line-beginning-position 2) (line-end-position 2)))) (overlay-put ov 'insert-in-front-hooks '(overlay-modified)))) <--- 2. Evaluate both forms at the end, the one that defines `overlay-modified' and the one that creates the overlay. 3. Select the whole first line (;; aaa...), including the newline, so that the region ends at the beginning of the second line. 4. Press C-w, killing the region, then M-x undo. 5. See the error "Marker does not point anywhere". The backtrace looks like this: Debugger entered--Lisp error: (error "Marker does not point anywhere") primitive-undo(1 ((#(";; aaaaaaaaaaaaa\n" 0 1 (fontified t face font-lock-comment-delimiter-face) 1 3 (fontified t face font-lock-comment-delimiter-face) 3 16 (fontified t face font-lock-comment-face) 16 17 (fontified t face font-lock-comment-face)) . 1) (# . -17) (# . -17) (# . -17) 18 nil undo-tree-canary)) undo-more(1) undo(nil) funcall-interactively(undo nil) The problem is not new, I see it in 24.5 as well. In GNU Emacs 26.0.50.5 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-01-23 built on zappa Repository revision: 03de82fe7ca09ab40fbcae394d4fcdfe3374496e Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Ubuntu 16.04.1 LTS