From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Date: Sun, 16 Sep 2018 17:19:24 -0400 Message-ID: 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> <87sh2j36jw.fsf@mail.linkov.net> <5B94DC6C.6090107@gmx.at> <5B9A15C4.5010905@gmx.at> <87y3c5ov87.fsf@mail.linkov.net> <878t42z5tz.fsf@mail.linkov.net> <5B9E1DD4.8090802@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537132693 15168 195.159.176.226 (16 Sep 2018 21:18:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 16 Sep 2018 21:18:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Juri Linkov , 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 16 23:18:09 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 1g1eQi-0003qI-Nx for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Sep 2018 23:18:08 +0200 Original-Received: from localhost ([::1]:60635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1eSp-0003X6-9h for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Sep 2018 17:20:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1eSi-0003WE-EP for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2018 17:20:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1eSa-0001xu-6e for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2018 17:20:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38124) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g1eSY-0001uK-Fp for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2018 17:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g1eSY-0005Qd-A2 for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2018 17:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Sep 2018 21:20: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.153713277320824 (code B ref 32607); Sun, 16 Sep 2018 21:20:02 +0000 Original-Received: (at 32607) by debbugs.gnu.org; 16 Sep 2018 21:19:33 +0000 Original-Received: from localhost ([127.0.0.1]:42382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1eS5-0005Pn-4o for submit@debbugs.gnu.org; Sun, 16 Sep 2018 17:19:33 -0400 Original-Received: from pmta21.teksavvy.com ([76.10.157.36]:20727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1eS2-0005PL-TZ for 32607@debbugs.gnu.org; Sun, 16 Sep 2018 17:19:32 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2HHBQAKyJ5b/0mKs2tbHgEGDIFQggiBPyWISoREi0kBgh8gAZYXgXoLE4RTBAICg14iNBgBAwEBAQEBAQICAmkoQgwBhGsGViMQCzQSFBgNJC6FCKUcigGLBIIAhCSKVgKcRAmQLIhahjOUT4FCOYFVMxoIMIMokG4jhCGKQAEB X-IPAS-Result: A2HHBQAKyJ5b/0mKs2tbHgEGDIFQggiBPyWISoREi0kBgh8gAZYXgXoLE4RTBAICg14iNBgBAwEBAQEBAQICAmkoQgwBhGsGViMQCzQSFBgNJC6FCKUcigGLBIIAhCSKVgKcRAmQLIhahjOUT4FCOYFVMxoIMIMokG4jhCGKQAEB X-IronPort-AV: E=Sophos;i="5.53,382,1531800000"; d="scan'208";a="45808847" Original-Received: from 107-179-138-73.cpe.teksavvy.com (HELO fmsmemgm.homelinux.net) ([107.179.138.73]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Sep 2018 17:19:25 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id BC258AE222; Sun, 16 Sep 2018 17:19:24 -0400 (EDT) In-Reply-To: <5B9E1DD4.8090802@gmx.at> (martin rudalics's message of "Sun, 16 Sep 2018 11:09:40 +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:150355 Archived-At: >>> (save-selected-window >>> (let ((next-error-highlight next-error-highlight-no-select) >>> (display-buffer-overriding-action >>> '(nil (inhibit-same-window . t)))) >>> (next-error n))) >> >> This is much simpler. Actually, this is what I wanted to propose as >> a solution to Martin in one of previous messages, but I mistakenly wrote >> save-window-excursion whereas I actually intended save-selected-window. > > I still do not understand whether we are sure that at the time the > code above gets called 'next-error-last-buffer' is really shown in the > selected window. Indeed, I don't see any obvious indication that this is the case. I suspect it's *usually* the case because next-error-no-select is only bound to keys in "error buffers", but if you M-x next-error-no-select from a C file, I suspect that the buffer shown in the selected-window at the beginning of the command won't be equal to the next-error-last-buffer. I'm not sure what would be considered the *right* behavior in that case: should the selected-window at the end display the same buffer as at the beginning, or should it show the buffer that contains the error (e.g. *grep* or *compilation*)? My own take on it is that it's perfectly OK to have the final selected-window show the buffer in which the command was typed (rather than the *grep*/*compilation* buffer). Stefan