From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#40919: 27.0.91; next-error-select-buffer does not always behave as documented Date: Wed, 29 Apr 2020 02:40:20 +0300 Organization: LINKOV.NET Message-ID: <87d07rmb6j.fsf@mail.linkov.net> References: <53913bd9-2bdc-0f70-f7b4-744283e0512f@ieee.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="89670"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 40919@debbugs.gnu.org To: Trevor Spiteri Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 29 01:59:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTa89-000NCQ-1W for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Apr 2020 01:59:13 +0200 Original-Received: from localhost ([::1]:48674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTa88-0001Ur-1v for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Apr 2020 19:59:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36234) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTa7z-0001Sm-B0 for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2020 19:59:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTa7y-0007TZ-Tb for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2020 19:59:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58593) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTa7y-0007TQ-HT for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2020 19:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jTa7y-0000cR-HI for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2020 19:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Apr 2020 23:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40919 X-GNU-PR-Package: emacs Original-Received: via spool by 40919-submit@debbugs.gnu.org id=B40919.15881182882299 (code B ref 40919); Tue, 28 Apr 2020 23:59:02 +0000 Original-Received: (at 40919) by debbugs.gnu.org; 28 Apr 2020 23:58:08 +0000 Original-Received: from localhost ([127.0.0.1]:41902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTa76-0000b1-DC for submit@debbugs.gnu.org; Tue, 28 Apr 2020 19:58:08 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:50513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTa74-0000aL-Ec for 40919@debbugs.gnu.org; Tue, 28 Apr 2020 19:58:07 -0400 X-Originating-IP: 91.129.106.11 Original-Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 2BDAB6000B; Tue, 28 Apr 2020 23:57:58 +0000 (UTC) In-Reply-To: <53913bd9-2bdc-0f70-f7b4-744283e0512f@ieee.org> (Trevor Spiteri's message of "Tue, 28 Apr 2020 03:51:09 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179259 Archived-At: > 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?