GNU bug report logs - #33476
[PATCH] Fix occur revert with list-matching-lines-jump-to-current-line

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Raimon Grau <raimon@HIDDEN>; Keywords: patch fixed; Done: Juri Linkov <juri@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 27.1, send any further explanations to 33476 <at> debbugs.gnu.org and Raimon Grau <raimon@HIDDEN> Request was from Juri Linkov <juri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Juri Linkov <juri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug Marked as found in versions 26.2. Request was from Juri Linkov <juri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 33476 <at> debbugs.gnu.org:


Received: (at 33476) by debbugs.gnu.org; 10 Dec 2018 06:27:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 10 01:27:25 2018
Received: from localhost ([127.0.0.1]:40648 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gWF2K-0005Oe-Vm
	for submit <at> debbugs.gnu.org; Mon, 10 Dec 2018 01:27:25 -0500
Received: from eggs.gnu.org ([208.118.235.92]:42337)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gWF2I-0005OP-Qw
 for 33476 <at> debbugs.gnu.org; Mon, 10 Dec 2018 01:27:23 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1gWF2A-0005cr-Dd
 for 33476 <at> debbugs.gnu.org; Mon, 10 Dec 2018 01:27:17 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58021)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gWF2A-0005cn-9p; Mon, 10 Dec 2018 01:27:14 -0500
