GNU bug report logs - #40919
27.0.91; next-error-select-buffer does not always behave as documented

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: Trevor Spiteri <tspiteri@HIDDEN>; dated Tue, 28 Apr 2020 01:52:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 40919) by debbugs.gnu.org; 24 May 2020 22:10:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 18:10:26 2020
Received: from localhost ([127.0.0.1]:38989 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcyp8-0000AI-4S
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 18:10:26 -0400
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:51541)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jcyp0-00009U-0R
 for 40919 <at> debbugs.gnu.org; Sun, 24 May 2020 18:10:18 -0400
X-Originating-IP: 91.129.108.6
Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6])
 (Authenticated sender: juri@HIDDEN)
 by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 47F8C20008;
 Sun, 24 May 2020 22:10:10 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
Organization: LINKOV.NET
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
 <87zhau5bfw.fsf@HIDDEN>
 <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN>
 <87bln8u3xq.fsf@HIDDEN>
 <851cd382-4b2e-447a-2212-919c8a4ce908@HIDDEN>
 <87d07lykkd.fsf@HIDDEN> <83bln5rbah.fsf@HIDDEN>
 <87zhaozlvo.fsf@HIDDEN>
 <bfaf7617-098a-4473-703e-d56bf2323d71@HIDDEN>
 <87v9kr8t1s.fsf@HIDDEN>
 <facedf6f-544d-f2d5-4a01-727c99d65dc2@HIDDEN>
 <87zh9yuw5o.fsf@HIDDEN>
 <a32c195c-68c1-028c-23cb-52d5b04cf3b0@HIDDEN>
Date: Mon, 25 May 2020 00:48:53 +0300
In-Reply-To: <a32c195c-68c1-028c-23cb-52d5b04cf3b0@HIDDEN> (Dmitry Gutov's
 message of "Sun, 24 May 2020 02:30:27 +0300")
Message-ID: <87zh9xuhq2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40919
Cc: 40919 <at> debbugs.gnu.org, tspiteri@HIDDEN
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.7 (-)

>> Is this patch for master?  So there is enough time for thorough testing?
>
> I think it's for master. Though if we put it into emacs-27 and changed the
> default to the name of the new function, the behavior shouldn't change, and
> yet it would be easier to "fix" this bug through user
> configuration... (ʘ‿ʘ)

Yes, this will fix the reported problem of customizability.
Maybe Eli will agree to fix this in emacs-27.

> Suggestions for a better (shorter?) name for the new function welcome, by
> the way.

Maybe next-error-find-keep-navigation.




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

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


Received: (at 40919) by debbugs.gnu.org; 23 May 2020 23:30:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 19:30:37 2020
Received: from localhost ([127.0.0.1]:36043 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcdbB-0000Vi-7Q
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 19:30:37 -0400
Received: from mail-wr1-f51.google.com ([209.85.221.51]:43952)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1jcdb9-0000VV-9U
 for 40919 <at> debbugs.gnu.org; Sat, 23 May 2020 19:30:35 -0400
Received: by mail-wr1-f51.google.com with SMTP id i15so13795609wrx.10
 for <40919 <at> debbugs.gnu.org>; Sat, 23 May 2020 16:30:35 -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=Av3XlEm5KzPKDaLmQH9giiXZ3BoWp36LhVUs1WFjFR4=;
 b=Alh14oq2iXXgnNpL8ydkmmeEJVbaHYf80HM9sHRCpbECMC3F1u/UBRwzFMO0hrSY3E
 EoFOgtwxsrB6uFRjKdzUFO0PFUUDWv1Qj6gyXHKE0++CeJ6T+kz2bXbnUZHU32fM7znZ
 e6rO9ULZ+b6Or6A0tEq0Ct7brOJ3j9e1GhXDGWMKQ4tVRyVzlAIwqofpXx23Xk6zZex6
 7/LtZoLaArnXALh7XiAzbpI9uc018f1lmtzv+bEy5ErmyFciHKrABO51Pzk4+2nJAVmV
 WmhJSHFyHGqPzW7kZbFl4yPUc2pq3Eou3UzsfaJG9KV9mwQqgHjCPRm/Rcwe7cyHaZYV
 cxeg==
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=Av3XlEm5KzPKDaLmQH9giiXZ3BoWp36LhVUs1WFjFR4=;
 b=Ynn+H3UVFXuXQdXjLfxeH4melHlZmOgbIPds+pal4LmZFGVrHSwFJeDiaVTsKCpshz
 MjcRkSFH65vn0R/jmhQXKSRNcmBHwY34kxxHYOhGktwdgYkyd8M7Tlu98LNbTgIKxuc0
 +AYatI+PiP2bqNskXHDgUmjmK4Vl5EtqHmbXauZh0+QAF3BujG8TXDy7t4CE9+Tj6+e6
 Fw1AiGVMKeFItQttRKnsqwDXKo4aderWW8sZ1FaWGZi+g2LkRZ0VcihsRckYnR0XBJQk
 V/evVhIpeT4C93UfXYiBm0UGOr0X4RkgVPFmKO4tiPW6+H75606hf7nI4T7tkw9U3GtW
 mdFg==
X-Gm-Message-State: AOAM533A/2gJtutySOMcGC/Wl8utRsR/jjWBQpqdPF2ThkZAVVOAYxkg
 MBEyDInvh31xFnuQecw0cFI=
X-Google-Smtp-Source: ABdhPJzEvmsjp5YH1oo8/I81Z3vTpOZzxb4q//xM+sUAJj56YM/xW9X5Bgop30X73U9SuMS23sV+bQ==
X-Received: by 2002:adf:a1d3:: with SMTP id v19mr7699404wrv.245.1590276629025; 
 Sat, 23 May 2020 16:30:29 -0700 (PDT)
Received: from [192.168.0.3] ([66.205.73.129])
 by smtp.googlemail.com with ESMTPSA id e5sm5735409wrw.19.2020.05.23.16.30.27
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 23 May 2020 16:30:28 -0700 (PDT)
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
To: Juri Linkov <juri@HIDDEN>
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
 <87zhau5bfw.fsf@HIDDEN>
 <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN>
 <87bln8u3xq.fsf@HIDDEN>
 <851cd382-4b2e-447a-2212-919c8a4ce908@HIDDEN>
 <87d07lykkd.fsf@HIDDEN> <83bln5rbah.fsf@HIDDEN>
 <87zhaozlvo.fsf@HIDDEN>
 <bfaf7617-098a-4473-703e-d56bf2323d71@HIDDEN>
 <87v9kr8t1s.fsf@HIDDEN>
 <facedf6f-544d-f2d5-4a01-727c99d65dc2@HIDDEN>
 <87zh9yuw5o.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <a32c195c-68c1-028c-23cb-52d5b04cf3b0@HIDDEN>
Date: Sun, 24 May 2020 02:30:27 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <87zh9yuw5o.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 40919
Cc: 40919 <at> debbugs.gnu.org, tspiteri@HIDDEN
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: -0.5 (/)

On 24.05.2020 01:24, Juri Linkov wrote:
> Is this patch for master?  So there is enough time for thorough testing?

I think it's for master. Though if we put it into emacs-27 and changed 
the default to the name of the new function, the behavior shouldn't 
change, and yet it would be easier to "fix" this bug through user 
configuration... (ʘ‿ʘ)

But your question seems to confirm that it's for master.

Suggestions for a better (shorter?) name for the new function welcome, 
by the way.




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

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


Received: (at 40919) by debbugs.gnu.org; 23 May 2020 22:56:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 18:56:32 2020
Received: from localhost ([127.0.0.1]:36000 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcd4C-00088K-AD
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 18:56:32 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:52511)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jcd4A-00087u-Fq
 for 40919 <at> debbugs.gnu.org; Sat, 23 May 2020 18:56:30 -0400
X-Originating-IP: 91.129.97.200
Received: from mail.gandi.net (m91-129-97-200.cust.tele2.ee [91.129.97.200])
 (Authenticated sender: juri@HIDDEN)
 by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 7246040005;
 Sat, 23 May 2020 22:56:22 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
Organization: LINKOV.NET
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
 <87zhau5bfw.fsf@HIDDEN>
 <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN>
 <87bln8u3xq.fsf@HIDDEN>
 <851cd382-4b2e-447a-2212-919c8a4ce908@HIDDEN>
 <87d07lykkd.fsf@HIDDEN> <83bln5rbah.fsf@HIDDEN>
 <87zhaozlvo.fsf@HIDDEN>
 <bfaf7617-098a-4473-703e-d56bf2323d71@HIDDEN>
 <87v9kr8t1s.fsf@HIDDEN>
 <facedf6f-544d-f2d5-4a01-727c99d65dc2@HIDDEN>
Date: Sun, 24 May 2020 01:24:51 +0300
In-Reply-To: <facedf6f-544d-f2d5-4a01-727c99d65dc2@HIDDEN> (Dmitry Gutov's
 message of "Fri, 22 May 2020 02:57:37 +0300")
Message-ID: <87zh9yuw5o.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40919
Cc: Eli Zaretskii <eliz@HIDDEN>, 40919 <at> debbugs.gnu.org, tspiteri@HIDDEN
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.7 (-)

>> But I'm not proud of the case no. 2, so you can drop it :)
>> Or better move it to a separate function and provide this function
>> as an option in next-error-find-buffer-function.
>
> Patch attached. Comments welcome.

Is this patch for master?  So there is enough time for thorough testing?




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

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


Received: (at 40919) by debbugs.gnu.org; 21 May 2020 23:57:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 21 19:57:47 2020
Received: from localhost ([127.0.0.1]:57596 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jbv4N-00051N-4k
	for submit <at> debbugs.gnu.org; Thu, 21 May 2020 19:57:47 -0400
Received: from mail-wr1-f42.google.com ([209.85.221.42]:37911)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1jbv4M-00051B-56
 for 40919 <at> debbugs.gnu.org; Thu, 21 May 2020 19:57:46 -0400
Received: by mail-wr1-f42.google.com with SMTP id e1so8405011wrt.5
 for <40919 <at> debbugs.gnu.org>; Thu, 21 May 2020 16:57:46 -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;
 bh=+NliZw2joC5srp+vgKbLowcYyq7MFFHHwrouRXPAdbs=;
 b=Ob5tOjphgEjF0pElVLpRAmoGiS/t9MtBmyh7IqtypjQQCvgzd+O9G7ce+6RJhaCYhM
 SoU7nvExyJ6qI6E5hravZ6BnFJ0aQLN0eVbcFGqPYTc2fEKz43sT/eeZ0eew43LWuU3t
 Dz2Hk+Z86zZaxEf9Hy8u2ECUabjV4jQhlipfGQGZNSRnVPKWHgsFTrCkv4BQ5/Mk7Rr6
 9vq0IUFhvF2BnkRyJDSqt74eGDdN+vGUir1iJuG7UT5Gh52iNCxtJhzbRVOza1gt3YjU
 noXEZXRV6L2Bu48noc+flQf/irBnTTfxzQmDJJzojr8E8T8WgPJqOTrltYNV96YgllC4
 5Tdw==
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;
 bh=+NliZw2joC5srp+vgKbLowcYyq7MFFHHwrouRXPAdbs=;
 b=jj5t7OMfCn7ASI543mGtY/07TwWOyJmsn+qIweXo3zTwE/vZokBoWk7oj1l7M0HYDe
 szMkq10QJdaV2YLoarXI9JkhZJe2m9sygdx0ZDFAKWI2ZMG9SRWomDkxXe08WEIIL5Xj
 yNmEG1nhJIl3rrWHcuVwng6IAkVI/Tq/WvV2rvoBNJGvH3u5xUL+3heMsDhGNzKFD93p
 Yw4ZUUcqSiIJIIrJ64PVOhfu315vVJ23KAraVeHJymDIX2nVhDR/CgVVkjbxZdF2zSPw
 Loa7JCqrZWn/1q7C5ZB4Ldx7PZ7KDRzDwuIdxOf/zzm9hV9hZDxr9Swo9arfwVVdrH2z
 +zeQ==
X-Gm-Message-State: AOAM530xpaQkSuwdaJRCErDhn5LtHploOhF+yAHz9y8p/RK7b4FNHjJX
 sCq7iDmW+KScDjJVHo3U+/4=
X-Google-Smtp-Source: ABdhPJwDbNFgYPLQhDPjTudjsmajPeCm+ZzmrEewG1FgPr81J1JXRel3DteGb8KYbHmKoMkLBXS2Gw==
X-Received: by 2002:adf:dd50:: with SMTP id u16mr958768wrm.58.1590105460161;
 Thu, 21 May 2020 16:57:40 -0700 (PDT)
Received: from [192.168.0.3] ([66.205.73.129])
 by smtp.googlemail.com with ESMTPSA id w15sm7750599wmi.35.2020.05.21.16.57.38
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 21 May 2020 16:57:39 -0700 (PDT)
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
To: Juri Linkov <juri@HIDDEN>
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
 <87zhau5bfw.fsf@HIDDEN>
 <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN>
 <87bln8u3xq.fsf@HIDDEN>
 <851cd382-4b2e-447a-2212-919c8a4ce908@HIDDEN>
 <87d07lykkd.fsf@HIDDEN> <83bln5rbah.fsf@HIDDEN>
 <87zhaozlvo.fsf@HIDDEN>
 <bfaf7617-098a-4473-703e-d56bf2323d71@HIDDEN>
 <87v9kr8t1s.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <facedf6f-544d-f2d5-4a01-727c99d65dc2@HIDDEN>
Date: Fri, 22 May 2020 02:57:37 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <87v9kr8t1s.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------999E6205C3908AAA7F507F55"
Content-Language: en-US
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 40919
Cc: Eli Zaretskii <eliz@HIDDEN>, 40919 <at> debbugs.gnu.org, tspiteri@HIDDEN
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: -0.5 (/)

This is a multi-part message in MIME format.
--------------999E6205C3908AAA7F507F55
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

On 20.05.2020 01:21, Juri Linkov wrote:
>>> Another variant would be
>>> to add an optional choice to the existing option that allows to restore
>>> the old behavior and doesn't affect the current behavior in any way.
>>
>> FWIW, I'd consider that more of a documentation change.
>>
>> More importantly, and certainly only for Emacs 28, Juri could you remind me
>> what we'll be losing by removing the case no. 2 from
>> next-error-find-buffer?
> 
> It is used to handle such cases when navigating one next-error list
> visits a buffer that contains another next-error list - visiting
> such buffer should not switch the navigation, it should continue
> the initial navigation.

Didn't we fix changelog-mode so this doesn't happen anymore? I think as 
long as file major modes don't set next-error-last-buffer (and minor 
modes either, on initialization), we should be safe.

Can you reproduce a problematic scenario with the attached patch?

> But I'm not proud of the case no. 2, so you can drop it :)
> 
> Or better move it to a separate function and provide this function
> as an option in next-error-find-buffer-function.

Patch attached. Comments welcome.

>> The ability to switch to an arbitrary Grep buffer and start using it with
>> 'M-x next-error'? E.g. if there are several of them. That's more of
>> a backward compatibility concern, right? Or do you have scenarios in
>> mind where this will really save on keystrokes?
> 
> The ability to visit an arbitrary Grep buffer and use 'next-error' in it
> to switch navigation should always work as the most reliable and implicit
> way to switch navigation.  This is the case no. 3 in next-error-find-buffer.

Not if there are, say, two Compilation buffers (or Grep and Occur, etc), 
and you switch to the least recently used one, and press M-g n.

It's probably fine, though.

>> On another note, perhaps we could add a message to next-error-select-buffer
>> that would be shown if we suspect this command will not have the expected
>> result for the user.
> 
> Or maybe ask the user using the minibuffer to resolve ambiguity.

Resolve it how? I think we can safely guess their intention, it's just 
not trivial to execute it.

Anyway, this problem should go away with the attached patch.

--------------999E6205C3908AAA7F507F55
Content-Type: text/x-patch; charset=UTF-8;
 name="next-error-extract-case-2.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="next-error-extract-case-2.diff"

diff --git a/lisp/simple.el b/lisp/simple.el
index 111afa69d1..31d6cbcef2 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -211,6 +211,8 @@ next-error-find-buffer-function
   :type '(choice (const :tag "No default" ignore)
                  (const :tag "Single next-error capable buffer on selected frame"
                         next-error-buffer-on-selected-frame)
+                 (const :tag "Current buffer if next-error capable and outside navigation"
+                        next-error-buffer-try-current-outside-navigation)
                  (function :tag "Other function"))
   :group 'next-error
   :version "27.1")
