From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 01 09:18:44 2017 Received: (at submit) by debbugs.gnu.org; 1 Feb 2017 14:18:44 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 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 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 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 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 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) 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) To: bug-gnu-emacs@gnu.org From: Dmitry Gutov Subject: 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 Message-ID: <28211825-9989-bd18-1f53-891506af9adf@yandex.ru> Date: Wed, 1 Feb 2017 16:18:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 08 11:15:28 2017 Received: (at 25599) by debbugs.gnu.org; 8 Mar 2017 16:15:28 +0000 Received: from localhost ([127.0.0.1]:46517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cleFL-000537-Tf for submit@debbugs.gnu.org; Wed, 08 Mar 2017 11:15:28 -0500 Received: from mail-qk0-f180.google.com ([209.85.220.180]:36730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cleFK-00052u-00 for 25599@debbugs.gnu.org; Wed, 08 Mar 2017 11:15:26 -0500 Received: by mail-qk0-f180.google.com with SMTP id 1so73204305qkl.3 for <25599@debbugs.gnu.org>; Wed, 08 Mar 2017 08:15:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Fx91Iyn4KvVziBVTldlrDSH9Ats+JRCz2qm7OyTy8P4=; b=Um2xYUE2EpIIIU2kprFXEp45DtTL1TcUBIN5FhijlKGwkN9r6o6KPPS4FVXRs1/sNX B9rwol5OZWgUhkjKfkfvpxnbyai1u7dUmwhvliYFb1ZzIqM0KaE88HKvSDHkhVkmZhO5 GpPlFrSq0+jE13f13UApzChzmDbJQ2pT/3dy9SrMQ9F/hIC16Hz1zx2djMYnSXzZGTXi 4K3lILV77nb8+2pDDPqJIidlvgWgVZ5luNFUeHE8XfeS7VL7cBuLT5wW9S5IIcGoyTAO OFQ723fv2d9GNORAPy2rk+GxS8hpjfq5Ld/I6dnsig86nO4zujdZgRo7Br9/4/cdzsCw 9Y9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Fx91Iyn4KvVziBVTldlrDSH9Ats+JRCz2qm7OyTy8P4=; b=HbjXIaVc6SKysL6yxXZHnXSm2rNb+MEzp8O9wHogfhj9zRGiuD5V/vG228+mN3ndsW BMJxTI2xEjgGXP7KDQ08StwDZCPvwNLTaflxb6wz0QoGY4I7mayydUdUYjgnTN7V3pJu sgWSDSp2CnbN+EuR1EzR+tnKnN/yCB4DQfHIvjpud/+A4Y4CAu0STRSc5xV4aUS8EmdC nSGEeW7Lna9pSZgJpXF3kFJsH9ASbBnw7FB8Lev+wf3aH0/pScijlqPFM0sUnC1zzDnz Sw6JVH7VwzbtmYwIK9eK4qf+7m84WsBsfSlzBpTCEeOQripHIsxNbim0ssRqOvHM/pRY NTiA== X-Gm-Message-State: AFeK/H1Iis4J7vearJbKc4QOxp1eAn8zSUMJmIKBJfhHI4v9z54CMnTHJPlnec/1DknqSLSQ1sXX2aEj/CAwrg== X-Received: by 10.55.169.135 with SMTP id s129mr8191697qke.91.1488989719805; Wed, 08 Mar 2017 08:15:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.32.140 with HTTP; Wed, 8 Mar 2017 08:14:59 -0800 (PST) From: nitish chandra Date: Wed, 8 Mar 2017 21:44:59 +0530 Message-ID: Subject: Why edit markers after insert? To: 25599@debbugs.gnu.org Content-Type: multipart/alternative; boundary=94eb2c0724d452ef83054a3a6fb4 X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 25599 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) --94eb2c0724d452ef83054a3a6fb4 Content-Type: text/plain; charset=UTF-8 In primitive-undo in simple.el, aroud line 2550 (in master) we adjust the markers after the insertion. (dolist (adj valid-marker-adjustments) (set-marker (car adj) (- (car adj) (cdr adj)))) Why is this needed? Won't insert take care of adjusting the markers? --94eb2c0724d452ef83054a3a6fb4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: base64 PGRpdiBkaXI9Imx0ciI+PGRpdj5JbiBwcmltaXRpdmUtdW5kbyBpbiBzaW1wbGUuZWwsIGFyb3Vk IGxpbmUgMjU1MCAoaW4gbWFzdGVyKSB3ZSBhZGp1c3QgdGhlIG1hcmtlcnMgYWZ0ZXIgdGhlIGlu c2VydGlvbi48YnI+PGJyPihkb2xpc3QgKGFkaiB2YWxpZC1tYXJrZXItYWRqdXN0bWVudHMpPGJy PsKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgKHNldC1tYXJrZXIgKGNhciBhZGopPGJyPsKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgKC0gKGNh ciBhZGopIChjZHIgYWRqKSkpKTxicj48YnI+PC9kaXY+V2h5IGlzIHRoaXMgbmVlZGVkPyBXb24m IzM5O3QgaW5zZXJ0IHRha2UgY2FyZSBvZiBhZGp1c3RpbmcgdGhlIG1hcmtlcnM/PC9kaXY+DQo= --94eb2c0724d452ef83054a3a6fb4-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 08 12:39:29 2017 Received: (at 25599) by debbugs.gnu.org; 8 Mar 2017 17:39:29 +0000 Received: from localhost ([127.0.0.1]:46595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clfYf-0007oO-D9 for submit@debbugs.gnu.org; Wed, 08 Mar 2017 12:39:29 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:59399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clfYc-0007o5-TJ for 25599@debbugs.gnu.org; Wed, 08 Mar 2017 12:39:27 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3vdgkj3Lwcz3hkcs; Wed, 8 Mar 2017 18:39:25 +0100 (CET) Received: from localhost (dynscan01.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3vdgkh4PB3zvkVH; Wed, 8 Mar 2017 18:39:24 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan01.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id QLq9bI04fA-4; Wed, 8 Mar 2017 18:39:23 +0100 (CET) X-Auth-Info: egvpRyaSBVwApU4rtrgQicucNi69Uk1z92qL4t/FvPy8RHwVufRrkVIpWoWEuyzy Received: from igel.home (ppp-88-217-27-230.dynamic.mnet-online.de [88.217.27.230]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 8 Mar 2017 18:39:23 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id 0B6DB2C3E28; Wed, 8 Mar 2017 18:39:23 +0100 (CET) From: Andreas Schwab To: nitish chandra Subject: Re: bug#25599: Why edit markers after insert? References: <28211825-9989-bd18-1f53-891506af9adf@yandex.ru> X-Yow: It's strange, but I'm only TRULY ALIVE when I'm covered in POLKA DOTS and TACO SAUCE... Date: Wed, 08 Mar 2017 18:39:23 +0100 In-Reply-To: (nitish chandra's message of "Wed, 8 Mar 2017 21:44:59 +0530") Message-ID: <8737en1xdg.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25599 Cc: 25599@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Mär 08 2017, nitish chandra wrote: > In primitive-undo in simple.el, aroud line 2550 (in master) we adjust the > markers after the insertion. > > (dolist (adj valid-marker-adjustments) > (set-marker (car adj) > (- (car adj) (cdr adj)))) > > Why is this needed? Won't insert take care of adjusting the markers? Only marker originally pointing inside the deleted region were recorded here, and this is to make sure they regain their previous position after the reinsertion. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 08 13:09:17 2017 Received: (at 25599) by debbugs.gnu.org; 8 Mar 2017 18:09:17 +0000 Received: from localhost ([127.0.0.1]:46613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clg1V-0001nw-LW for submit@debbugs.gnu.org; Wed, 08 Mar 2017 13:09:17 -0500 Received: from mail-qk0-f175.google.com ([209.85.220.175]:33393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clg1U-0001nj-7G for 25599@debbugs.gnu.org; Wed, 08 Mar 2017 13:09:16 -0500 Received: by mail-qk0-f175.google.com with SMTP id y76so79315220qkb.0 for <25599@debbugs.gnu.org>; Wed, 08 Mar 2017 10:09:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hhDC5jbu6wU7rgNn6aDJcyj0ICm5e7bkfamL510AidM=; b=TtWedJFQj+PS20R8jaDfz+Vdt9SfqFRuc7HcdfD9ClmDQlvnG6F06ahSYFAe0C83Gc jU2Dtiz0KqgRLExYGBrBNDRusEUGoN8h7gnxCyQ2aGEynzyGKRIOc3F2+ubxKrPpLlew l9rPqIQsp11NcDseNQAkPyHo5mmUSooVQv1zz7rcZinSnqxIGPuvkGEuHGMN10bbdI0c VTOxYGoTYbOL1N60+g3EdlkwjXxTBI/Ez1mQkPf86bXvjpnuaAG5ybhPOmXNJBJdFfom SLWICkqBuRaaS14gz4+xkEPzfBH9F2/Ab3CtHbk2HNVapwo6gLDausuIZKVjC4jagrWa gFHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hhDC5jbu6wU7rgNn6aDJcyj0ICm5e7bkfamL510AidM=; b=XlopjKqrBp4kVpfMA710clr30rBJYZiZiP4qH2CqtM0HQZG1pwr8jvdAkLubchdFdA LGB2zJXyomUPuVQBlXNhacp9/tAAlJXI6YcsbcHf0s2G1FfiuHh4lM6S2A/dQU+mp03i TsCLb+B0Hv7QLe5aUkaWMgfolHvxfpjHKiijClu0TGAExwCu33JVowCeSpetnT5sVbb7 ewRNlDqrK32/7LFYUgbhNcSu2SpYKu346LiK5jFG79W1LJ1TvzvjXC/Y1xTXB6MGTsSG ybjus8K3kZ0Aei6shoqWaWiZKQpyOSnVK0ntzA/rxLIl602o750PQkbCP+VAcJxT1hHm ucFw== X-Gm-Message-State: AMke39kw+gDU6Q/guwUQUjO76ReTDerzfI6XjTWFQpvLwY2XREdqt8kp+DTpLNPpTw55jQSHLJFvor+QyB0zdg== X-Received: by 10.55.41.232 with SMTP id p101mr8364625qkp.186.1488996550333; Wed, 08 Mar 2017 10:09:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.32.140 with HTTP; Wed, 8 Mar 2017 10:08:49 -0800 (PST) In-Reply-To: <8737en1xdg.fsf@linux-m68k.org> References: <28211825-9989-bd18-1f53-891506af9adf@yandex.ru> <8737en1xdg.fsf@linux-m68k.org> From: nitish chandra Date: Wed, 8 Mar 2017 23:38:49 +0530 Message-ID: Subject: Re: bug#25599: Why edit markers after insert? To: Andreas Schwab Content-Type: multipart/alternative; boundary=001a11473f9674757f054a3c06be X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 25599 Cc: 25599@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) --001a11473f9674757f054a3c06be Content-Type: text/plain; charset=UTF-8 > Only marker originally pointing inside the deleted region were recorded > here, and this is to make sure they regain their previous position after > the reinsertion. > I removed this part of the code to see what changes. 1. I put a marker in a line 2. Deleted the line 3. Undo-ed the delete The marker is still in the proper place. So markers in the deleted string do seem to regain their position properly. --001a11473f9674757f054a3c06be Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

=
Only marker originally pointing inside the deleted region were recorded
here, and this is to make sure they regain their previous position after the reinsertion.

I removed th= is part of the code to see what changes.

1. I put a mark= er in a line
2. Deleted the line
3. Undo-ed the= delete

The marker is still in the proper place. So marke= rs in the deleted string do seem to regain their position properly.
--001a11473f9674757f054a3c06be-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 08 13:18:16 2017 Received: (at 25599) by debbugs.gnu.org; 8 Mar 2017 18:18:16 +0000 Received: from localhost ([127.0.0.1]:46628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clgAC-00021C-1I for submit@debbugs.gnu.org; Wed, 08 Mar 2017 13:18:16 -0500 Received: from mail-qk0-f182.google.com ([209.85.220.182]:33047) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clgAB-000212-9i for 25599@debbugs.gnu.org; Wed, 08 Mar 2017 13:18:15 -0500 Received: by mail-qk0-f182.google.com with SMTP id y76so79760732qkb.0 for <25599@debbugs.gnu.org>; Wed, 08 Mar 2017 10:18:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=s/B5k7U3SaLk3qY2ehvm30NmTrPLsJo8sMFsyPlK6Lg=; b=ijOndXaqpvZ1JOD9rxTpiI+0n0iVSrBLJYh4n/4QNBrqCWGOesbtamoZjW8EAmghnN QbjAhR6R7+auHCZt5vr9sBFQWFBS0JchviJLtB6uY2ZfcBfgLrRmLCcrVgRvNZBklVej H69rKnaMhNJGQK4dfpPBxEUJ36pjf+IToThrEcE/A3Sh6r0cwS2C97/c7ObHGFyGq1a2 g6xKTo2C1XzMv5miHhpkJM2nGigriBCEzwwW53/bJEgWdCMoaOMGDMsJt0QfDJ51c8l2 7NzZHbzK2KpnKTUJO7R1OoWXNrQ8C9nxjQeZKBBcWbX37R2oDswUeFR00wnOhZKZaVjk Nmng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=s/B5k7U3SaLk3qY2ehvm30NmTrPLsJo8sMFsyPlK6Lg=; b=gCCJKNJo5V7WnapRBNvPbW0uoE2EhHr8vZ49Edj+9JkC5a7xbFfT7sp2A/l7SKPJ4q VoYfQrjQNvm8xGtWX9Yoy7dnflwcMX8ZJ8RWkPV9a3Ft+qG/JwFiRZRpMyHmiVsTnxJk UiolDhnQ44UIhWcpfd97CRqSsXKXUIjOQnc7lCPmYmjUSl92/IWXedTCPjOaTex4ZIsL DuXDosT0pVAJUOjMRTwdFaiwUD+pzFiN8R0Z8q+J0XNOSmggGu7I3LhzCTC6YWZcX6Pr H5wDtm9sbgQI3Auhk2jNe4dI1rVXEstWrdtXXOSdsoULZr6tkyfiFeooPsnHzZRMGggS 4MqQ== X-Gm-Message-State: AMke39kown7PWz2QQQaid2wkrte5IfIIN5441vaxpQRZXjbMH2IIwsWb0kJiXgTQCAMnxmutNCIVwXCO0bn8Gg== X-Received: by 10.237.42.98 with SMTP id k31mr9556233qtf.232.1488997089641; Wed, 08 Mar 2017 10:18:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.32.140 with HTTP; Wed, 8 Mar 2017 10:17:49 -0800 (PST) In-Reply-To: References: <28211825-9989-bd18-1f53-891506af9adf@yandex.ru> <8737en1xdg.fsf@linux-m68k.org> From: nitish chandra Date: Wed, 8 Mar 2017 23:47:49 +0530 Message-ID: Subject: Re: bug#25599: Why edit markers after insert? To: Andreas Schwab Content-Type: multipart/alternative; boundary=001a1142315699d006054a3c2653 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25599 Cc: 25599@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a1142315699d006054a3c2653 Content-Type: text/plain; charset=UTF-8 Sorry, the above process threw some warnings. I didn't notice them before: Warning (emacs): Encountered (# . -14) entry in undo list with no matching (TEXT . POS) entry On 8 March 2017 at 23:38, nitish chandra wrote: > > Only marker originally pointing inside the deleted region were recorded >> here, and this is to make sure they regain their previous position after >> the reinsertion. >> > > I removed this part of the code to see what changes. > > 1. I put a marker in a line > 2. Deleted the line > 3. Undo-ed the delete > > The marker is still in the proper place. So markers in the deleted string > do seem to regain their position properly. > --001a1142315699d006054a3c2653 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sorry, the above process threw some warnings. I didn't= notice them before:

Warning (emacs): Encountered (#<marker at 1 = in *scratch*> . -14) entry in undo list with no matching (TEXT . POS) en= try



On 8 March 2017 at 23:38, nitish chandra <nitishchandrach= inta@gmail.com> wrote:

Only marker originally pointing inside the deleted region were recorded
here, and this is to make sure they regain their previous position after the reinsertion.

I removed this part of the code to see what changes.=

1. I put a marker in a line
2. Deleted th= e line
3. Undo-ed the delete

The marker is = still in the proper place. So markers in the deleted string do seem to rega= in their position properly.

--001a1142315699d006054a3c2653-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 09 14:39:59 2017 Received: (at 25599) by debbugs.gnu.org; 9 Mar 2017 19:39:59 +0000 Received: from localhost ([127.0.0.1]:48057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cm3up-0003mj-J9 for submit@debbugs.gnu.org; Thu, 09 Mar 2017 14:39:59 -0500 Received: from mail-qk0-f177.google.com ([209.85.220.177]:36377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cm3un-0003mU-VD for 25599@debbugs.gnu.org; Thu, 09 Mar 2017 14:39:58 -0500 Received: by mail-qk0-f177.google.com with SMTP id 1so135665164qkl.3 for <25599@debbugs.gnu.org>; Thu, 09 Mar 2017 11:39:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NqPV9KtGuiKLT6Uq1YCYnXlkpA6/GVCsLxwtzuAuBYo=; b=XHPc1l2x9laRrZvqZeOdyKi1kgq8WDXIRKe0Q42fZ7lGUYUL0W1glqCIs+Oc7Bp6De 2DBXck3VdQo5mcwSpkgAbk0aovfL+7UtF32MVhXKlrgzznQ//duyu8b3cIpqolMlSa4M oifdA8hFUmCWbJyGFJKAZzm3+zXmYY0bw8D1HesT8Dod68SEVitpgWNAfL+AZLJpvBRO BZV0R7N7AZQy+OGIXJ5oO03JAdkGkVUlrngPSmmofv7UHU+KcktYrbMiB/D/cOSCXwaC fW1d73BxrePReyfaPYu0bE1E9TrTXEw5xkDKewEyXgBla2h21xkBamECUeBZ+QMfG2hJ 48iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NqPV9KtGuiKLT6Uq1YCYnXlkpA6/GVCsLxwtzuAuBYo=; b=oFjQjSSDWXIrIIJ2euCos2LUb1fxv3QwRprcubzDAiM/6u+XkFGSsliRlgyVWOzEmq UFw4yeF/tpkYR78mYU6T3kWa5Yb7L0UI2Yd3Ap9jb/Ym6bkC7UzgtThfDdmdzny1NyEP QVW7SPECWcV4TUWxSFM5lRlkvZdeRlXP3DIJ+yle0cV9an060hYzJn6KFj6+kxQoO3Ce B6ukUOOZjhBh0Cq8N+Yxurt6DTVk8FkVcBfsWKcYXOPdAZWAoq6BGBAR1OYv6pnGMmJX jxScObevn02fs+v9NQ8p6gcxcpHUMTqeJK6UD0PliN4NkdN5BczDKYPFWhfOxu01Qq4d 4tjQ== X-Gm-Message-State: AMke39nsabMYzSl9pSFv8Kp8NpRH7rBjT9ByGmcgcMN057jUZpdyE2aOB2ZKVouf4W93XFDwsT/ZCXCj1KMh+A== X-Received: by 10.55.139.70 with SMTP id n67mr14396090qkd.286.1489088392196; Thu, 09 Mar 2017 11:39:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.32.140 with HTTP; Thu, 9 Mar 2017 11:39:31 -0800 (PST) In-Reply-To: References: <28211825-9989-bd18-1f53-891506af9adf@yandex.ru> <8737en1xdg.fsf@linux-m68k.org> From: nitish chandra Date: Fri, 10 Mar 2017 01:09:31 +0530 Message-ID: Subject: Re: bug#25599: Why edit markers after insert? To: Andreas Schwab Content-Type: multipart/mixed; boundary=94eb2c088490a84e3b054a51680e X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25599 Cc: 25599@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --94eb2c088490a84e3b054a51680e Content-Type: multipart/alternative; boundary=94eb2c088490a84e34054a51680c --94eb2c088490a84e34054a51680c Content-Type: text/plain; charset=UTF-8 The problem is being caused by insert invalidating some of the markers. So before adjusting the markers, we can check if the marker is valid or not. Following is a patch that does this. --94eb2c088490a84e34054a51680c Content-Type: text/html; charset=UTF-8
The problem is being caused by insert invalidating some of the markers. So before adjusting the markers, we can check if the marker is valid or not. Following is a patch that does this.
--94eb2c088490a84e34054a51680c-- --94eb2c088490a84e3b054a51680e Content-Type: text/x-patch; charset=US-ASCII; name="0001-Check-for-invalid-markers-after-insertion-in-undo.patch" Content-Disposition: attachment; filename="0001-Check-for-invalid-markers-after-insertion-in-undo.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j02s9u860 RnJvbSBjYTAyYzE1ZGUyODRlZDRhNjJmYzY0MDljYWY3NmMzNjA4Y2E2MWRhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBuaXRpc2hjaCA8bml0aXNoY2hhbmRyYWNoaW50YUBnbWFpbC5j b20+CkRhdGU6IEZyaSwgMTAgTWFyIDIwMTcgMDA6MzU6MTQgKzA1MzAKU3ViamVjdDogW1BBVENI XSBDaGVjayBmb3IgaW52YWxpZCBtYXJrZXJzIGFmdGVyIGluc2VydGlvbiBpbiB1bmRvCgoqIGxp c3Avc2ltcGxlLmVsOiBXaGVuIHVuZG8taW5nIGEgdGV4dCBkZWxldGUsCmFkanVzdCB0aGUgbWFy a2VycyBvbmx5IGFmdGVyIHZhbGlkYXRpbmcgYWZ0ZXIKaW5zZXJ0IChCdWcjMjU1OTkpCi0tLQog bGlzcC9zaW1wbGUuZWwgfCA4ICsrKysrKy0tCiAxIGZpbGUgY2hhbmdlZCwgNiBpbnNlcnRpb25z KCspLCAyIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2xpc3Avc2ltcGxlLmVsIGIvbGlzcC9z aW1wbGUuZWwKaW5kZXggZjExMGM2ZjMyNi4uMTIyMTc4Zjc2NyAxMDA2NDQKLS0tIGEvbGlzcC9z aW1wbGUuZWwKKysrIGIvbGlzcC9zaW1wbGUuZWwKQEAgLTI1NjksOCArMjU2OSwxMiBAQCBwcmlt aXRpdmUtdW5kbwogICAgICAgICAgICAgICAgKGdvdG8tY2hhciBwb3MpKQogICAgICAgICAgICAg IDs7IEFkanVzdCB0aGUgdmFsaWQgbWFya2VyIGFkanVzdG1lbnRzCiAgICAgICAgICAgICAgKGRv bGlzdCAoYWRqIHZhbGlkLW1hcmtlci1hZGp1c3RtZW50cykKLSAgICAgICAgICAgICAgIChzZXQt bWFya2VyIChjYXIgYWRqKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgKC0gKGNhciBhZGop IChjZHIgYWRqKSkpKSkpCisgICAgICAgICAgICAgICA7OyBpbnNlcnQgbWlnaHQgaGF2ZSBpbnZh bGlkYXRlZCBzb21lIG9mIHRoZQorICAgICAgICAgICAgICAgOzsgbWFya2Vycy4gV2UgdXBkYXRl IG9ubHkgdGhlIGN1cnJlbnRseSB2YWxpZAorICAgICAgICAgICAgICAgOzsgbWFya2Vycy4gU2Vl IGJ1ZyMyNTU5OQorICAgICAgICAgICAgICAgKGlmIChtYXJrZXItYnVmZmVyIChjYXIgYWRqKSkK KyAgICAgICAgICAgICAgICAgICAoc2V0LW1hcmtlciAoY2FyIGFkaikKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoLSAoY2FyIGFkaikgKGNkciBhZGopKSkpKSkpCiAgICAgICAgICAg OzsgKE1BUktFUiAuIE9GRlNFVCkgbWVhbnMgYSBtYXJrZXIgTUFSS0VSIHdhcyBhZGp1c3RlZCBi eSBPRkZTRVQuCiAgICAgICAgICAgKGAoLChhbmQgbWFya2VyIChwcmVkIG1hcmtlcnApKSAuICwo YW5kIG9mZnNldCAocHJlZCBpbnRlZ2VycCkpKQogICAgICAgICAgICAod2FybiAiRW5jb3VudGVy ZWQgJVMgZW50cnkgaW4gdW5kbyBsaXN0IHdpdGggbm8gbWF0Y2hpbmcgKFRFWFQgLiBQT1MpIGVu dHJ5IgotLSAKMi4xMS4wCgo= --94eb2c088490a84e3b054a51680e-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 16 12:43:51 2017 Received: (at control) by debbugs.gnu.org; 16 Mar 2017 16:43:51 +0000 Received: from localhost ([127.0.0.1]:59132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coYVD-0002Ey-I7 for submit@debbugs.gnu.org; Thu, 16 Mar 2017 12:43:51 -0400 Received: from mail-qt0-f182.google.com ([209.85.216.182]:33853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coYVB-0002Eg-Oh for control@debbugs.gnu.org; Thu, 16 Mar 2017 12:43:49 -0400 Received: by mail-qt0-f182.google.com with SMTP id n21so42565487qta.1 for ; Thu, 16 Mar 2017 09:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=fDeN7Obvd72mSgmYoHQudscvOaDGWOXeTvPdeF2O6t4=; b=DoR5u7SaA6aY1PWfnPov6x0lmsowkJZb9lssZFiz+uWh4kILhwM+bWaFfyyFpPLNHD YSJD4wXE98bmO3xbYhYutSqvpiox6dpvOK+pOyn8KspuB8aPp9Nlr9ntyj27Szd5EgHt kEGXwmCuaOCTuKa+VGm3ckj48C7QBABXrHL5iZPjET7p5FnDIto1e8D2OO3CID4Mwitw hBjCBTQ6vdCB+ZcdaJL2lppfgO2zjhd/ReRf6CNT1CPRrBbl3VdPCjQGTBCtra2NAIPc KfCe4iV9J3i6/p3ayE1iqxlDrsvVGayOofUYV348SQ3UPOncAE1vN8mo73+mlLK8ujRM jEhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fDeN7Obvd72mSgmYoHQudscvOaDGWOXeTvPdeF2O6t4=; b=i4ru9aTZ/zlBSHCKiBAxiuiCaHdKUL9cejhdJPzqQavfVS+HnNWr+NaNmd+JdtG2ci eJdGo5TYU1IbSfrsaJ8lWcYJEfBMZpdm6/tFfWaAXtu9ukgAOxmSby/ABTD14rga94dH bJvQozek5GxaD5ow5Lm0ndD6QgHzIREs04v+MC4nA7XwTqcfIZCfg3G67Nc8OVlSJQW9 AM++MZPzK+yMcO2/mOqWEK7BLFHPvIANY70ssfniyPTs4PjODyDLNRWWeUKP2SCbgBQ/ oESqnh8pqn25ezBYiHKff9cJ5ylQku18bsp3S2uUiJ/wHbn4JGknyhJJTZ0zaK5ESk9x tsLQ== X-Gm-Message-State: AFeK/H2b6oLpMbYQVfGIW9gNv0wCtdJz53Ith6XpPc1huLew3I9PbhL+TwDT4rfBw6lGAf1rPP03RP8OvhUC9g== X-Received: by 10.237.37.121 with SMTP id w54mr10098777qtc.14.1489682623889; Thu, 16 Mar 2017 09:43:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.32.140 with HTTP; Thu, 16 Mar 2017 09:43:23 -0700 (PDT) From: nitish chandra Date: Thu, 16 Mar 2017 22:13:23 +0530 Message-ID: Subject: PATCH for emacs bug 25599 To: control@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) tags 25599 patch quit From debbugs-submit-bounces@debbugs.gnu.org Sat May 13 21:13:08 2017 Received: (at 25599) by debbugs.gnu.org; 14 May 2017 01:13:08 +0000 Received: from localhost ([127.0.0.1]:43422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9i5s-00039o-3A for submit@debbugs.gnu.org; Sat, 13 May 2017 21:13:08 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9i5q-00039K-GV for 25599@debbugs.gnu.org; Sat, 13 May 2017 21:13:06 -0400 Received: by mail-wr0-f196.google.com with SMTP id g12so10821131wrg.2 for <25599@debbugs.gnu.org>; Sat, 13 May 2017 18:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fG/6pnddD4a8trR3hLbeZsgsj/iqH+4cFWgdLzYCew4=; b=k6TtXw5/jvcN4UzkwXEck+0yRodevkO59+/tTF2Ca+NGs3I1cYwaE+dSwgn+Udh1Su nhgTvE+xm1+awojQg7aIMTyz8lbZozcJO6i3Ac1JyXZRPIo7ixTD8UHDt9Z7WV1Yfsea jwl2Zgdego3rCMTSq8UvtK/XzWBUQoifEVqLlj2SpnDSPmWIp1o33VNZh+pIt4dMmvkS LVR6LmgPx7ooj3uU7YG6lsb13eq/xRcQd2vkHRZPmscHX3Ea0D4QG01vSm3njrC0eQf3 DJHRX0J/yvMsoU+Eip0dDpz2yhZdsNA/hjx+Hov2LW2eU5jYE/3v/d3lwoOKv3EJUetl 0jpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fG/6pnddD4a8trR3hLbeZsgsj/iqH+4cFWgdLzYCew4=; b=n5oydje4ywN2eZ+wJF4T1rgy77obzHG6CR7oiggbm9mq3v0t8QGiVoxkq1mJGO0W3o Sl6mUmrYZpSNE9o0+JHjBzhJdqabHzmhE08HYQRpOU/n+eRP6r6rZhsyQ6DfAElcYuKL GJ8YsueYHfnFCu/pRenEwtIZChxtt6tFk3lL6oR8skg7IfgAGjfTMIlkWPzpQO3YTgQ8 S/GEPBJsWIWmdHeGebWZQTGRfglwHRW2KnGbM00we1XaxhzGsBx9ueB6ey6JE0q7Wbjb IhnVrJ+KQf9bynaQ/6djI0mHzFIw7X6n0u3zYiz/v1qFSbB+OD4j4pGqhG27dEQ1pojp ciZQ== X-Gm-Message-State: AODbwcBZgvh9Mqv1WAPYsGFaPqH6sW75YmeApsYqX8oV4bzis8TNWQTp DHKOzvOy6wEwiA== X-Received: by 10.223.182.144 with SMTP id j16mr7434917wre.64.1494724380883; Sat, 13 May 2017 18:13:00 -0700 (PDT) Received: from [192.168.1.3] ([185.105.173.156]) by smtp.googlemail.com with ESMTPSA id q108sm10186274wrb.3.2017.05.13.18.12.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 18:13:00 -0700 (PDT) Subject: Re: bug#25599: Why edit markers after insert? To: nitish chandra , Andreas Schwab References: <28211825-9989-bd18-1f53-891506af9adf@yandex.ru> <8737en1xdg.fsf@linux-m68k.org> From: Dmitry Gutov Message-ID: <13792565-9d57-7546-0a81-09aec09a7705@yandex.ru> Date: Sun, 14 May 2017 04:12:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Thunderbird/53.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 25599 Cc: 25599@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 09.03.2017 21:39, nitish chandra wrote: > The problem is being caused by insert invalidating some of the markers. > So before adjusting the markers, we can check if the marker is valid or > not. Following is a patch that does this. Thanks, Nitish. The patch works for me. Could someone else more familiar with undo give a second opinion, please? From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 11 14:08:40 2017 Received: (at 25599) by debbugs.gnu.org; 11 Jun 2017 18:08:40 +0000 Received: from localhost ([127.0.0.1]:41398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dK7I0-0005Uk-CO for submit@debbugs.gnu.org; Sun, 11 Jun 2017 14:08:40 -0400 Received: from mail-it0-f52.google.com ([209.85.214.52]:37560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dK7Hx-0005UU-Qu for 25599@debbugs.gnu.org; Sun, 11 Jun 2017 14:08:38 -0400 Received: by mail-it0-f52.google.com with SMTP id m47so13630886iti.0 for <25599@debbugs.gnu.org>; Sun, 11 Jun 2017 11:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Sen2zgBGudQT6aBOwUeYlgbzPdBD5yknsgf9aLVYhy4=; b=p8CsNVlxlnqatzQbu49dad152PthiOZHnpRY7TxNyfWozfGsPzr3pK1dM8bxMIUaiV pSy8syiNXoTN8B7dt33tIc307kaLtWbOoTg5gNtX+BuTFQgzwZoi5ESR2/2e7V6tgDC5 c7Zv1Y8atdBjaKj6nKXk6TfeZVfko76F2vBWnxi0iqDGIOZHFJK8OFdTKnfynbfFAbuR ntHjMAS/6Rg/6NYI3GV6JX7bVKlZeurrPGQXv0VmZMEOHdM1eHUx8+QVS9o+sgXS6L97 +kfnrS44yJlmZam4U5Od/GBjVJauSre6LWGaAHRJznvKHDkKiKflJ31xQ8z1gYd4kjky gNcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=Sen2zgBGudQT6aBOwUeYlgbzPdBD5yknsgf9aLVYhy4=; b=BefIdtpsOAdzuJgTukWq28+UkhXRM4EzuVTNxHmcKiFZTHJ+wRdmBFow5Ko7mJNRcJ gVec9BQYCmXVCNrMXa3gON+v6U0QoloqqsoJZ+qjJMJ1daGPOxkDzayAord6tmvIsdHx c4Zwid49K675zZ4vLNFz+KJUb8rqSqHtZxTzYxEwaD3BIAm2m2c02y6/s090RXIXcWlN Lq02PcgLzVEXgHKgVN4H+xWMV3oPlO0oBCFJVvPtK1fDTkBw+suQEl73ag/IpCtGhOfO PFliRf++E6+yURBAFaXDxV6GVdnwL4GnRIbNd/Wn242D7kVaJydIDavCzAUH06opyEFq kRXQ== X-Gm-Message-State: AODbwcDAW5h2VfvSZE5LfLWh6lBMfdZy+tcYhNMCvpZJOuvu33CkM4/3 kpazXIoENETUte+S X-Received: by 10.36.25.193 with SMTP id b184mr8790528itb.75.1497204512003; Sun, 11 Jun 2017 11:08:32 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id f19sm3575824ioe.1.2017.06.11.11.08.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Jun 2017 11:08:30 -0700 (PDT) From: npostavs@users.sourceforge.net To: Dmitry Gutov Subject: Re: bug#25599: Why edit markers after insert? References: <28211825-9989-bd18-1f53-891506af9adf@yandex.ru> <8737en1xdg.fsf@linux-m68k.org> <13792565-9d57-7546-0a81-09aec09a7705@yandex.ru> Date: Sun, 11 Jun 2017 14:10:08 -0400 In-Reply-To: <13792565-9d57-7546-0a81-09aec09a7705@yandex.ru> (Dmitry Gutov's message of "Sun, 14 May 2017 04:12:58 +0300") Message-ID: <87r2yqv1j3.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25599 Cc: 25599@debbugs.gnu.org, Andreas Schwab , nitish chandra X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Dmitry Gutov writes: > On 09.03.2017 21:39, nitish chandra wrote: >> The problem is being caused by insert invalidating some of the >> markers. So before adjusting the markers, we can check if the marker >> is valid or not. Following is a patch that does this. > > Thanks, Nitish. The patch works for me. > > Could someone else more familiar with undo give a second opinion, please? Not that I'm very familiar with the undo code, but the patch seems obviously correct to me. + ;; insert might have invalidated some of the + ;; markers. We update only the currently valid + ;; markers. See bug#25599 I would augment the comment to specifically mention modification hooks though (missing double spacing too). From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 16 21:06:45 2017 Received: (at 25599-done) by debbugs.gnu.org; 17 Jun 2017 01:06:45 +0000 Received: from localhost ([127.0.0.1]:51858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dM2CL-000705-Cr for submit@debbugs.gnu.org; Fri, 16 Jun 2017 21:06:45 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dM2CK-0006zt-71 for 25599-done@debbugs.gnu.org; Fri, 16 Jun 2017 21:06:44 -0400 Received: by mail-wm0-f41.google.com with SMTP id m125so38318595wmm.1 for <25599-done@debbugs.gnu.org>; Fri, 16 Jun 2017 18:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=l5ztgMng1jgl4KOl2hhRu1jVMr6LD5w7HuKClL0fZxk=; b=iW2j3pN/9ZgBEtaCExlBmYN7G1lQ7SqHBr3CxnncRdRX/14f94u7w/vmxN35ViJ6Qr goSU8y9UEbatajO+omGdl00e8fSGSNF200E78PXcpRiwOH84fRyFl6RDTWWsdZh+ea5j ndcXdWTSnxD32ihqOQoiLCFSMitjP/e7tSpsy+iEgLA9q2Vd/mBs0dQvWQm+uEEbSOCJ QMrC9TMzxt7WS0/F5LXj1jkKKBN/M1dAq/5lwYNbiGPw0Fr1TyewHxcl3vgpyCYzaWLL Jp5PVaDTL76VHLITT5CYsaBHbFCxAiwBYWYF3n4ScD7SoEDS730C8F3mBoP/fjpSWjSi 05VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=l5ztgMng1jgl4KOl2hhRu1jVMr6LD5w7HuKClL0fZxk=; b=XLKCJo6W6Whw1B0Qlo4z4Qw+pMfPgPLGNQBfzDlo2brVFKw74hgANf1fIkd0EW1jLE 8C2OEGkQLTAHQw+sTzhhiODgrCssm2M0JuBFjuYTvRLb9myZyl/Ls9LNPOZVpv3j9hod sCAdayPv+mofTXsvM5r1fekZ+3D0u+OYWAdXaw53pw+4wEvKNGR55VXysG6S+QHL0d7i Kd4bESO5EEM1mzMmaD4ZG3heatGgM8rYgaSlPqQVeYGsPHGLQSE2acYQ3gK8LbtUKSvZ rgsHvKohfVrFaNHtMBGyiMMo3O16L3U4HZIGrUxI0vpwrgk6vOq+VQXgJHsZVmsXI35m fe3g== X-Gm-Message-State: AKS2vOxR5PJIzUtsUHQfL332+yChisvJkeQqPcRGr7xTdk/W34KEotUS UiqXiYLC3cg5Rw== X-Received: by 10.28.153.75 with SMTP id b72mr8804818wme.46.1497661598438; Fri, 16 Jun 2017 18:06:38 -0700 (PDT) Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id l26sm3679296wrl.15.2017.06.16.18.06.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jun 2017 18:06:37 -0700 (PDT) Subject: Re: bug#25599: Why edit markers after insert? To: npostavs@users.sourceforge.net References: <28211825-9989-bd18-1f53-891506af9adf@yandex.ru> <8737en1xdg.fsf@linux-m68k.org> <13792565-9d57-7546-0a81-09aec09a7705@yandex.ru> <87r2yqv1j3.fsf@users.sourceforge.net> From: Dmitry Gutov Message-ID: Date: Sat, 17 Jun 2017 04:06:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Thunderbird/54.0 MIME-Version: 1.0 In-Reply-To: <87r2yqv1j3.fsf@users.sourceforge.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 6/11/17 9:10 PM, > Not that I'm very familiar with the undo code, but the patch seems > obviously correct to me. > > + ;; insert might have invalidated some of the > + ; ; markers. We update only the currently valid > + ; ; markers. See bug#25599 > > I would augment the comment to specifically mention modification hooks > though (missing double spacing too). [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.41 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.41 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 1.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 25599-done Cc: 25599-done@debbugs.gnu.org, Andreas Schwab , nitish chandra X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 6/11/17 9:10 PM, > Not that I'm very familiar with the undo code, but the patch seems > obviously correct to me. > > + ;; insert might have invalidated some of the > + ;; markers. We update only the currently valid > + ;; markers. See bug#25599 > > I would augment the comment to specifically mention modification hooks > though (missing double spacing too). [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.41 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.41 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 1.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different On 6/11/17 9:10 PM, npostavs@users.sourceforge.net wrote: > Not that I'm very familiar with the undo code, but the patch seems > obviously correct to me. > > + ;; insert might have invalidated some of the > + ;; markers. We update only the currently valid > + ;; markers. See bug#25599 > > I would augment the comment to specifically mention modification hooks > though (missing double spacing too). Good point. Added and pushed. Thanks all! Closing. From unknown Sat Jun 21 05:00:07 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 15 Jul 2017 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator