From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#33476: [PATCH] Fix occur revert with list-matching-lines-jump-to-current-line Date: Sun, 09 Dec 2018 01:16:44 +0200 Organization: LINKOV.NET Message-ID: <87sgz74nj7.fsf@mail.linkov.net> References: <874lc7sdok.fsf@konghq.com> <87efbagn6n.fsf@mail.linkov.net> <831s6s5q11.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1544314334 20808 195.159.176.226 (9 Dec 2018 00:12:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Dec 2018 00:12:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 33476@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 09 01:12:10 2018 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 1gVmhd-0005Jl-84 for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Dec 2018 01:12:09 +0100 Original-Received: from localhost ([::1]:53381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVmjj-0002iW-UU for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Dec 2018 19:14:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVmjW-0002iD-U8 for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2018 19:14:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gVmjT-0001Pp-OV for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2018 19:14:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34777) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gVmjT-0001Pj-Jg for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2018 19:14:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gVmjT-0001F7-Eu for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2018 19:14:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Dec 2018 00:14:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33476 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33476-submit@debbugs.gnu.org id=B33476.15443144144672 (code B ref 33476); Sun, 09 Dec 2018 00:14:03 +0000 Original-Received: (at 33476) by debbugs.gnu.org; 9 Dec 2018 00:13:34 +0000 Original-Received: from localhost ([127.0.0.1]:39023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gVmiz-0001DI-Lu for submit@debbugs.gnu.org; Sat, 08 Dec 2018 19:13:33 -0500 Original-Received: from purple.birch.relay.mailchannels.net ([23.83.209.150]:10814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gVmix-0001D5-N1 for 33476@debbugs.gnu.org; Sat, 08 Dec 2018 19:13:32 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 4281212377A; Sun, 9 Dec 2018 00:13:30 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a20.g.dreamhost.com (unknown [100.96.33.121]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id EAC731226BA; Sun, 9 Dec 2018 00:13:29 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a20.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Sun, 09 Dec 2018 00:13:30 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Coil-Tangy: 4738fcfa6d2ab257_1544314410081_2703293406 X-MC-Loop-Signature: 1544314410081:4211445643 X-MC-Ingress-Time: 1544314410081 Original-Received: from pdx1-sub0-mail-a20.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a20.g.dreamhost.com (Postfix) with ESMTP id 9ECB980765; Sat, 8 Dec 2018 16:13:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=VRu2hv8CuCMZvZ8XB0cDdILUcC4=; b= LsyLoekapWVEgU/oWW0mN/YRisjwDsTz+qkpKpprDctEoAifR5AuJYAEGp2gdpzp vgazj/l2oPy3JvVaatamzLcLGm1yFPxuPzN5AliUpOogMDbVl+pbbEy8R0OpKvhI By3t7NWtleICSrBMMTY3+UNH9HpfFTPL32Zpbbps7D0= Original-Received: from mail.jurta.org (m91-129-103-7.cust.tele2.ee [91.129.103.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a20.g.dreamhost.com (Postfix) with ESMTPSA id 34D5D80760; Sat, 8 Dec 2018 16:13:27 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a20 In-Reply-To: <831s6s5q11.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 08 Dec 2018 11:25:14 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudeguddgudekfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtfedrjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepvghlihiisehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgepud 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:153231 Archived-At: >> > I reproduced this bug with Emacs 26.1 and 26.1.90 using -Q option. >> > >> > When pressing 'g' (revert-buffer) in an *Occur* buffer, in the case of >> > having `list-matching-lines-jump-to-current-line' set to non-nil, the >> > function errors as it can't find orig-line. >> > >> > I'm attaching a patch that adds a guard to the list of guards before >> > inserting the current line. >> >> Eli, is it ok to install this submitted patch to the release branch emacs-26? >> At least, it prevents the error signal. >> >> I see that for Emacs 27 in master this feature is completely rewritten. > > It was rewritten to fix the same bug, AFAIU, see bug#32543. Why do we > need to solve it again in emacs-26? I guess porting the fix from master to emacs-26 is not safe. > And which patch do you propose for the emacs-26 branch? I propose to install the patch from OP. This patch avoids the error. It still might behave incorrectly in some cases, but at least it doesn't raise the error. >> But still I found a bug in master that can be fixed with another patch. >> The following patch is for Emacs 27: > > What is the bug you found in the master branch? In the master branch when `list-matching-lines-jump-to-current-line' is non-nil, it doesn't show the current line highlighted.