@@ -240,6 +242,21 @@ next-error-buffer-on-selected-frame
     (if (eq (length window-buffers) 1)
         (car window-buffers))))
 
+(defun next-error-buffer-try-current-outside-navigation (&optional
+                                                         avoid-current
+                                                         extra-test-inclusive
+                                                         extra-test-exclusive)
+  "Maybe Return current buffer if it's next-error capable.
+But return nil if we navigated to the current buffer by the means
+of `next-error' command."
+  ;; Check that next-error-buffer has no buffer-local value
+  ;; (i.e. never navigated to the current buffer from another),
+  ;; and the current buffer is a `next-error' capable buffer.
+  (if (and (not (local-variable-p 'next-error-buffer))
+           (next-error-buffer-p (current-buffer) avoid-current
+                                extra-test-inclusive extra-test-exclusive))
+      (current-buffer)))
+
 (defun next-error-find-buffer (&optional avoid-current
 					 extra-test-inclusive
 					 extra-test-exclusive)
@@ -260,24 +277,16 @@ next-error-find-buffer
    (funcall next-error-find-buffer-function avoid-current
                                             extra-test-inclusive
                                             extra-test-exclusive)
-   ;; 2. If next-error-buffer has no buffer-local value
-   ;; (i.e. never navigated to the current buffer from another),
-   ;; and the current buffer is a `next-error' capable buffer,
-   ;; use it unconditionally, so next-error will always use it.
-   (if (and (not (local-variable-p 'next-error-buffer))
-            (next-error-buffer-p (current-buffer) avoid-current
-			         extra-test-inclusive extra-test-exclusive))
-       (current-buffer))
-   ;; 3. If next-error-last-buffer is an acceptable buffer, use that.
+   ;; 2. If next-error-last-buffer is an acceptable buffer, use that.
    (if (and next-error-last-buffer
             (next-error-buffer-p next-error-last-buffer avoid-current
                                  extra-test-inclusive extra-test-exclusive))
        next-error-last-buffer)
-   ;; 4. If the current buffer is acceptable, choose it.
+   ;; 3. If the current buffer is acceptable, choose it.
    (if (next-error-buffer-p (current-buffer) avoid-current
 			    extra-test-inclusive extra-test-exclusive)
        (current-buffer))
-   ;; 5. Look for any acceptable buffer.
+   ;; 4. Look for any acceptable buffer.
    (let ((buffers (buffer-list)))
      (while (and buffers
                  (not (next-error-buffer-p
@@ -285,7 +294,7 @@ next-error-find-buffer
 		       extra-test-inclusive extra-test-exclusive)))
        (setq buffers (cdr buffers)))
      (car buffers))
-   ;; 6. Use the current buffer as a last resort if it qualifies,
+   ;; 5. Use the current buffer as a last resort if it qualifies,
    ;; even despite AVOID-CURRENT.
    (and avoid-current
 	(next-error-buffer-p (current-buffer) nil
@@ -293,7 +302,7 @@ next-error-find-buffer
 	(progn
 	  (message "This is the only buffer with error message locations")
 	  (current-buffer)))
-   ;; 7. Give up.
+   ;; 6. Give up.
    (error "No buffers contain error message locations")))
 
 (defun next-error (&optional arg reset)

--------------999E6205C3908AAA7F507F55--




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

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


Received: (at 40919) by debbugs.gnu.org; 19 May 2020 22:25:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 19 18:25:32 2020
Received: from localhost ([127.0.0.1]:51352 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jbAfz-0003rn-Qj
	for submit <at> debbugs.gnu.org; Tue, 19 May 2020 18:25:32 -0400
Received: from relay12.mail.gandi.net ([217.70.178.232]:35503)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jbAfx-0003rG-1S
 for 40919 <at> debbugs.gnu.org; Tue, 19 May 2020 18:25:29 -0400
Received: from mail.gandi.net (m91-129-97-200.cust.tele2.ee [91.129.97.200])
 (Authenticated sender: juri@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id 97EAA200003;
 Tue, 19 May 2020 22:25:21 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
Organization: LINKOV.NET
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
 <87zhau5bfw.fsf@HIDDEN>
 <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN>
 <87bln8u3xq.fsf@HIDDEN>
 <851cd382-4b2e-447a-2212-919c8a4ce908@HIDDEN>
 <87d07lykkd.fsf@HIDDEN> <83bln5rbah.fsf@HIDDEN>
 <87zhaozlvo.fsf@HIDDEN>
 <bfaf7617-098a-4473-703e-d56bf2323d71@HIDDEN>
Date: Wed, 20 May 2020 01:21:35 +0300
In-Reply-To: <bfaf7617-098a-4473-703e-d56bf2323d71@HIDDEN> (Dmitry Gutov's
 message of "Tue, 19 May 2020 04:48:51 +0300")
Message-ID: <87v9kr8t1s.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40919
Cc: Eli Zaretskii <eliz@HIDDEN>, 40919 <at> debbugs.gnu.org, tspiteri@HIDDEN
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.7 (-)

>> Another variant would be
>> to add an optional choice to the existing option that allows to restore
>> the old behavior and doesn't affect the current behavior in any way.
>
> FWIW, I'd consider that more of a documentation change.
>
> More importantly, and certainly only for Emacs 28, Juri could you remind me
> what we'll be losing by removing the case no. 2 from
> next-error-find-buffer?

It is used to handle such cases when navigating one next-error list
visits a buffer that contains another next-error list - visiting
such buffer should not switch the navigation, it should continue
the initial navigation.

But I'm not proud of the case no. 2, so you can drop it :)

Or better move it to a separate function and provide this function
as an option in next-error-find-buffer-function.

> The ability to switch to an arbitrary Grep buffer and start using it with
> 'M-x next-error'? E.g. if there are several of them. That's more of
> a backward compatibility concern, right? Or do you have scenarios in
> mind where this will really save on keystrokes?

The ability to visit an arbitrary Grep buffer and use 'next-error' in it
to switch navigation should always work as the most reliable and implicit
way to switch navigation.  This is the case no. 3 in next-error-find-buffer.

> On another note, perhaps we could add a message to next-error-select-buffer
> that would be shown if we suspect this command will not have the expected
> result for the user.

Or maybe ask the user using the minibuffer to resolve ambiguity.




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

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


Received: (at 40919) by debbugs.gnu.org; 19 May 2020 01:49:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 18 21:49:02 2020
Received: from localhost ([127.0.0.1]:48703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jarNO-0007j3-OJ
	for submit <at> debbugs.gnu.org; Mon, 18 May 2020 21:49:02 -0400
Received: from mail-wr1-f42.google.com ([209.85.221.42]:39946)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1jarNL-0007iY-VO
 for 40919 <at> debbugs.gnu.org; Mon, 18 May 2020 21:49:00 -0400
Received: by mail-wr1-f42.google.com with SMTP id e16so13979618wra.7
 for <40919 <at> debbugs.gnu.org>; Mon, 18 May 2020 18:48:59 -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=5yFFepbIcbYpeswCdRL6dzjSEssEcGIWh3IazDgMj1c=;
 b=DB+PqFahGkWFPMNjBxtHHkswkpQkIitRwHXoOqqXVYyTKvlM9BtBhimdS8Qd/kuhNe
 wSmRhuPQ/RzZu+ah/g20jaak+hEp9FP6J6rMnDN42nMxvhCYP2uFAGkpFIBt+wNHpWXR
 itZ0gPcDQDcqKmrF398lfj3GDjhGuOug2tl5uugET/NxGEGGfoNX8g8/BjKx67y5LobQ
 PDPJFIf+Pqie72Fto7D+jbwuccWnAprpyJnY1+aLfmfvAfCzbFxuXVTfxhxaWMuvM+cb
 5zql+Np7wGZF0jL85HLo4g8ww965HqDhglBZDSDvA66ul+Dg8OZBhBMkcMkZ6Nq7HszL
 5TFw==
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=5yFFepbIcbYpeswCdRL6dzjSEssEcGIWh3IazDgMj1c=;
 b=GCKU3eE5Rqqei2VjcNcr5vB5JVtQqUNFh2Jy6AXDhL8Jx/+aljQNgd6AqMqrv4HAiL
 gtHKO5Yc4VrHm7mCZYKZyfYCEQtKN5D2V7GaHNzV2YfI0cs9eB/EGBVvz8c7/XZnhCrj
 s2ZKG92tyEQPsHUjgQOKcldfRUW/AphMq3N1AzH7EY/dX1zBUNLJih3FwEWxVSUcdVdm
 0Or/ohWpvVHKNWMEfFc/6rjB+3Pa3OPZbJuAKeGSrodYbhyYlyGF9OJVXXRYVEJPzMtH
 UurzCNuV+Tsd5BBnvgEM9dQASTCdjOfERdx72+KkwFjqPBMF5S9lGY21RDTnXAEcyMDf
 WXIg==
X-Gm-Message-State: AOAM531LfwoxWVrNeFtFWZqLgvtXdZgW9ow4kJ82d0kMiAFFk+cUmPk5
 tu5EoMw7thsnij0PGjfNSh4=
X-Google-Smtp-Source: ABdhPJzEMMfknwkyYxzyd+LyB6L3wyuMPKxi//qAWtc47Xu/sQqPydpR2n2XWVi511DC5Uv2Aic3fg==
X-Received: by 2002:a5d:69c3:: with SMTP id s3mr22257572wrw.305.1589852933756; 
 Mon, 18 May 2020 18:48:53 -0700 (PDT)
Received: from [192.168.0.3] ([66.205.73.129])
 by smtp.googlemail.com with ESMTPSA id z11sm17983172wrr.32.2020.05.18.18.48.52
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 18 May 2020 18:48:53 -0700 (PDT)
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
 <87zhau5bfw.fsf@HIDDEN>
 <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN>
 <87bln8u3xq.fsf@HIDDEN>
 <851cd382-4b2e-447a-2212-919c8a4ce908@HIDDEN>
 <87d07lykkd.fsf@HIDDEN> <83bln5rbah.fsf@HIDDEN>
 <87zhaozlvo.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <bfaf7617-098a-4473-703e-d56bf2323d71@HIDDEN>
Date: Tue, 19 May 2020 04:48:51 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <87zhaozlvo.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 40919
Cc: 40919 <at> debbugs.gnu.org, tspiteri@HIDDEN
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: -0.5 (/)

On 04.05.2020 01:36, Juri Linkov wrote:
> Another variant would be
> to add an optional choice to the existing option that allows to restore
> the old behavior and doesn't affect the current behavior in any way.

FWIW, I'd consider that more of a documentation change.

More importantly, and certainly only for Emacs 28, Juri could you remind 
me what we'll be losing by removing the case no. 2 from 
next-error-find-buffer?

The ability to switch to an arbitrary Grep buffer and start using it 
with 'M-x next-error'? E.g. if there are several of them. That's more of 
a backward compatibility concern, right? Or do you have scenarios in 
mind where this will really save on keystrokes?

On another note, perhaps we could add a message to 
next-error-select-buffer that would be shown if we suspect this command 
will not have the expected result for the user.




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

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


Received: (at 40919) by debbugs.gnu.org; 3 May 2020 22:38:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 03 18:38:32 2020
Received: from localhost ([127.0.0.1]:58353 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jVNFo-0004BB-2I
	for submit <at> debbugs.gnu.org; Sun, 03 May 2020 18:38:32 -0400
Received: from relay10.mail.gandi.net ([217.70.178.230]:58575)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jVNFm-0004Ax-1w
 for 40919 <at> debbugs.gnu.org; Sun, 03 May 2020 18:38:30 -0400
Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11])
 (Authenticated sender: juri@HIDDEN)
 by relay10.mail.gandi.net (Postfix) with ESMTPSA id 1F9C3240003;
 Sun,  3 May 2020 22:38:22 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
Organization: LINKOV.NET
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
 <87zhau5bfw.fsf@HIDDEN>
 <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN>
 <87bln8u3xq.fsf@HIDDEN>
 <851cd382-4b2e-447a-2212-919c8a4ce908@HIDDEN>
 <87d07lykkd.fsf@HIDDEN> <83bln5rbah.fsf@HIDDEN>
Date: Mon, 04 May 2020 01:36:43 +0300
In-Reply-To: <83bln5rbah.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 03 May
 2020 05:40:22 +0300")
Message-ID: <87zhaozlvo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40919
Cc: 40919 <at> debbugs.gnu.org, tspiteri@HIDDEN
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.7 (-)

>> It seems there is no right answer suitable for all users.  So I propose
>> to add more options.
>>
>> Eli, do you agree with adding more options to `next-error-find-buffer-function'
>> in emacs-27?
>>
>> Currently it has one option that defines one of possible behaviors existed
>> in older versions.  Now we need to add other option for compatibility
>> with pre-27 versions.
>>
>> Then users of emacs-27 could decide whether they want to keep
>> the old behavior or use the new.
>
> I think the time for adding new options to Emacs 27 has come and gone
> long ago.  We should defer that to future releases.

To do nothing in emacs-27 is one variant, indeed.  Another variant would be
to add an optional choice to the existing option that allows to restore
the old behavior and doesn't affect the current behavior in any way.
A third variant is to explain in the documentation what defadvice
the users could add to their init files to restore the old behavior.




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

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


Received: (at 40919) by debbugs.gnu.org; 3 May 2020 02:40:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 02 22:40:38 2020
Received: from localhost ([127.0.0.1]:54401 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jV4YY-0004tC-6D
	for submit <at> debbugs.gnu.org; Sat, 02 May 2020 22:40:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44532)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jV4YW-0004sz-Ld
 for 40919 <at> debbugs.gnu.org; Sat, 02 May 2020 22:40:37 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44099)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jV4YP-0001eD-W5; Sat, 02 May 2020 22:40:30 -0400
Received: from [176.228.60.248] (port=1617 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 1jV4YP-0008RV-Eg; Sat, 02 May 2020 22:40:29 -0400
Date: Sun, 03 May 2020 05:40:22 +0300
Message-Id: <83bln5rbah.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87d07lykkd.fsf@HIDDEN> (message from Juri Linkov on
 Sun, 03 May 2020 02:38:10 +0300)
Subject: Re: bug#40919: 27.0.91;
 next-error-select-buffer does not always behave as documented
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
 <87zhau5bfw.fsf@HIDDEN>
 <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN>
 <87bln8u3xq.fsf@HIDDEN>
 <851cd382-4b2e-447a-2212-919c8a4ce908@HIDDEN>
 <87d07lykkd.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40919
Cc: 40919 <at> debbugs.gnu.org, tspiteri@HIDDEN
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: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Date: Sun, 03 May 2020 02:38:10 +0300
> Cc: 40919 <at> debbugs.gnu.org
> 
> It seems there is no right answer suitable for all users.  So I propose
> to add more options.
> 
> Eli, do you agree with adding more options to `next-error-find-buffer-function'
> in emacs-27?
> 
> Currently it has one option that defines one of possible behaviors existed
> in older versions.  Now we need to add other option for compatibility
> with pre-27 versions.
> 
> Then users of emacs-27 could decide whether they want to keep
> the old behavior or use the new.

I think the time for adding new options to Emacs 27 has come and gone
long ago.  We should defer that to future releases.




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

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


Received: (at 40919) by debbugs.gnu.org; 2 May 2020 23:40:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 02 19:40:18 2020
Received: from localhost ([127.0.0.1]:54156 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jV1k1-0002JV-Cq
	for submit <at> debbugs.gnu.org; Sat, 02 May 2020 19:40:18 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:43289)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jV1jz-0002JE-IE
 for 40919 <at> debbugs.gnu.org; Sat, 02 May 2020 19:40:16 -0400
X-Originating-IP: 91.129.106.11
Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11])
 (Authenticated sender: juri@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id EDF7F1C0002;
 Sat,  2 May 2020 23:40:07 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Trevor Spiteri <tspiteri@HIDDEN>
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
Organization: LINKOV.NET
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
 <87zhau5bfw.fsf@HIDDEN>
 <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN>
 <87bln8u3xq.fsf@HIDDEN>
 <851cd382-4b2e-447a-2212-919c8a4ce908@HIDDEN>
Date: Sun, 03 May 2020 02:38:10 +0300
In-Reply-To: <851cd382-4b2e-447a-2212-919c8a4ce908@HIDDEN> (Trevor Spiteri's
 message of "Fri, 1 May 2020 01:18:49 +0200")
Message-ID: <87d07lykkd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40919
Cc: 40919 <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.7 (-)

>> But I'm still not sure if this is a preferable behavior for most users.
>> Maybe this needs a user option?
>
> I thought that the change was unintentional. If it's intentional that's
> another thing. If no one else complains then maybe most users prefer the
> new behavior. I've already added advice to compilation-start so it's not
> hard for me that I prefer the old behavior.

I think the problem occurs only because compilation/grep pop up their
output buffer in another window - this creates ambiguity whether to use
navigation from the current buffer or from another (new) buffer.

It seems there is no right answer suitable for all users.  So I propose
to add more options.

Eli, do you agree with adding more options to `next-error-find-buffer-function'
in emacs-27?

Currently it has one option that defines one of possible behaviors existed
in older versions.  Now we need to add other option for compatibility
with pre-27 versions.

Then users of emacs-27 could decide whether they want to keep
the old behavior or use the new.

I'm not sure about the default value: should it default to pre-27 behavior.




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

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


Received: (at 40919) by debbugs.gnu.org; 30 Apr 2020 23:19:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 30 19:18:59 2020
Received: from localhost ([127.0.0.1]:47909 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jUISJ-0008F0-N0
	for submit <at> debbugs.gnu.org; Thu, 30 Apr 2020 19:18:59 -0400
Received: from mail-wm1-f49.google.com ([209.85.128.49]:55312)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tspiteri@HIDDEN>) id 1jUISH-0008Ej-JL
 for 40919 <at> debbugs.gnu.org; Thu, 30 Apr 2020 19:18:58 -0400
Received: by mail-wm1-f49.google.com with SMTP id e26so4093539wmk.5
 for <40919 <at> debbugs.gnu.org>; Thu, 30 Apr 2020 16:18:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google;
 h=to:cc:references:from:autocrypt:subject:message-id:date:user-agent
 :mime-version:in-reply-to:content-transfer-encoding:content-language;
 bh=kcMgoRjd5H/smHp8gs4dSYGiPxAyAZHRh3jadAbwh2A=;
 b=VeP1isBQHk692wapsIqzoSobej7qV3jxqAcsrgSGvvypv5mgaEEOOfoZ5XoCG7HQjA
 0v+nL4acyiltsJQpAtvp1pTRYl2BBu8N2V549dHiiRkSiGCqg65SRwBnA74GMu3Zh/AB
 8vdk8pu7s70MfAyM4TylWw1SUndA99PeJiYno=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:to:cc:references:from:autocrypt:subject
 :message-id:date:user-agent:mime-version:in-reply-to
 :content-transfer-encoding:content-language;
 bh=kcMgoRjd5H/smHp8gs4dSYGiPxAyAZHRh3jadAbwh2A=;
 b=MXUhkm14FK3ey1gT8DfuaPOqh/cmZfJ3MwITmQgbAxkJ7mVHLG0+aqkR104Pe2cp0q
 ZZ1xuWD87pOPByd6zXSB7US8Qoec3MDh2gSATovsu9eel/Jft3Od45L3EpTjeI3rNiTc
 QV6vY9JfesgrdY0jrRIUU6MDG4zoI5+qaSYsdb/LAkeLa8E2tootYUkqL6cEWx+5AOis
 IAUehyFdLNcxODedUV/Y9ZiROS/Re9a/CjkAEiX4lU4NirU2a7FOAv+Y4jdPOAikEzOj
 x0hivwMM4oNuxwLysmpRFI2K6LcDT/v5U0gvo5M11OuKbmHz7WKzU5GGPp4765TuEw7a
 oHIA==
X-Gm-Message-State: AGi0PuaqYzw2IRhz9sS8T5ZNJlXqJfzHt+RO/Tc+9+tWJ0YkBkRzf8ac
 rmN/tZJHtO/xQQCYkOskWh5F6RQixdY=
X-Google-Smtp-Source: APiQypJzQAdaF/7qPDmWNkR15oDnuR0f89MYbImes37sXaNZnqsGQmr9MIviLJekXrsHwLPU9+Q71A==
X-Received: by 2002:a05:600c:24cf:: with SMTP id
 15mr954913wmu.94.1588288731210; 
 Thu, 30 Apr 2020 16:18:51 -0700 (PDT)
Received: from [192.168.1.104] ([85.232.212.161])
 by smtp.gmail.com with ESMTPSA id a9sm1459789wmm.38.2020.04.30.16.18.49
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 30 Apr 2020 16:18:50 -0700 (PDT)
To: Juri Linkov <juri@HIDDEN>
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
 <87zhau5bfw.fsf@HIDDEN>
 <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN>
 <87bln8u3xq.fsf@HIDDEN>
From: Trevor Spiteri <tspiteri@HIDDEN>
Autocrypt: addr=tspiteri@HIDDEN; prefer-encrypt=mutual; keydata=
 mQINBFcxvj8BEADgjJ0VPjUDQHNOO8+zw4txojpVRUbw3q4o3EaxHBSn3Nzl8qtp+OOzDe6n
 M4YQK6/ocBSJc+w3rFQzjmHxcCaJW8XJTaV27ot9r/wS6ucz34xFM6PJp2iIVT5SI5h1htIv
 ywJ9JlC+BiVN8X3QAvBJeQEGx48HNv+oYR/6mLvh/3cuyABBcmmsMBmG6ACpLJ6COhOXkl4r
 XB+gmVvt72HWy+zYyF/m1aMxQFakrAVWP3uslReCPR66bKiS9Hm77IyGGE5LOhccda0nFy5I
 kHqibst646jTQAu1EcpQZrnRXq7JOEOToM3Aj8GRI+T9+rKr1rf2RA7zdm0D9reUV+iPOEaI
 jFa4XT43BddM8mlV5pSQft2qoB3cTNHo1uJz8cQWTlmwcJiUEPVi5+5EtuDz/ovxSRIepNl4
 zEHO5NNIqt2AZNLr+49UwWSmNi5NVfDxjXswCmFfUBFev14nxVz7jaPWUtD+htzkIUAoidlM
 a7tkeboP6j1UonX/ELwRTnWctpich8GCVaV+AaTViNpiJFw/wR3jN3rjE2AN5dgSgLEroInS
 M+U3a21c0pGarETx/JlpteZjWxvMMtdDr0MeLqVvSMxErvBB+0JhqkK9uAoAj8hCe6mweDao
 qIyUwPewbDD9Gcgxzd2ljbPcw1kOP8hFEjn+WWOcYY+rVu6+jQARAQABtCJUcmV2b3IgU3Bp
 dGVyaSA8dHNwaXRlcmlAaWVlZS5vcmc+iQJXBBMBCABBAhsjBQsJCAcCBhUICQoLAgQWAgMB
 Ah4BAheAAhkBFiEEG4iXMFy2k8rbrA4H9yiscA+IZu4FAlzwZ/UFCQ8kqzYACgkQ9yiscA+I
 Zu4u8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B1FfvB1fgKcquR6g73NNiFXc1rQAzTR0asNhUpWMpUJ+s2YkIGz+Qqdn xQ==
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
Message-ID: <851cd382-4b2e-447a-2212-919c8a4ce908@HIDDEN>
Date: Fri, 1 May 2020 01:18:49 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <87bln8u3xq.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Language: en-US
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40919
Cc: 40919 <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 think this would work for next-error-select-buffer. Then to fix the
>> other issue about new compilations, compilation-start can be modified =
to
>> use next-error-select-buffer. That way the change in compilation-start=

>> is morally unambiguous :)
> I'm not sure if this is morally right, because users might want to
> continue to navigate an old next-error buffer, even after creating
> a new next-error buffer.
>
> OTOH, by using next-error-select-buffer they explicitly say that
> they want to switch to the new navigation.  Do you think it's right
> to implicitly assume the user's intention?
>
> We should base the decision not on precedence set by older versions,
> but on expectations of most users.
>
>> diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
>> index 455f181f50..41e77007c6 100644
>> --- a/lisp/progmodes/compile.el
>> +++ b/lisp/progmodes/compile.el
>> @@ -1910,7 +1910,7 @@ compilation-start
>>      (goto-char (point-max))))
>> =20
>>      ;; Make it so the next C-x ` will use this buffer.
>> -    (setq next-error-last-buffer outbuf)))
>> +    (next-error-select-buffer outbuf)))
>> =20
>>  (defun compilation-set-window-height (window)
>>    "Set the height of WINDOW according to `compilation-window-height'.=
"
> There are more places that set next-error-last-buffer: vc-git-grep, occ=
ur-1,
> xref.el...
>
> But I'm still not sure if this is a preferable behavior for most users.=