Received: from [176.228.60.248] (port=3701 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gWF29-0002lM-SG; Mon, 10 Dec 2018 01:27:14 -0500
Date: Mon, 10 Dec 2018 08:27:01 +0200
Message-Id: <83efap3nii.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-reply-to: <871s6qmf2x.fsf@HIDDEN> (message from Juri Linkov on
 Mon, 10 Dec 2018 01:54:14 +0200)
Subject: Re: bug#33476: [PATCH] Fix occur revert with
 list-matching-lines-jump-to-current-line
References: <874lc7sdok.fsf@HIDDEN> <87efbagn6n.fsf@HIDDEN>
 <831s6s5q11.fsf@HIDDEN> <87sgz74nj7.fsf@HIDDEN>
 <837egj3zja.fsf@HIDDEN> <871s6qmf2x.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 33476
Cc: 33476 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Juri Linkov <juri@HIDDEN>
> Cc: 33476 <at> debbugs.gnu.org
> Date: Mon, 10 Dec 2018 01:54:14 +0200
> 
> The file admin/notes/repo instructs to use the phrase
> "Not to be merged to master" to indicate that it should
> not be merged to the master.
> 
> But actually `gitmerge-skip-regexp' doesn't match this phrase:
> 
> (string-match gitmerge-skip-regexp "; Not to be merged to master")
> nil
> 
> Should admin/gitmerge.el be fixed to support this phrase
> before the next merge to master?

Please don't use the instructions in admin/notes/repo, use the
instructions in CONTRIBUTE instead.  Personally, I'm not sure why the
former exists, I'd be happy if we deleted it (and move any information
that isn't already there to CONTRIBUTE).

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33476; Package emacs. Full text available.

Message received at 33476 <at> debbugs.gnu.org:


Received: (at 33476) by debbugs.gnu.org; 9 Dec 2018 23:55:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 09 18:55:09 2018
Received: from localhost ([127.0.0.1]:40395 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gW8uj-0001XX-Gz
	for submit <at> debbugs.gnu.org; Sun, 09 Dec 2018 18:55:09 -0500
Received: from ladybird.maple.relay.mailchannels.net ([23.83.214.98]:8767)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gW8uh-0001XM-E5
 for 33476 <at> debbugs.gnu.org; Sun, 09 Dec 2018 18:55:08 -0500
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 307C843A28;
 Sun,  9 Dec 2018 23:55:06 +0000 (UTC)
Received: from pdx1-sub0-mail-a47.g.dreamhost.com (unknown [100.96.26.166])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id E6C91439C7;
 Sun,  9 Dec 2018 23:55:05 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a47.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 23:55:06 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Average-Name: 4deb16f74cb25856_1544399706055_257758826
X-MC-Loop-Signature: 1544399706054:1246220202
X-MC-Ingress-Time: 1544399706054
Received: from pdx1-sub0-mail-a47.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a47.g.dreamhost.com (Postfix) with ESMTP id 7FE4B8058E;
 Sun,  9 Dec 2018 15:55:05 -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=qda4kRY6rID0ZGvDfb6syRMSERk=; b=
 ZtWQbvHozMTHEjjnn0TGV+agic0Cw2AOyJU4Eabp7XKX+JzZBstQA47iFyJbxtSe
 7d7GGXpFENAblmxIoQoplenbsDLnXLvaIwpV3hY5KrE+/5bxYY8tk+sG9A0IEY9i
 u38FD/nt3BKeBQcwWrSHBUFELCCY0ixqEewBX/voq/k=
Received: from mail.jurta.org (m91-129-96-177.cust.tele2.ee [91.129.96.177])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a47.g.dreamhost.com (Postfix) with ESMTPSA id 123DD80590;
 Sun,  9 Dec 2018 15:55:03 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a47
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#33476: [PATCH] Fix occur revert with
 list-matching-lines-jump-to-current-line
Organization: LINKOV.NET
References: <874lc7sdok.fsf@HIDDEN> <87efbagn6n.fsf@HIDDEN>
 <831s6s5q11.fsf@HIDDEN> <87sgz74nj7.fsf@HIDDEN>
 <837egj3zja.fsf@HIDDEN>
Date: Mon, 10 Dec 2018 01:54:14 +0200
In-Reply-To: <837egj3zja.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 09 Dec
 2018 09:55:05 +0200")
Message-ID: <871s6qmf2x.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudeggedgudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrudejjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrudejjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegvlhhiiiesghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedt
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33476
Cc: 33476 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> 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.
>
> OK, please push that to emacs-26, and thanks.

Done.

The file admin/notes/repo instructs to use the phrase
"Not to be merged to master" to indicate that it should
not be merged to the master.

But actually `gitmerge-skip-regexp' doesn't match this phrase:

(string-match gitmerge-skip-regexp "; Not to be merged to master")
nil

Should admin/gitmerge.el be fixed to support this phrase
before the next merge to master?

>> >> 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.
>
> Fine with me.

Done.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33476; Package emacs. Full text available.

Message received at 33476 <at> debbugs.gnu.org:


Received: (at 33476) by debbugs.gnu.org; 9 Dec 2018 07:55:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 09 02:55:30 2018
Received: from localhost ([127.0.0.1]:39177 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gVtw2-0004Ww-Fb
	for submit <at> debbugs.gnu.org; Sun, 09 Dec 2018 02:55:30 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58282)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gVtw1-0004Wj-GJ
 for 33476 <at> debbugs.gnu.org; Sun, 09 Dec 2018 02:55:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1gVtvt-0007Xz-0n
 for 33476 <at> debbugs.gnu.org; Sun, 09 Dec 2018 02:55:24 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36241)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gVtvs-0007Xv-TF; Sun, 09 Dec 2018 02:55:20 -0500
