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#32607: 27.0.50; pop-to-buffer in next-error-no-select Date: Sun, 09 Sep 2018 02:46:51 +0300 Organization: LINKOV.NET Message-ID: <87sh2j36jw.fsf@mail.linkov.net> References: <87a7p0alxv.fsf@mail.linkov.net> <5B8B8DCE.4070704@gmx.at> <87efebjzbd.fsf@mail.linkov.net> <5B8CE360.5030700@gmx.at> <877ek2tdqx.fsf@mail.linkov.net> <5B8E3998.3050907@gmx.at> <87o9ddc8yc.fsf@mail.linkov.net> <5B8F8A1B.3030807@gmx.at> <8736unzjit.fsf@mail.linkov.net> <5B90D17D.5080605@gmx.at> <87efe6iaws.fsf@mail.linkov.net> <5B9228A3.4020700@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1536452328 5393 195.159.176.226 (9 Sep 2018 00:18:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Sep 2018 00:18:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 32607@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 09 02:18:43 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 1fynR5-0001Jj-6I for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Sep 2018 02:18:43 +0200 Original-Received: from localhost ([::1]:45558 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fynTB-0008Tg-Iu for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Sep 2018 20:20:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fynSs-0008SL-4N for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 20:20:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fynEp-0003Rv-3W for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 20:06:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45681) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fynEo-0003Rd-Vt for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 20:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fynEo-0005i3-QI for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 20:06: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: Sun, 09 Sep 2018 00:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32607 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32607-submit@debbugs.gnu.org id=B32607.153645150821860 (code B ref 32607); Sun, 09 Sep 2018 00:06:02 +0000 Original-Received: (at 32607) by debbugs.gnu.org; 9 Sep 2018 00:05:08 +0000 Original-Received: from localhost ([127.0.0.1]:50695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fynDw-0005gW-C6 for submit@debbugs.gnu.org; Sat, 08 Sep 2018 20:05:08 -0400 Original-Received: from pop.dreamhost.com ([64.90.62.162]:46916 helo=pdx1-sub0-mail-a34.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fynDu-0005gN-TF for 32607@debbugs.gnu.org; Sat, 08 Sep 2018 20:05:07 -0400 Original-Received: from pdx1-sub0-mail-a34.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a34.g.dreamhost.com (Postfix) with ESMTP id 2C1267F39C; Sat, 8 Sep 2018 17:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=J2PxbdVtZ+rqfKMnhC+0Oae3XnI=; b= V83Qh0352/dwI0lKk+lti+HFzfJcnhHJJsZqQovyGc4gPFcoPBYfsq5HTr7Onkcj dqPPtq0UyZgYHYGLe5ommuypSDX5Zgfebt3XyPedhCEvS63fZmQs96cqxGHfCf6b AaZFAEJvYq6uSw9/kPyztp9Np4QosJ0srkcIbCMdxhc= Original-Received: from localhost.linkov.net (m91-129-107-190.cust.tele2.ee [91.129.107.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a34.g.dreamhost.com (Postfix) with ESMTPSA id AEB017EAB4; Sat, 8 Sep 2018 17:05:04 -0700 (PDT) In-Reply-To: <5B9228A3.4020700@gmx.at> (martin rudalics's message of "Fri, 07 Sep 2018 09:28:35 +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:150139 Archived-At: >> The special case is in next-error-no-select. Its purpose is to display >> the next-error buffer (the buffer with the location of the next-error), >> not to display next-error-last-buffer (the buffer with the list of errors) >> because next-error-last-buffer is already displayed. The user runs >> next-error-no-select from the selected window that already displays >> next-error-last-buffer, there is no need to try and display the same >> buffer again. This behavior is not even documented. So pop-to-buffer >> is useless here. But I suspect that maybe it was added for some use cases >> to ensure that next-error-last-buffer is displayed. So at least >> we need to make it harmless. But currently it makes harm with the >> reported configuration. I provided a patch to fix next-error-no-select >> to not fail with the legitimate user configuration. > > I suppose the idea is to implicitly emphasize the "-no-select" postfix > by showing 'next-error-buffer' somewhere and simultaneously selecting > a window showing 'next-error-last-buffer'. That's a rather unpleasant > hack, your analysis is correct and 'display-buffer-overriding-action' > is a valid remedy here (it's at least as good as > > (unless (get-buffer-window next-error-last-buffer) > (pop-to-buffer next-error-last-buffer)) > > IMHO) so install it. Sorry that I failed to explain this earlier, but it just occurred to me that the purpose of pop-to-buffer in next-error-no-select is to switch the selected window to next-error-last-buffer from the buffer's window with next-error. Because when I tried your code it failed by leaving point in wrong window: after this command point should be back in the next-error-last-buffer window, but without calling pop-to-buffer it remains in the window with the next-error buffer. The solution with using display-buffer-overriding-action correctly puts point back to select next-error-last-buffer window.