> Maybe this needs a user option?

I thought that the change was unintentional. If it's intentional that's
another thing. If no one else complains then maybe most users prefer the
new behavior. I've already added advice to compilation-start so it's not
hard for me that I prefer the old behavior.






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

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


Received: (at 40919) by debbugs.gnu.org; 30 Apr 2020 20:24:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 30 16:24:45 2020
Received: from localhost ([127.0.0.1]:47777 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jUFjh-0003rC-1B
	for submit <at> debbugs.gnu.org; Thu, 30 Apr 2020 16:24:45 -0400
Received: from relay12.mail.gandi.net ([217.70.178.232]:35781)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jUFje-0003qv-HA
 for 40919 <at> debbugs.gnu.org; Thu, 30 Apr 2020 16:24:43 -0400
Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11])
 (Authenticated sender: juri@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id DB2F1200007;
 Thu, 30 Apr 2020 20:24:34 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Trevor Spiteri <tspiteri@HIDDEN>
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
Organization: LINKOV.NET
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
 <87zhau5bfw.fsf@HIDDEN>
 <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN>
Date: Thu, 30 Apr 2020 23:14:09 +0300
In-Reply-To: <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN> (Trevor Spiteri's
 message of "Thu, 30 Apr 2020 00:40:35 +0200")
Message-ID: <87bln8u3xq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40919
Cc: 40919 <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.7 (-)

>> @@ -379,7 +379,8 @@ next-error-select-buffer
>>     (list (get-buffer
>>            (read-buffer "Select next-error buffer: " nil nil
>>                         (lambda (b) (next-error-buffer-p (cdr b)))))))
>> -  (setq next-error-last-buffer buffer))
>> +  (setq next-error-last-buffer buffer)
>> +  (setq next-error-buffer buffer))
>>  
>>  (defalias 'goto-next-locus 'next-error)
>>  (defalias 'next-match 'next-error)
>>
> I think this would work for next-error-select-buffer. Then to fix the
> other issue about new compilations, compilation-start can be modified to
> use next-error-select-buffer. That way the change in compilation-start
> is morally unambiguous :)

