From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#20489: 25.0.50; next-error-find-buffer chooses non-current buffer without good reason Date: Fri, 02 Mar 2018 01:04:10 +0200 Organization: LINKOV.NET Message-ID: <87efl3cs9g.fsf@mail.linkov.net> References: <86wq0q602w.fsf@yandex.ru> <877ev36pmr.fsf@mail.linkov.net> <87sha1nbjy.fsf@mail.linkov.net> <23fd061a-9b83-742a-6083-6d2f090b8f22@yandex.ru> <81d36dbe-f563-187a-ec16-df4b051ae204@yandex.ru> <87efl6smxb.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1519945575 24780 195.159.176.226 (1 Mar 2018 23:06:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Mar 2018 23:06:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 20489@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 02 00:06:11 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1erXH8-0005yx-C6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Mar 2018 00:06:10 +0100 Original-Received: from localhost ([::1]:59701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erXJA-0001mj-OJ for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Mar 2018 18:08:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erXJ0-0001l0-2g for bug-gnu-emacs@gnu.org; Thu, 01 Mar 2018 18:08:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erXIw-0006Tz-AL for bug-gnu-emacs@gnu.org; Thu, 01 Mar 2018 18:08:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60181) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1erXIw-0006Ts-76 for bug-gnu-emacs@gnu.org; Thu, 01 Mar 2018 18:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1erXIw-0004F7-26 for bug-gnu-emacs@gnu.org; Thu, 01 Mar 2018 18:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Mar 2018 23:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20489-submit@debbugs.gnu.org id=B20489.151994566116274 (code B ref 20489); Thu, 01 Mar 2018 23:08:02 +0000 Original-Received: (at 20489) by debbugs.gnu.org; 1 Mar 2018 23:07:41 +0000 Original-Received: from localhost ([127.0.0.1]:39843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1erXIb-0004EP-EQ for submit@debbugs.gnu.org; Thu, 01 Mar 2018 18:07:41 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:48330 helo=homiemail-a18.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1erXIZ-0004EI-Oc for 20489@debbugs.gnu.org; Thu, 01 Mar 2018 18:07:40 -0500 Original-Received: from homiemail-a18.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTP id 5D0F5258068; Thu, 1 Mar 2018 15:07:39 -0800 (PST) Original-Received: from localhost.linkov.net (m91-129-98-215.cust.tele2.ee [91.129.98.215]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTPSA id 4D37E258066; Thu, 1 Mar 2018 15:07:38 -0800 (PST) In-Reply-To: (Dmitry Gutov's message of "Wed, 28 Feb 2018 04:13:54 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:143810 Archived-At: >> So the question is: in xref--next-error-function can we use code similar >> to what is used in compilation-next-error-function that works without problems? > > You probably mean compilation-goto-locus (it contains the navigation part), > but even so, it's not easy to tell which part you mean (the function does > more than one would expect). > > In short, adapting that code is kind of difficult, but hopefully I found > and fixed the problem in xref directly > in 11c58c4fc495ea4f7bff52ca077fd3e4382aa900. While looking at this, I discovered more problems: 1. the same problem that you fixed for xref, also exists in occur: it doesn't set the right current-buffer for next-error. 2. also typing RET in *Occur* doesn't set next-error-last-buffer. Maybe we need to set it in occur-mode-goto-occurrence (but not in occur-next-error) 3. typing RET in *xref* should set next-error-last-buffer as well 4. Maybe these 2 lines needed to be added also to xref--xref-buffer-mode: (setq next-error-last-buffer buffer) (setq-default next-error-last-buffer buffer) like in next-error to set both buffer-local and global values.