Received: from [176.228.60.248] (port=1237 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gVtvs-00013x-FD; Sun, 09 Dec 2018 02:55:20 -0500
Date: Sun, 09 Dec 2018 09:55:05 +0200
Message-Id: <837egj3zja.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-reply-to: <87sgz74nj7.fsf@HIDDEN> (message from Juri Linkov on
 Sun, 09 Dec 2018 01:16:44 +0200)
Subject: Re: bug#33476: [PATCH] Fix occur revert with
 list-matching-lines-jump-to-current-line
References: <874lc7sdok.fsf@HIDDEN> <87efbagn6n.fsf@HIDDEN>
 <831s6s5q11.fsf@HIDDEN> <87sgz74nj7.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 33476
Cc: 33476 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Juri Linkov <juri@HIDDEN>
> Cc: 33476 <at> debbugs.gnu.org
> Date: Sun, 09 Dec 2018 01:16:44 +0200
> 
> >> 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.

OK, please push that to emacs-26, and thanks.

> >> 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.

Fine with me.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33476; Package emacs. Full text available.

Message received at 33476 <at> debbugs.gnu.org:


Received: (at 33476) by debbugs.gnu.org; 9 Dec 2018 00:13:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 08 19:13:34 2018
Received: from localhost ([127.0.0.1]:39023 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gVmiz-0001DI-Lu
	for submit <at> debbugs.gnu.org; Sat, 08 Dec 2018 19:13:33 -0500
Received: from purple.birch.relay.mailchannels.net ([23.83.209.150]:10814)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gVmix-0001D5-N1
 for 33476 <at> debbugs.gnu.org; Sat, 08 Dec 2018 19:13:32 -0500
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
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)
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@HIDDEN
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@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Coil-Tangy: 4738fcfa6d2ab257_1544314410081_2703293406
X-MC-Loop-Signature: 1544314410081:4211445643
X-MC-Ingress-Time: 1544314410081
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=
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@HIDDEN)
 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
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#33476: [PATCH] Fix occur revert with
 list-matching-lines-jump-to-current-line
Organization: LINKOV.NET
References: <874lc7sdok.fsf@HIDDEN> <87efbagn6n.fsf@HIDDEN>
 <831s6s5q11.fsf@HIDDEN>
Date: Sun, 09 Dec 2018 01:16:44 +0200
In-Reply-To: <831s6s5q11.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 08 Dec
 2018 11:25:14 +0200")
Message-ID: <87sgz74nj7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudeguddgudekfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtfedrjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepvghlihiisehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgepud
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33476
Cc: 33476 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> > 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33476; Package emacs. Full text available.

Message received at 33476 <at> debbugs.gnu.org:


Received: (at 33476) by debbugs.gnu.org; 8 Dec 2018 09:25:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 08 04:25:49 2018
Received: from localhost ([127.0.0.1]:37631 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gVYrs-00061N-Up
	for submit <at> debbugs.gnu.org; Sat, 08 Dec 2018 04:25:49 -0500
Received: from eggs.gnu.org ([208.118.235.92]:53830)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gVYrr-00061C-Kk
 for 33476 <at> debbugs.gnu.org; Sat, 08 Dec 2018 04:25:47 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1gVYrg-0001Yj-9K
 for 33476 <at> debbugs.gnu.org; Sat, 08 Dec 2018 04:25:42 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45058)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gVYre-0001Xr-LR; Sat, 08 Dec 2018 04:25:34 -0500