I'm not sure if this is morally right, because users might want to
continue to navigate an old next-error buffer, even after creating
a new next-error buffer.

OTOH, by using next-error-select-buffer they explicitly say that
they want to switch to the new navigation.  Do you think it's right
to implicitly assume the user's intention?

We should base the decision not on precedence set by older versions,
but on expectations of most users.

> diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
> index 455f181f50..41e77007c6 100644
> --- a/lisp/progmodes/compile.el
> +++ b/lisp/progmodes/compile.el
> @@ -1910,7 +1910,7 @@ compilation-start
>      (goto-char (point-max))))
>  
>      ;; Make it so the next C-x ` will use this buffer.
> -    (setq next-error-last-buffer outbuf)))
> +    (next-error-select-buffer outbuf)))
>  
>  (defun compilation-set-window-height (window)
>    "Set the height of WINDOW according to `compilation-window-height'."

There are more places that set next-error-last-buffer: vc-git-grep, occur-1,
xref.el...

But I'm still not sure if this is a preferable behavior for most users.
Maybe this needs a user option?




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

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


Received: (at 40919) by debbugs.gnu.org; 29 Apr 2020 22:40:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 29 18:40:46 2020
Received: from localhost ([127.0.0.1]:44848 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTvNl-00017D-Nl
	for submit <at> debbugs.gnu.org; Wed, 29 Apr 2020 18:40:46 -0400
Received: from mail-wr1-f41.google.com ([209.85.221.41]:33422)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tspiteri@HIDDEN>) id 1jTvNj-00016z-MB
 for 40919 <at> debbugs.gnu.org; Wed, 29 Apr 2020 18:40:44 -0400
