From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#20489: 25.0.50; next-error-find-buffer chooses non-current buffer without good reason Date: Sun, 3 May 2015 15:56:11 +0300 Message-ID: <55461AEB.7040402@yandex.ru> References: <86wq0q602w.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1430657847 5718 80.91.229.3 (3 May 2015 12:57:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 May 2015 12:57:27 +0000 (UTC) Cc: 20489@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 03 14:57:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YotSK-0005iY-G6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 May 2015 14:57:12 +0200 Original-Received: from localhost ([::1]:59256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YotSJ-0001SH-SQ for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 May 2015 08:57:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YotSG-0001S6-L1 for bug-gnu-emacs@gnu.org; Sun, 03 May 2015 08:57:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YotSC-0003qh-IK for bug-gnu-emacs@gnu.org; Sun, 03 May 2015 08:57:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YotSC-0003qY-EA for bug-gnu-emacs@gnu.org; Sun, 03 May 2015 08:57:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YotSB-0000W6-Im for bug-gnu-emacs@gnu.org; Sun, 03 May 2015 08:57:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 May 2015 12:57:03 +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.14306577861935 (code B ref 20489); Sun, 03 May 2015 12:57:03 +0000 Original-Received: (at 20489) by debbugs.gnu.org; 3 May 2015 12:56:26 +0000 Original-Received: from localhost ([127.0.0.1]:60253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YotRZ-0000V8-96 for submit@debbugs.gnu.org; Sun, 03 May 2015 08:56:26 -0400 Original-Received: from mail-wg0-f48.google.com ([74.125.82.48]:33249) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YotRV-0000Ut-Lt for 20489@debbugs.gnu.org; Sun, 03 May 2015 08:56:22 -0400 Original-Received: by wgin8 with SMTP id n8so127145563wgi.0 for <20489@debbugs.gnu.org>; Sun, 03 May 2015 05:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=8lPvp7cgTeVQYtzhA8H6ZfnzQ20MHWhwZLgLVWydriI=; b=Rm1YKn5W8Q3ymbd2Ry3VB4PWw2CmQKuaceTPpRxt5D818CIyaA01aUdg61nZdAKLJl u4vKSTNToxzUzbupaoPKh/HdgyAo2MTK5FgIu4uPK4NYnIqQFCaC7IBT56sOXCk7KZMc jDfFCaB9AIhTwwdhXIL6MqAHpRfcDA/OExNwjipibg2COLPfpDqT7gcRToAz79yG/8Ez /Ht0avIuHVGkXR+jxO0bW1m/6oJ7BikzUvAA2Ko2rMBe+RY2k3+lZOeCsOvZKEsd5K0z G9zAKXNWekYiPpuFkpPfzgmDmqYx8Wvni1VgTGJrjJdg+TRbF9/UgirnoROyIztlQkzP pofQ== X-Received: by 10.180.218.137 with SMTP id pg9mr11380267wic.79.1430657775938; Sun, 03 May 2015 05:56:15 -0700 (PDT) Original-Received: from [192.168.1.2] ([82.102.93.54]) by mx.google.com with ESMTPSA id l3sm6558619wik.16.2015.05.03.05.56.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2015 05:56:15 -0700 (PDT) user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 in-reply-to: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102396 Archived-At: On 05/03/2015 08:49 AM, Stefan Monnier wrote: > IIRC this had something to do with hitting C-x ` to jump through the > various elements of a *compile* or *grep* buffer, where some of those > C-x ` may end up jumping to a buffer that itself has > next-error-function set. That's what I guessed, then. It doesn't solve the problem completely anyway. If the *grep* buffer is buried or displayed in a different frame (which is arguably is the best case for using C-x `), C-x ` might open a buffer with next-error-function set, and it will overtake, if it's the only one such in the currently visible frame. There's no easy way to get back to Grep's next-error-function either. Why don't we prioritize, in next-error-find-buffer, next-error-last-buffer over everything else (change the order to 2 3 1 4 5 6)? And then add some way to change next-error-last-buffer programmatically (choosing between the current buffer, if it has next-error-function set, and all other buffers with next-error-function set and buffer-file-name nil; defaulting to the current one). M-0 C-x ` (like suggested by Vitaly) might be OK, to change the used buffer and move to the next error in one step (and similarly in previous-error). But that hijacks the meaning of 0 argument.