Received: from [176.228.60.248] (port=4537 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gVYrc-0001BG-FV; Sat, 08 Dec 2018 04:25:34 -0500
Date: Sat, 08 Dec 2018 11:25:14 +0200
Message-Id: <831s6s5q11.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-reply-to: <87efbagn6n.fsf@HIDDEN> (message from Juri Linkov on
 Sat, 24 Nov 2018 23:54:24 +0200)
Subject: Re: bug#33476: [PATCH] Fix occur revert with
 list-matching-lines-jump-to-current-line
References: <874lc7sdok.fsf@HIDDEN> <87efbagn6n.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 33476
Cc: 33476 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Juri Linkov <juri@HIDDEN>
> Date: Sat, 24 Nov 2018 23:54:24 +0200
> 
> > 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?

> 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?

And which patch do you propose for the emacs-26 branch?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33476; Package emacs. Full text available.

Message received at 33476 <at> debbugs.gnu.org:


Received: (at 33476) by debbugs.gnu.org; 26 Nov 2018 17:54:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 26 12:54:45 2018
Received: from localhost ([127.0.0.1]:50090 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gRL5p-0005YN-ES
	for submit <at> debbugs.gnu.org; Mon, 26 Nov 2018 12:54:45 -0500
Received: from eggs.gnu.org ([208.118.235.92]:56825)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gRL5n-0005YA-8a
 for 33476 <at> debbugs.gnu.org; Mon, 26 Nov 2018 12:54:43 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1gRL5c-00073R-5o
 for 33476 <at> debbugs.gnu.org; Mon, 26 Nov 2018 12:54: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=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52918)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gRL5a-000732-Ps; Mon, 26 Nov 2018 12:54:32 -0500
Received: from [176.228.60.248] (port=3675 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gRL5a-0005HJ-Dk; Mon, 26 Nov 2018 12:54:30 -0500
Date: Mon, 26 Nov 2018 19:54:36 +0200
Message-Id: <83y39fhggz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-reply-to: <87efbagn6n.fsf@HIDDEN> (message from Juri Linkov on
 Sat, 24 Nov 2018 23:54:24 +0200)
Subject: Re: bug#33476: [PATCH] Fix occur revert with
 list-matching-lines-jump-to-current-line
References: <874lc7sdok.fsf@HIDDEN> <87efbagn6n.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 33476
Cc: 33476 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Juri Linkov <juri@HIDDEN>
> Date: Sat, 24 Nov 2018 23:54:24 +0200
> 
> > 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.
> But still I found a bug in master that can be fixed with another patch.
> The following patch is for Emacs 27:

Sorry for not replying until now.  I need to refresh my memory about
the changes we did lately in this area, and I didn't yet have time to
do that.  Stay tuned.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33476; Package emacs. Full text available.

Message received at 33476 <at> debbugs.gnu.org:


Received: (at 33476) by debbugs.gnu.org; 24 Nov 2018 21:59:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 24 16:59:44 2018
Received: from localhost ([127.0.0.1]:45895 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gQfxo-0004gU-LA
	for submit <at> debbugs.gnu.org; Sat, 24 Nov 2018 16:59:44 -0500
Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:48630)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gQfxm-0004gK-BK
 for 33476 <at> debbugs.gnu.org; Sat, 24 Nov 2018 16:59:43 -0500
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 22546682D17
 for <33476 <at> debbugs.gnu.org>; Sat, 24 Nov 2018 21:59:41 +0000 (UTC)
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.30.62])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id D0377682E10
 for <33476 <at> debbugs.gnu.org>; Sat, 24 Nov 2018 21:59:40 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a3.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); Sat, 24 Nov 2018 21:59:41 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Share-Tart: 2954704455840947_1543096780966_222079423