Received: by mail-wr1-f41.google.com with SMTP id s10so4546519wrr.0
 for <40919 <at> debbugs.gnu.org>; Wed, 29 Apr 2020 15:40:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google;
 h=subject:to:cc:references:from:autocrypt:message-id:date:user-agent
 :mime-version:in-reply-to:content-transfer-encoding:content-language;
 bh=Eq5vBIhLhYFFeV3qdCgqe8ne2Wmh9uEX9UqiSdAh/9c=;
 b=Q35ATVAJq5qGke+rk799L1Qr4nJPwkfjZ60kuUn4TQ4dLTpHDvLP4bKGRV4QloTb56
 iviR6BtSRG3vQn9ah5hedp4I0L9mBc933b11fWeYqB/wavpzoPSdeAPBF7VGQw3yVLOT
 L6V/MqXRY2N00pHlpmVO66KxsBV4q6tX/1hv0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:cc:references:from:autocrypt
 :message-id:date:user-agent:mime-version:in-reply-to
 :content-transfer-encoding:content-language;
 bh=Eq5vBIhLhYFFeV3qdCgqe8ne2Wmh9uEX9UqiSdAh/9c=;
 b=U3cCCQ/ynhOR8UhSlYf7+WU4sMvQyClnk2iEjz54VXNyQn/p7Bx1hCdr881PYLxo2/
 Nv2Q/G18eeaziRGoO1zOFRRmzx/KqM7K5RJlUy3WQqUY+1bH6Z6DwH/oB0ZD59YLLiBk
 695jquRS5v36HUYgoBi2IL1wYMA5P4G6MRTcyPU8DvCTubT94xOgo9OgdgQlODwaPnn1
 ubZe7J5dlLL+VsMaHsIUfQ4P1OFCPzdzzzeDfA8eeiHdxWB8Qozjfhxv3BtkHtZD9dcm
 EVZVOfGuq2W8nnmSvOQpx07LCXLjqlQ8PnoDwYKK8SC1MpeiACGJr7usZ2V1ivaJZL/K
 NjEw==
X-Gm-Message-State: AGi0PuZlA7vnamZcqKRLe3utHGJe4jGD1gyFz7UIC17v4/F6lUq03njE
 nln40oOdagVnJ0n5hYPytd6nUhanDAA=
X-Google-Smtp-Source: APiQypLWWcoWfDaq9riMKjX4oKP5z/XPQB9rONgj9jFDHWmlDVDoiMD60VHnFXUlguo4kUx2sGnhPw==
X-Received: by 2002:adf:e711:: with SMTP id c17mr216908wrm.334.1588200037383; 
 Wed, 29 Apr 2020 15:40:37 -0700 (PDT)
Received: from [192.168.1.104] ([85.232.212.161])
 by smtp.gmail.com with ESMTPSA id g25sm9548194wmh.24.2020.04.29.15.40.36
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 29 Apr 2020 15:40:36 -0700 (PDT)
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
To: Juri Linkov <juri@HIDDEN>
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
 <87zhau5bfw.fsf@HIDDEN>
From: Trevor Spiteri <tspiteri@HIDDEN>
Autocrypt: addr=tspiteri@HIDDEN; prefer-encrypt=mutual; keydata=
 mQINBFcxvj8BEADgjJ0VPjUDQHNOO8+zw4txojpVRUbw3q4o3EaxHBSn3Nzl8qtp+OOzDe6n
 M4YQK6/ocBSJc+w3rFQzjmHxcCaJW8XJTaV27ot9r/wS6ucz34xFM6PJp2iIVT5SI5h1htIv
 ywJ9JlC+BiVN8X3QAvBJeQEGx48HNv+oYR/6mLvh/3cuyABBcmmsMBmG6ACpLJ6COhOXkl4r
 XB+gmVvt72HWy+zYyF/m1aMxQFakrAVWP3uslReCPR66bKiS9Hm77IyGGE5LOhccda0nFy5I
 kHqibst646j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q9vX7cCrk7Bg6ZIP0EqL/qRsfSabFemz8XV22skaPB/O6E9WGh+6geo5krNb
 eUvzeqIh6A6RMStiJYjEKwePAx+1xUgzi5PiK7y8MYRaQQly7cJEveLYsCh4GFf7hXDCGdxP
 Nt1hV3KeEipS2p2VdwTBHydmiUYdb1jURv5zeorUo8313R0zh4GJGPp+Gync1C2Y0vWTeCOY
 lpgcWfM8wXA6DVWC/49yQZCL+ryNOEbHqdTGzXc/F2EdcOVOvFG6jhg8aM8tYY9Iqj9D0P8i
 IAII64/OG+PQRwCZez6Z+riJzfJIfeXHw06BHI9COdSu7EyzKLZdacXsPLjZ+X/+IciGyFLq
 EmcZxoWWcDWr0kZ4JharhOLyewVbGcb/sqH8rWx666KSfNSEKRgcRxOGHYeVVspWl2EDDBBE
 vyy8W1tCsT5wxDb3yY72i5ESvLHmU4kgKZntizEPUvLqY7qESALO5+iZneXIwgRriAP1vNe5
 dlV5KfR0BVdH60RxWCIZ8RIgrrrfPkn8ne122dkgfYdjqB516hG8EiNl48MlsgcV/r9VTqNR
 ocbCobKMDCU4ge53B1FfvB1fgKcquR6g73NNiFXc1rQAzTR0asNhUpWMpUJ+s2YkIGz+Qqdn xQ==
Message-ID: <66f63b16-307a-919c-1d25-60ff63f92ae6@HIDDEN>
Date: Thu, 30 Apr 2020 00:40:35 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <87zhau5bfw.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40919
Cc: 40919 <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 (-)

On 29/04/2020 22:38, Juri Linkov wrote:
>> I think the error is in the implementation.
> Then I see no way other than for next-error-select-buffer to say:
> "the current buffer was visited from next-error-last-buffer".
> Yes, this is a lie, but a white lie with good intentions, so
> next-error-find-buffer will trust this misinformation and leave
> the buffer alone.  Is this patch morally acceptable?
>
> diff --git a/lisp/simple.el b/lisp/simple.el
> index b5ba05426f..b5f148b7d5 100644
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -379,7 +379,8 @@ next-error-select-buffer
>     (list (get-buffer
>            (read-buffer "Select next-error buffer: " nil nil
>                         (lambda (b) (next-error-buffer-p (cdr b)))))))
> -  (setq next-error-last-buffer buffer))
> +  (setq next-error-last-buffer buffer)
> +  (setq next-error-buffer buffer))
>  
>  (defalias 'goto-next-locus 'next-error)
>  (defalias 'next-match 'next-error)
>
I think this would work for next-error-select-buffer. Then to fix the
other issue about new compilations, compilation-start can be modified to
use next-error-select-buffer. That way the change in compilation-start
is morally unambiguous :)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 455f181f50..41e77007c6 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1910,7 +1910,7 @@ compilation-start
     (goto-char (point-max))))
 
     ;; Make it so the next C-x ` will use this buffer.
-    (setq next-error-last-buffer outbuf)))
+    (next-error-select-buffer outbuf)))
 
 (defun compilation-set-window-height (window)
   "Set the height of WINDOW according to `compilation-window-height'."





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

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


Received: (at 40919) by debbugs.gnu.org; 29 Apr 2020 20:59:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 29 16:59:21 2020
Received: from localhost ([127.0.0.1]:44792 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTtnc-00073F-W2
	for submit <at> debbugs.gnu.org; Wed, 29 Apr 2020 16:59:21 -0400
Received: from relay11.mail.gandi.net ([217.70.178.231]:57941)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jTtnb-000730-Gc
 for 40919 <at> debbugs.gnu.org; Wed, 29 Apr 2020 16:59:20 -0400
Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11])
 (Authenticated sender: juri@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPSA id 08B28100004;
 Wed, 29 Apr 2020 20:59:11 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Trevor Spiteri <tspiteri@HIDDEN>
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
Organization: LINKOV.NET
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
 <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
Date: Wed, 29 Apr 2020 23:38:59 +0300
In-Reply-To: <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN> (Trevor Spiteri's
 message of "Wed, 29 Apr 2020 02:13:22 +0200")
Message-ID: <87zhau5bfw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40919
Cc: 40919 <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.7 (-)

> I think the error is in the implementation.

Then I see no way other than for next-error-select-buffer to say:
"the current buffer was visited from next-error-last-buffer".
Yes, this is a lie, but a white lie with good intentions, so
next-error-find-buffer will trust this misinformation and leave
the buffer alone.  Is this patch morally acceptable?

diff --git a/lisp/simple.el b/lisp/simple.el
index b5ba05426f..b5f148b7d5 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -379,7 +379,8 @@ next-error-select-buffer
    (list (get-buffer
           (read-buffer "Select next-error buffer: " nil nil
                        (lambda (b) (next-error-buffer-p (cdr b)))))))
-  (setq next-error-last-buffer buffer))
+  (setq next-error-last-buffer buffer)
+  (setq next-error-buffer buffer))
 
 (defalias 'goto-next-locus 'next-error)
 (defalias 'next-match 'next-error)





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

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


Received: (at 40919) by debbugs.gnu.org; 29 Apr 2020 00:13:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 28 20:13:33 2020
Received: from localhost ([127.0.0.1]:41947 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTaM0-00010r-O6
	for submit <at> debbugs.gnu.org; Tue, 28 Apr 2020 20:13:33 -0400
Received: from mail-wr1-f52.google.com ([209.85.221.52]:34606)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tspiteri@HIDDEN>) id 1jTaLy-00010f-MO
 for 40919 <at> debbugs.gnu.org; Tue, 28 Apr 2020 20:13:31 -0400
Received: by mail-wr1-f52.google.com with SMTP id j1so439273wrt.1
 for <40919 <at> debbugs.gnu.org>; Tue, 28 Apr 2020 17:13:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google;
 h=to:cc:references:from:autocrypt:subject:message-id:date:user-agent
 :mime-version:in-reply-to:content-transfer-encoding:content-language;
 bh=2fxCjzE2urFjMNNh8giXqJF3eUpKSTeoaUvcUTtuL6E=;
 b=biQ+ZOB3+51uD23aRQlghHV4w3QuAl82ZKLwubT84kGapOVcO6GZQwmLkE6B5l4Krk
 Ok+fN8UciVrebJrT9vhaJZhfOis7mczUzDup/0o8d/1MZ8clmE5OC1pVd9CDyiOEBVRq
 ExAaumJVOyfbV1DCGtgMTZsDhHt8axKpTEJhc=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:to:cc:references:from:autocrypt:subject
 :message-id:date:user-agent:mime-version:in-reply-to
 :content-transfer-encoding:content-language;
 bh=2fxCjzE2urFjMNNh8giXqJF3eUpKSTeoaUvcUTtuL6E=;
 b=TCwCLZNCubvYldDwquXgXzM41EkIy1mCaW0XDddsIJsJatt6aeJXQIbw1wXI7kQgAE
 ykA4fJZrMjIUg/YM7tEEaTxTq8CFXpq3My+1lfbntshms2EDwUq1cZHVjAJDODa5Kgl9
 CUeW2Dim8DyDQ7u/yW3msrqk5mYEqJpjJ1ATVhPc3gfsgoVbB/7qb28GOb6rEAK+xb/2
 Au9EuweCmJ7BW0XFHlltU8tfAeqZWSD/BAI/dQLQYxbWTx1C9U5ipl2bwVVoIIHPEHWj
 9635ZbGxT+i7iIPwXBv9q0Tw3L7xoPpOqAfPrL747YfFd9x1nFgS+FaIPTdilXsSJxlr
 AKhQ==
X-Gm-Message-State: AGi0PuYDwVB6Uoj1eEHY5m86CFMxcVZXvaBenFRWwpWk5OHDfqxpc5rc
 LpnN/6JdoXvUlv9hTlZlfzYB9Z/sHQc7ww==
X-Google-Smtp-Source: APiQypIpwTQ94xyCdqTxDCOYy+/jltahGjB67SL9FehB7wd9twO0qhxp9hNgq8XHZUTYOq3q0RLhUQ==
X-Received: by 2002:a5d:6887:: with SMTP id h7mr35877329wru.365.1588119204312; 
 Tue, 28 Apr 2020 17:13:24 -0700 (PDT)
Received: from [192.168.1.104] ([85.232.212.161])
 by smtp.gmail.com with ESMTPSA id p190sm5444143wmp.38.2020.04.28.17.13.23
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 28 Apr 2020 17:13:23 -0700 (PDT)
To: Juri Linkov <juri@HIDDEN>
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
 <87d07rmb6j.fsf@HIDDEN>
From: Trevor Spiteri <tspiteri@HIDDEN>
Autocrypt: addr=tspiteri@HIDDEN; prefer-encrypt=mutual; keydata=
 mQINBFcxvj8BEADgjJ0VPjUDQHNOO8+zw4txojpVRUbw3q4o3EaxHBSn3Nzl8qtp+OOzDe6n
 M4YQK6/ocBSJc+w3rFQzjmHxcCaJW8XJTaV27ot9r/wS6ucz34xFM6PJp2iIVT5SI5h1htIv
 ywJ9JlC+BiVN8X3QAvBJeQEGx48HNv+oYR/6mLvh/3cuyABBcmmsMBmG6ACpLJ6COhOXkl4r
 XB+gmVvt72H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AKCRD3KKxwD4hm7k4iD/9VGy6RHYN7HcxsF2fW9xbO91F9M57Kz9um
 C50LPItJPBCDq9vX7cCrk7Bg6ZIP0EqL/qRsfSabFemz8XV22skaPB/O6E9WGh+6geo5krNb
 eUvzeqIh6A6RMStiJYjEKwePAx+1xUgzi5PiK7y8MYRaQQly7cJEveLYsCh4GFf7hXDCGdxP
 Nt1hV3KeEipS2p2VdwTBHydmiUYdb1jURv5zeorUo8313R0zh4GJGPp+Gync1C2Y0vWTeCOY
 lpgcWfM8wXA6DVWC/49yQZCL+ryNOEbHqdTGzXc/F2EdcOVOvFG6jhg8aM8tYY9Iqj9D0P8i
 IAII64/OG+PQRwCZez6Z+riJzfJIfeXHw06BHI9COdSu7EyzKLZdacXsPLjZ+X/+IciGyFLq
 EmcZxoWWcDWr0kZ4JharhOLyewVbGcb/sqH8rWx666KSfNSEKRgcRxOGHYeVVspWl2EDDBBE
 vyy8W1tCsT5wxDb3yY72i5ESvLHmU4kgKZntizEPUvLqY7qESALO5+iZneXIwgRriAP1vNe5
 dlV5KfR0BVdH60RxWCIZ8RIgrrrfPkn8ne122dkgfYdjqB516hG8EiNl48MlsgcV/r9VTqNR
 ocbCobKMDCU4ge53B1FfvB1fgKcquR6g73NNiFXc1rQAzTR0asNhUpWMpUJ+s2YkIGz+Qqdn xQ==
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
Message-ID: <d4ee34a4-87f6-8b28-689e-d8b291df898a@HIDDEN>
Date: Wed, 29 Apr 2020 02:13:22 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <87d07rmb6j.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Language: en-US
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40919
Cc: 40919 <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 (-)