X-MC-Loop-Signature: 1543096780966:3234433226
X-MC-Ingress-Time: 1543096780966
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 996D380567
 for <33476 <at> debbugs.gnu.org>; Sat, 24 Nov 2018 13:59:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to
 :subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=linkov.net; bh=WcfVZUaUPDYop5nNmzfjudjg7pU=; b=
 3MbIqW88WhHMWiUnSj8mEWJZY0RBHyCl31lpksPovLv+3FU2oGV8RM/FJSwq0Tq3
 //tKilbVltMtKMkiDF16puXJzmgqwII90i/vk9/pTc1c76FSwsDX+DQczZn1HpDU
 El8GVM2EwwQvWKV6UHcxhD5H7sCIkd0yp+gRfehkAk0=
Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
 bits)) (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTPSA id B57288056A
 for <33476 <at> debbugs.gnu.org>; Sat, 24 Nov 2018 13:59:39 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a3
From: Juri Linkov <juri@HIDDEN>
To: 33476 <at> debbugs.gnu.org
Subject: Re: bug#33476: [PATCH] Fix occur revert with
 list-matching-lines-jump-to-current-line
Organization: LINKOV.NET
References: <874lc7sdok.fsf@HIDDEN>
Date: Sat, 24 Nov 2018 23:54:24 +0200
In-Reply-To: <874lc7sdok.fsf@HIDDEN> (Raimon Grau's message of "Fri, 23
 Nov 2018 21:10:19 +0000")
Message-ID: <87efbagn6n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: 0
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddufedgudehiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofhffjgfkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopeeffeegjeeiseguvggssghughhsrdhgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33476
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

> 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.
But still I found a bug in master that can be fixed with another patch.
The following patch is for Emacs 27:

--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=occur-orig-line.patch

diff --git a/lisp/replace.el b/lisp/replace.el
index ecb47936e7..1e64514c1c 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1657,7 +1657,10 @@ occur-engine
                   (lines 0)               ; count of matching lines
 	          (matches 0)             ; count of matches
 		  (headerpt (with-current-buffer out-buf (point)))
-                  )
+		  (orig-line (if (not (overlayp boo))
+				 (line-number-at-pos)
+			       (line-number-at-pos
+				(overlay-get boo 'occur--orig-point)))))
 	      (save-excursion
                 ;; begin searching in the buffer
 		(goto-char (if (overlayp boo) (overlay-start boo) (point-min)))
@@ -1665,9 +1668,6 @@ occur-engine
 	        (let* ((limit (if (overlayp boo) (overlay-end boo) (point-max)))
                        (start-line (line-number-at-pos))
 		       (curr-line start-line) ; line count
-		       (orig-line (if (not (overlayp boo)) 1
-                                    (line-number-at-pos
-                                     (overlay-get boo 'occur--orig-point))))
 		       (orig-line-shown-p)
 		       (prev-line nil)        ; line number of prev match endpt
 		       (prev-after-lines nil) ; context lines of prev match
@@ -1796,7 +1796,7 @@ occur-engine
 				(setq orig-line-shown-p t)
 				(save-excursion
 				  (goto-char (point-min))
-				  (forward-line (- orig-line start-line 1))
+				  (forward-line (1- orig-line))
 				  (occur-engine-line (line-beginning-position)
 						     (line-end-position) keep-props)))))
 		        ;; Actually insert the match display data
@@ -1834,7 +1834,7 @@ occur-engine
 		    (let ((orig-line-str
 			   (save-excursion
 			     (goto-char (point-min))
-			     (forward-line (- orig-line start-line 1))
+			     (forward-line (1- orig-line))
 			     (occur-engine-line (line-beginning-position)
 						(line-end-position) keep-props))))
 		      (add-face-text-property

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33476; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Nov 2018 21:21:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 23 16:21:59 2018
Received: from localhost ([127.0.0.1]:44627 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gQItj-0000Y6-HA
	for submit <at> debbugs.gnu.org; Fri, 23 Nov 2018 16:21:59 -0500
Received: from eggs.gnu.org ([208.118.235.92]:39096)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raimon@HIDDEN>) id 1gQIth-0000Xt-4J
 for submit <at> debbugs.gnu.org; Fri, 23 Nov 2018 16:21:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <raimon@HIDDEN>) id 1gQItY-0006m0-KT
 for submit <at> debbugs.gnu.org; Fri, 23 Nov 2018 16:21:49 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55105)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <raimon@HIDDEN>) id 1gQItX-0006lU-5q
 for submit <at> debbugs.gnu.org; Fri, 23 Nov 2018 16:21:47 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48528)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <raimon@HIDDEN>) id 1gQItT-0002Bl-Rl
 for bug-gnu-emacs@HIDDEN; Fri, 23 Nov 2018 16:21:46 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <raimon@HIDDEN>) id 1gQIlK-0005ej-UT
 for bug-gnu-emacs@HIDDEN; Fri, 23 Nov 2018 16:13:22 -0500
Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:38658)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <raimon@HIDDEN>) id 1gQIlK-0005eJ-Ff
 for bug-gnu-emacs@HIDDEN; Fri, 23 Nov 2018 16:13:18 -0500
Received: by mail-wm1-x330.google.com with SMTP id k198so13116629wmd.3
 for <bug-gnu-emacs@HIDDEN>; Fri, 23 Nov 2018 13:13:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konghq.com; s=google;
 h=from:to:subject:date:message-id:mime-version;
 bh=6s6W6JK71D900CzVzF4As73hW6xYWPiRM3mHHC6WI+c=;
 b=b6/Q2Y+7SRH5rXSBl7X7r68zgi+zerxVA8eUuvsXmCWbcpIUG4ZIp7junuuYnvcMH6
 EAGpilxDZ6zes/hvZQmzs3vuJqUVM0DIRhPEuXX5NtpIO6ZbCNKnbhYOCz1eE3e7y0bY
 jSvK5m7eAKhnbLQabw7HdcQi4Ckzfm2bel1fk=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=6s6W6JK71D900CzVzF4As73hW6xYWPiRM3mHHC6WI+c=;
 b=k6NHveemLuiMWiF7eb15PgW7GjXZNy8U/55E5uRB1ekjRFlGjwW2mhpb8f5v7cfKT4
 UBbnrQyrDqhusjgK5CEK1M7mjO/12VEkBJZ7kNZ9LNnNURgXwquY0wS5RNZg0BjW+L/T
 VePtSjgrJmaiqCZKfdJlzwVk8S3kM5v56F+oSs3D3oqSQABXJVoTFaetHxPw1Mrj++Pg
 S0AN5GlhdnaFxta38hU4mI6Qw4MF7C1wJYikiBk8DOyf8nIVYXHVe6T5Mu9Y2Aw+/PP1
 MXycvo6m2M9heS9DTdm+hqtqVPJ9v4xhZNiPkNXcKmqnSFsxiob+QBoRUZiCMLNUDpmp
 rbAg==
X-Gm-Message-State: AGRZ1gKTxHYYqWlfghau8BorPkBRPPFVCMn4TRRRDQePBgmADHjwwSY8
 2iSh0Gzowq4CNznZzijGkz/K88of2NZcdg==
X-Google-Smtp-Source: AFSGD/VeR4jm7Gt3WN+ttUHD/27VugaIsXME8Kw6N3Tvi5pn54isxiKTwJNU67qDxX8ls7WdyLBqtA==
X-Received: by 2002:a1c:ccb:: with SMTP id
 194-v6mr15968821wmm.102.1543007596838; 
 Fri, 23 Nov 2018 13:13:16 -0800 (PST)
Received: from raikong (50.red-79-153-200.dynamicip.rima-tde.net.
 [79.153.200.50])
 by smtp.gmail.com with ESMTPSA id j33sm23037895wre.91.2018.11.23.13.13.15
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 23 Nov 2018 13:13:16 -0800 (PST)
From: Raimon Grau <raimon@HIDDEN>
X-Google-Original-From: Raimon Grau <raimonster@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Fix occur revert with list-matching-lines-jump-to-current-line
Date: Fri, 23 Nov 2018 21:10:19 +0000
Message-ID: <874lc7sdok.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

--=-=-=
Content-Type: text/plain

Hello,

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.

Cheers,

Raimon Grau


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Guard-occur-against-an-undefined-orig-line.patch

From 2f874d70b6d69debd7370da562e768fc3b9b8198 Mon Sep 17 00:00:00 2001
From: Raimon Grau <raimonster@HIDDEN>
Date: Fri, 23 Nov 2018 20:37:12 +0000
Subject: [PATCH] Guard occur against an undefined orig-line

* lisp/replace.el (occur-engine): Avoid inserting the current line if
orig-line is nil. This happens, for example, when reverting an occur
buffer with `list-matching-lines-jump-to-current-line' set to t.
---
 lisp/replace.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/replace.el b/lisp/replace.el
index 940bf56..4f0cbf4 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1748,6 +1748,7 @@ occur-engine
                           (when (and list-matching-lines-jump-to-current-line
                                      (not multi-occur-p)
                                      (not orig-line-shown-p)
+                                     orig-line
                                      (>= curr-line orig-line))
                             (insert
                              (concat
@@ -1774,7 +1775,8 @@ occur-engine
                   ;; Insert original line if haven't done yet.
                   (when (and list-matching-lines-jump-to-current-line
                              (not multi-occur-p)
-                             (not orig-line-shown-p))
+                             (not orig-line-shown-p)
+                             orig-line)
                     (with-current-buffer out-buf
                       (insert
                        (concat
-- 
2.7.4


--=-=-=--




Acknowledgement sent to Raimon Grau <raimon@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#33476; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 11 Dec 2018 00:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.