>> The next-error-select-buffer documentation states that =E2=80=9Cthe se=
lected
>> buffer becomes the source of locations for the subsequent invocation o=
f
>> =E2=80=98next-error=E2=80=99 or =E2=80=98previous-error=E2=80=99.=E2=80=
=9D However, it is not the case for the
>> following:
>>
>> 1. Go in a fresh next-error capable buffer (not *grep*).
>> 2. Grep for something.
>> 3. M-x next-error-select-buffer *grep*
>> 4. M-x next-error
>>
>> The buffer of 1 (not *grep*) is the source of locations instead of
>> the expected *grep*.
>>
>> This is because although next-error-select-buffer sets the variable
>> next-error-last-buffer, it is not used in this case: When next-error
>> calls next-error-find-buffer, next-error-buffer has no buffer-local
>> value yet, so condition 2. in next-error-find-buffer (that
>> next-error-buffer has no buffer-local value and the current buffer is =
a
>> next-error capable buffer) is true, and the function never even checks=

>> next-error-last-buffer.
> Thanks for the report.  Do you think the problem is in implementation,
> or only in documentation?  IOW, do you think its behavior is correct,
> but the documentation should be fixed to describe more clearly what
> next-error was intended to do in this situation?

I think the error is in the implementation. In fact I added a later
comment to the bug report.


> And I just realized, this is also a regression from Emacs 26 if step 3
> is skipped, as step 2 itself also sets next-error-last-buffer .

As a use case, let's say I'm in a buffer that has next-error
capabilities because of say flycheck, and I grep or compile; I want to
start going through the new errors immediately. That is why
compilation-start finishes=C2=A0 with (setq next-error-last-buffer outbuf=
)
and that's how Emacs 26 works (without step 3 as
next-error-select-buffer is new). In Emacs 27 not only does that break,
but even using the new function has no effect.






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

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


Received: (at 40919) by debbugs.gnu.org; 28 Apr 2020 23:58:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 28 19:58:08 2020
Received: from localhost ([127.0.0.1]:41902 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTa76-0000b1-DC
	for submit <at> debbugs.gnu.org; Tue, 28 Apr 2020 19:58:08 -0400
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:50513)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jTa74-0000aL-Ec
 for 40919 <at> debbugs.gnu.org; Tue, 28 Apr 2020 19:58:07 -0400
X-Originating-IP: 91.129.106.11
Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11])
 (Authenticated sender: juri@HIDDEN)
 by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 2BDAB6000B;
 Tue, 28 Apr 2020 23:57:58 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Trevor Spiteri <tspiteri@HIDDEN>
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
Organization: LINKOV.NET
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
Date: Wed, 29 Apr 2020 02:40:20 +0300
In-Reply-To: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN> (Trevor Spiteri's
 message of "Tue, 28 Apr 2020 03:51:09 +0200")
Message-ID: <87d07rmb6j.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40919
Cc: 40919 <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.7 (-)

> The next-error-select-buffer documentation states that “the selected
> buffer becomes the source of locations for the subsequent invocation of
> ‘next-error’ or ‘previous-error’.” However, it is not the case for the
> following:
>
> 1. Go in a fresh next-error capable buffer (not *grep*).
> 2. Grep for something.
> 3. M-x next-error-select-buffer *grep*
> 4. M-x next-error
>
> The buffer of 1 (not *grep*) is the source of locations instead of
> the expected *grep*.
>
> This is because although next-error-select-buffer sets the variable
> next-error-last-buffer, it is not used in this case: When next-error
> calls next-error-find-buffer, next-error-buffer has no buffer-local
> value yet, so condition 2. in next-error-find-buffer (that
> next-error-buffer has no buffer-local value and the current buffer is a
> next-error capable buffer) is true, and the function never even checks
> next-error-last-buffer.

Thanks for the report.  Do you think the problem is in implementation,
or only in documentation?  IOW, do you think its behavior is correct,
but the documentation should be fixed to describe more clearly what
next-error was intended to do in this situation?




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

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


Received: (at submit) by debbugs.gnu.org; 28 Apr 2020 11:42:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 28 07:42:07 2020
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 1jTOcp-0006TO-8H
	for submit <at> debbugs.gnu.org; Tue, 28 Apr 2020 07:42:07 -0400
Received: from lists.gnu.org ([209.51.188.17]:34569)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tspiteri@HIDDEN>) id 1jTOcn-0006TH-Vw
 for submit <at> debbugs.gnu.org; Tue, 28 Apr 2020 07:42:06 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51158)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <tspiteri@HIDDEN>) id 1jTOZO-0004rg-H4
 for bug-gnu-emacs@HIDDEN; Tue, 28 Apr 2020 07:42:05 -0400
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,
 DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,
 SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no
 version=3.4.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <tspiteri@HIDDEN>) id 1jTOYK-0002QA-DU
 for bug-gnu-emacs@HIDDEN; Tue, 28 Apr 2020 07:38:34 -0400
Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:46590)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <tspiteri@HIDDEN>) id 1jTOYJ-0002Q2-UK
 for bug-gnu-emacs@HIDDEN; Tue, 28 Apr 2020 07:37:28 -0400
Received: by mail-wr1-x432.google.com with SMTP id f13so24189020wrm.13
 for <bug-gnu-emacs@HIDDEN>; Tue, 28 Apr 2020 04:37:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google;
 h=subject:to:references:from:autocrypt:message-id:date:user-agent
 :mime-version:in-reply-to:content-transfer-encoding:content-language;
 bh=5ZIN8txhaGNsU7azsekz2v+nMlyHoK0RnhcTu/Q5jig=;
 b=SYjLt3N5CQE+NJQvpIsDLloUMKaPKjm2yQq2K/wnFbJAkZh+ecRGBQkMA99H/3yy7Q
 M8w2D2A5gAfBvW+uBfPw1vkuW/9PSuLdccyCaFGEtkcr/Ira7v6xn9iLP8Wd1+lyANOO
 vd/K3AEGdkPEhdEcpHaNaL7KbGoYcFMwYcTc0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:references:from:autocrypt:message-id
 :date:user-agent:mime-version:in-reply-to:content-transfer-encoding
 :content-language;
 bh=5ZIN8txhaGNsU7azsekz2v+nMlyHoK0RnhcTu/Q5jig=;
 b=PGq/YGoxiSmBdA5jojQeNsCdCV6OrWCjyfsIyGFgDyaQpHtLSUO1XW0+pAaFRBHUVi
 I+LWReGeqWZm/uSjvYXwY5tBY8w6I+eJapFbCgDKWngoacfy25oXUOnrJairrJjsVlWA
 zuAsO95d4eGv+QWSCDk28ACh3ESAec6hWdHpOk1R80q4rtlSp0MuEfgGKAJQDXYn0lBW
 QQeHsxRBJHatfqrVh5lPXWQcO6QvY38zMh9Kl9GLmt96bQOxDtIPd0EpRWkCxoRP5CVT
 uFn9cQSouy6S2FvHwiwudCMOVQYsYAqyvSCU0MlKAJlvsgwSDgpDiL3/y2MKP7knYPwQ
 iI5w==
X-Gm-Message-State: AGi0PuYyu5PB7rSMiwEFtaGkPIIEemXCOFwkcYqjZX3ioYsKSo8YkguI
 LmUzIIqTU1e7Kfz8rgtDA72cg25QCOv3Yw==
X-Google-Smtp-Source: APiQypLxQeD7oqrq1l1Zc14sVQXaD4j1jvNXhDBS7a9FPwz2ZuF7MY1qZcH3u7oaFvYxvoZRnGwqJQ==
X-Received: by 2002:a5d:4e02:: with SMTP id p2mr35163817wrt.302.1588073844657; 
 Tue, 28 Apr 2020 04:37:24 -0700 (PDT)
Received: from [192.168.1.104] ([85.232.212.161])
 by smtp.gmail.com with ESMTPSA id a67sm3071672wmc.30.2020.04.28.04.37.23
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 28 Apr 2020 04:37:24 -0700 (PDT)
Subject: Re: bug#40919: 27.0.91; next-error-select-buffer does not always
 behave as documented
To: bug-gnu-emacs@HIDDEN
References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
From: Trevor Spiteri <tspiteri@HIDDEN>
Autocrypt: addr=tspiteri@HIDDEN; prefer-encrypt=mutual; keydata=
 mQINBFcxvj8BEADgjJ0VPjUDQHNOO8+zw4txojpVRUbw3q4o3EaxHBSn3Nzl8qtp+OOzDe6n
 M4YQK6/ocBSJc+w3rFQzjmHxcCaJW8XJTaV27ot9r/wS6ucz34xFM6PJp2iIVT5SI5h1htIv
 ywJ9JlC+BiVN8X3QAvBJeQEGx48HNv+oYR/6mLvh/3cuyABBcmmsMBmG6ACpLJ6COhOXkl4r
 XB+gmVvt72HWy+zYyF/m1aMxQFakrAVWP3uslReCPR66bKiS9Hm77IyGGE5LOhccda0nFy5I
 kHqibst646jTQAu1EcpQZrnRXq7JOEOToM3Aj8GRI+T9+rKr1rf2RA7zdm0D9reUV+iPOEaI
 jFa4XT43BddM8mlV5pSQft2qoB3cTNHo1uJz8cQWTlmwcJiUEPVi5+5E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Ff7hXDCGdxP
 Nt1hV3KeEipS2p2VdwTBHydmiUYdb1jURv5zeorUo8313R0zh4GJGPp+Gync1C2Y0vWTeCOY
 lpgcWfM8wXA6DVWC/49yQZCL+ryNOEbHqdTGzXc/F2EdcOVOvFG6jhg8aM8tYY9Iqj9D0P8i
 IAII64/OG+PQRwCZez6Z+riJzfJIfeXHw06BHI9COdSu7EyzKLZdacXsPLjZ+X/+IciGyFLq
 EmcZxoWWcDWr0kZ4JharhOLyewVbGcb/sqH8rWx666KSfNSEKRgcRxOGHYeVVspWl2EDDBBE
 vyy8W1tCsT5wxDb3yY72i5ESvLHmU4kgKZntizEPUvLqY7qESALO5+iZneXIwgRriAP1vNe5
 dlV5KfR0BVdH60RxWCIZ8RIgrrrfPkn8ne122dkgfYdjqB516hG8EiNl48MlsgcV/r9VTqNR
 ocbCobKMDCU4ge53B1FfvB1fgKcquR6g73NNiFXc1rQAzTR0asNhUpWMpUJ+s2YkIGz+Qqdn xQ==
Message-ID: <c26da5d3-bc9b-9a78-44e6-5e89319326ac@HIDDEN>
Date: Tue, 28 Apr 2020 13:37:23 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Content-Language: en-US
Received-SPF: pass client-ip=2a00:1450:4864:20::432;
 envelope-from=tspiteri@HIDDEN; helo=mail-wr1-x432.google.com
X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT :
 Malformed IPv6 address (bad octet value).
 Location : parse_addr6(), p0f-client.c:67
X-Received-From: 2a00:1450:4864:20::432
X-Spam-Score: -1.3 (-)
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: -2.3 (--)

On 28/04/2020 03:51, Trevor Spiteri wrote:
> 1. Go in a fresh next-error capable buffer (not *grep*).
> 2. Grep for something.
> 3. M-x next-error-select-buffer *grep*
> 4. M-x next-error

And I just realized, this is also a regression from Emacs 26 if step 3
is skipped, as step 2 itself also sets next-error-last-buffer .





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

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


Received: (at submit) by debbugs.gnu.org; 28 Apr 2020 01:51:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 27 21:51:22 2020
Received: from localhost ([127.0.0.1]:38456 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTFP8-0003kM-Kk
	for submit <at> debbugs.gnu.org; Mon, 27 Apr 2020 21:51:22 -0400
Received: from lists.gnu.org ([209.51.188.17]:45472)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tspiteri@HIDDEN>) id 1jTFP6-0003kC-IV
 for submit <at> debbugs.gnu.org; Mon, 27 Apr 2020 21:51:20 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36620)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <tspiteri@HIDDEN>) id 1jTFP5-0000Gp-0D
 for bug-gnu-emacs@HIDDEN; Mon, 27 Apr 2020 21:51:20 -0400
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,
 DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,
 SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no
 version=3.4.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <tspiteri@HIDDEN>) id 1jTFP3-00051c-BZ
 for bug-gnu-emacs@HIDDEN; Mon, 27 Apr 2020 21:51:18 -0400
Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:39918)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <tspiteri@HIDDEN>) id 1jTFP2-00050i-GQ
 for bug-gnu-emacs@HIDDEN; Mon, 27 Apr 2020 21:51:17 -0400
Received: by mail-wm1-x32c.google.com with SMTP id y24so1018907wma.4
 for <bug-gnu-emacs@HIDDEN>; Mon, 27 Apr 2020 18:51:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google;
 h=to:subject:from:autocrypt:message-id:date:user-agent:mime-version
 :content-transfer-encoding:content-language;
 bh=5ZNjtThBuquH7YEhalrFFqdcipVcK/MKDCEPgaStrtg=;
 b=FQmPKg5gvaPd+PftSrIlvI73intBNNqPb67wszPmgrUX+phT3ixbvjs7Dagi5MDoZw
 Pb22t1FscXNAklkKGgmfXfJWz17CdeqLN6LwKtoZ+habU3iqrUnz3yEp0wj1zLHHH9l4
 HTkfgN6oojNXAoyvYR7rc0tA20tVuqb0JCxRk=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:to:subject:from:autocrypt:message-id:date
 :user-agent:mime-version:content-transfer-encoding:content-language;
 bh=5ZNjtThBuquH7YEhalrFFqdcipVcK/MKDCEPgaStrtg=;
 b=WSYyPiOLibBkSKcl12Utc/2Xz1AZ1ZJf/eODWwnEhcLC03+GxDw9DlUY0Dc45UGHGY
 0UOXecBycUNnWdqsRIW23dg+6U8WuUiRkHFNzE1tFmEv8VR4VyQmICO96iHfF9Zl/j2V
 Zo8PO21IkzkuZ7mTzbRTCoZ4ZlHxPR5wIDOM051Io+2hOC7yN0U3nl9OXu9NkloWJ4MY
 0NUAYYgMtwE7KuG1LNn1wUfw7DJb1AFoVUw5vq8cKZ240eU71iO01cykVU4pm8GDkSES
 irvTcDLMxmNOjH/2xJhbRTqWsSa1rMQDFVPLd7V7uzsNFyjG76Ze6xP5gwiR6AdQ4s4E
 0JXA==
X-Gm-Message-State: AGi0PuZLprlsGSkkRTlZjKvFMgujuDbaaXVHVD+vOg1M22JVvNY1JdwZ
 nL01H5tpZfY5dFBU/ehhsvOOY9Zciskgjw==
X-Google-Smtp-Source: APiQypInSda6yIMzmrGtKQp3h0Sj83PnNa4OTqj111bDGkBoI4Z2b+Rg0CX96BSihA29F/e419Sq9g==
X-Received: by 2002:a05:600c:2a52:: with SMTP id
 x18mr1646378wme.37.1588038672373; 
 Mon, 27 Apr 2020 18:51:12 -0700 (PDT)
Received: from [192.168.1.104] ([85.232.212.161])
 by smtp.gmail.com with ESMTPSA id v16sm1246197wml.30.2020.04.27.18.51.10
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 27 Apr 2020 18:51:11 -0700 (PDT)
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.91; next-error-select-buffer does not always behave as documented
From: Trevor Spiteri <tspiteri@HIDDEN>
Autocrypt: addr=tspiteri@HIDDEN; prefer-encr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6a8yUF1Gwfar
 Wsm0QnmZKXqy6AzNToV52kVuII6yMG9DBLq6SRgzQmFpXzxaaEdPZqzvJlZ/AX9GFNx2illA
 bCmwhLcAenVmMpO5KYRdD1aC80VyMPYLxFO896gUaYuphZkqjCkTReexFQPTxXZFoNL8rrMp
 /WUFh6XR/QJPuAD1OZWbABEBAAGJAjwEGAEIACYCGwwWIQQbiJcwXLaTytusDgf3KKxwD4hm
 7gUCXPBn9gUJDySrNwAKCRD3KKxwD4hm7k4iD/9VGy6RHYN7HcxsF2fW9xbO91F9M57Kz9um
 C50LPItJPBCDq9vX7cCrk7Bg6ZIP0EqL/qRsfSabFemz8XV22skaPB/O6E9WGh+6geo5krNb
 eUvzeqIh6A6RMStiJYjEKwePAx+1xUgzi5PiK7y8MYRaQQly7cJEveLYsCh4GFf7hXDCGdxP
 Nt1hV3KeEipS2p2VdwTBHydmiUYdb1jURv5zeorUo8313R0zh4GJGPp+Gync1C2Y0vWTeCOY
 lpgcWfM8wXA6DVWC/49yQZCL+ryNOEbHqdTGzXc/F2EdcOVOvFG6jhg8aM8tYY9Iqj9D0P8i
 IAII64/OG+PQRwCZez6Z+riJzfJIfeXHw06BHI9COdSu7EyzKLZdacXsPLjZ+X/+IciGyFLq
 EmcZxoWWcDWr0kZ4JharhOLyewVbGcb/sqH8rWx666KSfNSEKRgcRxOGHYeVVspWl2EDDBBE
 vyy8W1tCsT5wxDb3yY72i5ESvLHmU4kgKZntizEPUvLqY7qESALO5+iZneXIwgRriAP1vNe5
 dlV5KfR0BVdH60RxWCIZ8RIgrrrfPkn8ne122dkgfYdjqB516hG8EiNl48MlsgcV/r9VTqNR
 ocbCobKMDCU4ge53B1FfvB1fgKcquR6g73NNiFXc1rQAzTR0asNhUpWMpUJ+s2YkIGz+Qqdn xQ==
Message-ID: <53913bd9-2bdc-0f70-f7b4-744283e0512f@HIDDEN>
Date: Tue, 28 Apr 2020 03:51:09 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Received-SPF: pass client-ip=2a00:1450:4864:20::32c;
 envelope-from=tspiteri@HIDDEN; helo=mail-wm1-x32c.google.com
X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT :
 Malformed IPv6 address (bad octet value).
 Location : parse_addr6(), p0f-client.c:67
X-Received-From: 2a00:1450:4864:20::32c
X-Spam-Score: -1.3 (-)
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: -2.3 (--)

The next-error-select-buffer documentation states that “the selected
buffer becomes the source of locations for the subsequent invocation of
‘next-error’ or ‘previous-error’.” However, it is not the case for the
following:

1. Go in a fresh next-error capable buffer (not *grep*).
2. Grep for something.
3. M-x next-error-select-buffer *grep*
4. M-x next-error

The buffer of 1 (not *grep*) is the source of locations instead of
the expected *grep*.

This is because although next-error-select-buffer sets the variable
next-error-last-buffer, it is not used in this case: When next-error
calls next-error-find-buffer, next-error-buffer has no buffer-local
value yet, so condition 2. in next-error-find-buffer (that
next-error-buffer has no buffer-local value and the current buffer is a
next-error capable buffer) is true, and the function never even checks
next-error-last-buffer.



In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.13, cairo version 1.16.0)
of 2020-04-23 built on desktop
Repository revision: ba6104d1e8db4e8db2f12acaebf092ef579c6632
Repository branch: emacs-27





Acknowledgement sent to Trevor Spiteri <tspiteri@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#40919; 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: Sun, 24 May 2020 22:15:02 UTC

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