From unknown Thu Sep 11 21:35:50 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32607 <32607@debbugs.gnu.org> To: bug#32607 <32607@debbugs.gnu.org> Subject: Status: 27.0.50; pop-to-buffer in next-error-no-select Reply-To: bug#32607 <32607@debbugs.gnu.org> Date: Fri, 12 Sep 2025 04:35:50 +0000 retitle 32607 27.0.50; pop-to-buffer in next-error-no-select reassign 32607 emacs submitter 32607 Juri Linkov severity 32607 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 01 18:33:34 2018 Received: (at submit) by debbugs.gnu.org; 1 Sep 2018 22:33:34 +0000 Received: from localhost ([127.0.0.1]:42205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwEST-0001fx-Rv for submit@debbugs.gnu.org; Sat, 01 Sep 2018 18:33:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwESS-0001fl-Ik for submit@debbugs.gnu.org; Sat, 01 Sep 2018 18:33:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwESM-0000i6-C9 for submit@debbugs.gnu.org; Sat, 01 Sep 2018 18:33:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40105) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fwESM-0000hy-8Y for submit@debbugs.gnu.org; Sat, 01 Sep 2018 18:33:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwESL-000251-FL for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2018 18:33:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwESG-0000eF-HX for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2018 18:33:25 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:58348 helo=pdx1-sub0-mail-a39.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fwESF-0000bb-U8 for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2018 18:33:20 -0400 Received: from pdx1-sub0-mail-a39.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a39.g.dreamhost.com (Postfix) with ESMTP id 845D37FA79 for ; Sat, 1 Sep 2018 15:33:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=linkov.net; bh=hMjEhcwTt5DPbIUGIxM mgthTHgI=; b=df4F3FYLdI9QGkkcb6EE0f4/vZ+mtZSzlwB3s4QCW06Jt8RFjlO m13xH43tpwkdZwYCzRff111wNijTRAkXhay+iOvMivzJRYH9L7OISjrCSRPP3ox0 3Arj9HuMPmmArPX6LNrJRzL+py8LETv2LQYxheIQT1Ac90CvKNe3Wy+0= Received: from localhost.linkov.net (m91-129-101-104.cust.tele2.ee [91.129.101.104]) (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-a39.g.dreamhost.com (Postfix) with ESMTPSA id 737647FA7A for ; Sat, 1 Sep 2018 15:33:16 -0700 (PDT) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: 27.0.50; pop-to-buffer in next-error-no-select Organization: LINKOV.NET Date: Sun, 02 Sep 2018 01:32:12 +0300 Message-ID: <87a7p0alxv.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Suppose we have such customization: (setq display-buffer-alist '(("\\`\\*grep\\*\\'" display-buffer-same-wi= ndow))) Now after running grep with a non-empty output in =E2=80=98emacs -Q=E2=80= =99, typing =E2=80=98C-o=E2=80=99 (compilation-display-error) will display two= identical buffers instead of displaying the buffer with the found grep hit. The problem is with pop-to-buffer in next-error-no-select. I wonder what is an idiomatic way to ensure a buffer is already displayed in some window, to not display the same buffer in other window? From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 02 03:14:35 2018 Received: (at 32607) by debbugs.gnu.org; 2 Sep 2018 07:14:35 +0000 Received: from localhost ([127.0.0.1]:42343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwMag-00063z-PZ for submit@debbugs.gnu.org; Sun, 02 Sep 2018 03:14:34 -0400 Received: from mout.gmx.net ([212.227.15.19]:43621) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwMaf-00063W-5u for 32607@debbugs.gnu.org; Sun, 02 Sep 2018 03:14:33 -0400 Received: from [192.168.1.101] ([212.95.5.6]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MKHtm-1fwuYQ33nq-001fds; Sun, 02 Sep 2018 09:14:24 +0200 Message-ID: <5B8B8DCE.4070704@gmx.at> Date: Sun, 02 Sep 2018 09:14:22 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov , 32607@debbugs.gnu.org Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select References: <87a7p0alxv.fsf@mail.linkov.net> In-Reply-To: <87a7p0alxv.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:0XpRSR0hXlgUvYDp0xuBaEkJVpD6xOmydJc190w1tSUdSyNDEZp gL1Z2tBOK3UYrUi+tEKHLzJhgD96ftvc2UNF1BtuYUyd2+jFD1qRtr2rkaCyQNaqMngJrCc LNXmrLj0UNmnrhTD8hL8EUDNftwofGPLpzXAD6LXL8bpu7nQ9LZVU2EbrRSlO+b+t8aw9XO AnWW7I2eGbOznGApzCc2Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:hgccEaZw/38=:7n/nyhba3UPj77u87KCLtH 8o9WYt6iD573XZiXiFR+3PC4MlUx13U+HN0yaBwWSUA/EPOxkwgigjhUnmVugrweoi2ZotNQl 70eK7/HKwJ22om+AsQEL6gugplPJTuhLA4h4t/UUp2BjgMywrlfUyCLWrklItFcEWvls3YN+h rTZqNZf18j9818hHqYkO2TawU+n4KRanrUOOkPjav/ZkVlYg+CVmaLFqlSMcqQ0vd5iwEf0OL YXT2IeRqMHO50gUVRXSCynb5jPJu2uP5lLDORAO5u2TBP3k70AzfetYAkx0IwOr4/Zn1leSVV Il71FSKlcyhG7dSM3K+OsNbWrrKt+fIbG45WejQeB429zLREdcrlDtW8YWY1TGGxZdKH2yCz9 m0h64M1vdYgZNHIW6Y1EsIVEh881C5V4pgmZ1f3EGd7ifDVvwXkT58iW+TokoHI+MbaH+eY1n hyvfHQEyTvNFqK+XXy8pph9pqSs0UuHtj07YKSq72TSl7irnd2kFNPiby6sNyu7kP3uWOHlKY JK5oRGBgzw7IQYk/wd4URyXbohxZrF3FTCTx3upkoHQ+zrOrmIhSJLoXFUXClwjYKwobj9S7k jwNeW99y9961hfS3BrdOvop5gmMnD03WjSd7PzOD6POLl0/WuplzQ7jl1tpapBmpmJSMSxkpu AoBX9xSWLfJfqSdbHswv4HmsUB47XpU51JhreRdx7vImgMF/r9kbOJY8YFj+/H0r1lCdpcice jir7mcw0VbUx/1z9g71NPtkOI9jB35YXztCxZiiWIEsD04iUyne+S4l20Arhq7Ba0+clDzeyX yjVhTZM X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32607 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Suppose we have such customization: > > (setq display-buffer-alist '(("\\`\\*grep\\*\\'" display-buffer-sam= e-window))) > > Now after running grep with a non-empty output in =E2=80=98emacs -Q=E2= =80=99, > typing =E2=80=98C-o=E2=80=99 (compilation-display-error) will display = two identical > buffers instead of displaying the buffer with the found grep hit. > > The problem is with pop-to-buffer in next-error-no-select. > I wonder what is an idiomatic way to ensure a buffer is already > displayed in some window, to not display the same buffer > in other window? I'm not quite sure I understand: Is there a reason you did not supply 'display-buffer-reuse-window' in the above customization? martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 02 18:49:55 2018 Received: (at 32607) by debbugs.gnu.org; 2 Sep 2018 22:49:55 +0000 Received: from localhost ([127.0.0.1]:43449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwbBr-0003bD-BA for submit@debbugs.gnu.org; Sun, 02 Sep 2018 18:49:55 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:36902 helo=pdx1-sub0-mail-a9.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwbBq-0003b6-Nl for 32607@debbugs.gnu.org; Sun, 02 Sep 2018 18:49:54 -0400 Received: from pdx1-sub0-mail-a9.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a9.g.dreamhost.com (Postfix) with ESMTP id 3A0947E09C; Sun, 2 Sep 2018 15:49:54 -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=eXe6isMBEv8S4iiB+B37N2Mn4nU=; b= EhHY++NT6g9P44IOs948ZIZF2dWj7BsLSGrY/X7wpItUPNglav75nh19e/tari9i wNRI/1dfOE5Awt0TLcFb4m2HdBCMSLewHJC5Z2GwDBZAh1hcWSQ6/Moji/DUaTH1 PTRcYcNGIkSKEI7yu/19O6RegwSOHZS9alasXwwnYFY= Received: from localhost.linkov.net (m91-129-101-104.cust.tele2.ee [91.129.101.104]) (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-a9.g.dreamhost.com (Postfix) with ESMTPSA id 8FD767E9E0; Sun, 2 Sep 2018 15:49:52 -0700 (PDT) From: Juri Linkov To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: LINKOV.NET References: <87a7p0alxv.fsf@mail.linkov.net> <5B8B8DCE.4070704@gmx.at> Date: Mon, 03 Sep 2018 01:43:02 +0300 In-Reply-To: <5B8B8DCE.4070704@gmx.at> (martin rudalics's message of "Sun, 02 Sep 2018 09:14:22 +0200") Message-ID: <87efebjzbd.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >> Suppose we have such customization: >> >> (setq display-buffer-alist '(("\\`\\*grep\\*\\'" display-buffer-sam= e-window))) >> >> Now after running grep with a non-empty output in =E2=80=98emacs -Q=E2= =80=99, >> typing =E2=80=98C-o=E2=80=99 (compilation-display-error) will display = two identical >> buffers instead of displaying the buffer with the found grep hit. >> >> The problem is with pop-to-buffer in next-error-no-select. >> I wonder what is an idiomatic way to ensure a buffer is already >> displayed in some window, to not display the same buffer >> in other window? > > I'm not quite sure I understand: Is there a reason you did not supply > 'display-buffer-reuse-window' in the above customization? Because it's an idiomatic way to tell the Emacs window manager to display the *grep* buffer in the same window (an old way to do the same was using same-window-buffer-names and same-window-regexps) when manually running M-x grep. But it fails when using C-o from the already displayed *grep*. I think next-error-no-select should override the user setting with display-buffer-overriding-action because the purpose of pop-to-buffer in next-error-no-select is to ensure the *grep* buffer is displayed somewher= e: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=next-error-no-select.1.patch diff --git a/lisp/simple.el b/lisp/simple.el index 0ccf2f1d22..df7d86a835 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -385,7 +385,8 @@ next-error-no-select (interactive "p") (let ((next-error-highlight next-error-highlight-no-select)) (next-error n)) - (pop-to-buffer next-error-last-buffer)) + (let ((display-buffer-overriding-action '(display-buffer-reuse-window))) + (pop-to-buffer next-error-last-buffer))) (defun previous-error-no-select (&optional n) "Move point to the previous error in the `next-error' buffer and highlight match. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 03 03:31:56 2018 Received: (at 32607) by debbugs.gnu.org; 3 Sep 2018 07:31:56 +0000 Received: from localhost ([127.0.0.1]:43565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwjL2-0008R5-2p for submit@debbugs.gnu.org; Mon, 03 Sep 2018 03:31:56 -0400 Received: from mout.gmx.net ([212.227.15.18]:44709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwjL0-0008Qr-Tx for 32607@debbugs.gnu.org; Mon, 03 Sep 2018 03:31:55 -0400 Received: from [192.168.1.101] ([46.125.250.51]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Mgc0l-1gIP3c1Zih-00O00M; Mon, 03 Sep 2018 09:31:47 +0200 Message-ID: <5B8CE360.5030700@gmx.at> Date: Mon, 03 Sep 2018 09:31:44 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select References: <87a7p0alxv.fsf@mail.linkov.net> <5B8B8DCE.4070704@gmx.at> <87efebjzbd.fsf@mail.linkov.net> In-Reply-To: <87efebjzbd.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:PqBkHQBWYtiQ2P2swnYBUxhCaXHLToXaERHvk6aPhKXTkZeyMCy hQCxdG0bILExhEj0UjpPgcbbg2rl/qpT/jAvYkE4FNtOYTg7yaA8k7zzaB67+7GHFyp2PWL zIcxKTraPRX68eJ/5XPzlz12JKgbg2cNdrQd5coPz0Js2+OUVdhoFwjYelIjWocqPBaz/xG Bqsu5L07Vv3DhpSHtTowA== X-UI-Out-Filterresults: notjunk:1;V01:K0:KjoVREZ2fV8=:EoNHui/Qh3ZWmMNbsZqhoh 3KhFhVR/Vpne/izCtLgu+HbcRcy4RB1wpD8+qTgPeoL4VJJDhWYwXmLk1juX/kjcZjN0Z3tKT XgyqDwKo8FoLlWV5zCnF5al+YkLulK4iHVZ+UzJfA9qnkHirKJYZMyfrk6Ag5DSYFqpkHisMP +ufpbqZ95IX9Jt0USjY9+UR8EhQul1eUsYdEbBRLSMDGCpJtWYcft7qzfA+/NHlU3M0+QXnr/ vmb0UXCw6lCbXHsIxgLqLwWiyQ6xJfF+BQo8xBJrzKb/enobZTXq/qkZPOhU4tlwYwjHRw9F7 vMrlM05wNfXznmKJReX5Ik+nZezjieFUgxYrRFOytZJVX9pkgF9PSfvqXY8/oJK3mIjUayP5M 8RvZyMeBEwyNBBGKb2hSnF2lvCBc9aXgef2npys/fPzkLtzR38QBS5PYvLjg8KTgNNEy4oEZH E1UTxtdJYYo0HN8/RjDHBRKEMQKqexJBDkGXpknnLbStBowj+Q9p2ge7hNs4VPk6xFnuvbiie 0SkFlU/bnmyo4w4fv8e2g8WZypE28wge/5K+lAbH69weLzHdjYuEIMpjhLY4grS9FYpvuy+ng RuW7cpxuBgWJJqZly7nHVzlSfxx3c4MfeMmBVqr5QdKGb7RXsdbohNSgqPjPCfWM3j8Le92Wt cs1ZSAdnDadzjGYiR8rLRMXw7fN+Lwof53mRANpmpEisevQ1aNlGY1fvFxj7aiHLjHTgYCZmy CDtFem5a5Wd577iIqcuKFjD2yrlvflxqRgfHV/EiIvuYttQiv2VRzYBI7Z+v7LJCDy+i7hwsH HRxw1cK X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) >> I'm not quite sure I understand: Is there a reason you did not supply >> 'display-buffer-reuse-window' in the above customization? > > Because it's an idiomatic way to tell the Emacs window manager to > display the *grep* buffer in the same window (an old way to do the same > was using same-window-buffer-names and same-window-regexps) > when manually running M-x grep. But that's what 'display-buffer-same-window' has been devised for. 'display-buffer-reuse-window' is supposed to use _any_ window that already displays the buffer, not just the selected one. > But it fails when using C-o from the already displayed *grep*. > I think next-error-no-select should override the user setting with > display-buffer-overriding-action because the purpose of pop-to-buffer in > next-error-no-select is to ensure the *grep* buffer is displayed somewhere: And if a user wanted to pop up a new window here? martin From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 03 18:45:15 2018 Received: (at 32607) by debbugs.gnu.org; 3 Sep 2018 22:45:15 +0000 Received: from localhost ([127.0.0.1]:44723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwxat-0001Up-M9 for submit@debbugs.gnu.org; Mon, 03 Sep 2018 18:45:15 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:41822 helo=pdx1-sub0-mail-a22.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwxas-0001Ui-O9 for 32607@debbugs.gnu.org; Mon, 03 Sep 2018 18:45:14 -0400 Received: from pdx1-sub0-mail-a22.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a22.g.dreamhost.com (Postfix) with ESMTP id 3F2F07F316; Mon, 3 Sep 2018 15:45:14 -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=CxSFDkYwdt1eg07Ts0lcFDvhbHQ=; b= ZM+q0nQ6s6Jy1Ul7ncLNLszPJfFBncTaY8ZBgDnsC7tmMHFdkmHZnu3vYTY61pXq 0weXzhlQ4tDPQpLC37rCkB9vr7sqraBAb3IgEcC2874eZIZC+NSF/bBOaAS7aJbA dZ9jED4dpOVtL+cuUKcvVl4I5uvp4imFIgduodFgAa4= Received: from localhost.linkov.net (m91-129-101-104.cust.tele2.ee [91.129.101.104]) (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-a22.g.dreamhost.com (Postfix) with ESMTPSA id 58F037F331; Mon, 3 Sep 2018 15:45:13 -0700 (PDT) From: Juri Linkov To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: LINKOV.NET References: <87a7p0alxv.fsf@mail.linkov.net> <5B8B8DCE.4070704@gmx.at> <87efebjzbd.fsf@mail.linkov.net> <5B8CE360.5030700@gmx.at> Date: Tue, 04 Sep 2018 01:31:02 +0300 In-Reply-To: <5B8CE360.5030700@gmx.at> (martin rudalics's message of "Mon, 03 Sep 2018 09:31:44 +0200") Message-ID: <877ek2tdqx.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> But it fails when using C-o from the already displayed *grep*. >> I think next-error-no-select should override the user setting with >> display-buffer-overriding-action because the purpose of pop-to-buffer in >> next-error-no-select is to ensure the *grep* buffer is displayed somewhere: > > And if a user wanted to pop up a new window here? It pops up according to user setting but only when this buffer is not displayed already in other window. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 04 03:52:06 2018 Received: (at 32607) by debbugs.gnu.org; 4 Sep 2018 07:52:06 +0000 Received: from localhost ([127.0.0.1]:44978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fx686-0007IP-Hs for submit@debbugs.gnu.org; Tue, 04 Sep 2018 03:52:06 -0400 Received: from mout.gmx.net ([212.227.15.15]:56913) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fx684-0007Hh-Tz for 32607@debbugs.gnu.org; Tue, 04 Sep 2018 03:52:05 -0400 Received: from [192.168.1.101] ([213.162.73.179]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LrePN-1flRKq1ABZ-013Q2l; Tue, 04 Sep 2018 09:51:57 +0200 Message-ID: <5B8E3998.3050907@gmx.at> Date: Tue, 04 Sep 2018 09:51:52 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select References: <87a7p0alxv.fsf@mail.linkov.net> <5B8B8DCE.4070704@gmx.at> <87efebjzbd.fsf@mail.linkov.net> <5B8CE360.5030700@gmx.at> <877ek2tdqx.fsf@mail.linkov.net> In-Reply-To: <877ek2tdqx.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:FkRstiXpaufwU+zIXqwR3Y6FWalxTgOCDT3dq5No2jFmlQPxxOc 4iF0r9ESrDN3bzTDfC9ULcSMPE5W85OKk2j8EmfxJYp82Db+EqPHS9lMpZ/233/h9JUQcr6 hlZjlHYyIhAbB0JgG42zmm3X6W8CI1a143t/3Zaw3Uc49wGACk7d4aqkKJ4zu2WIJB55mw0 3gArXGjFdQNxFWco4/Bow== X-UI-Out-Filterresults: notjunk:1;V01:K0:UJW7ZpxZgf8=:tZbO7wJ5Xl8osL1di6bzvg OmXYzFj0UaviZbE/vYMzPJv3n3StqMripwPghBsltt+e9sW2uBcaDJZzbn86pHfHmv/Q+Fs/j r7nKBpyyGx6J33zb4W0Grvk/Ku04ZWYPXT5jDboUzgUg0+Xw3xU7gK5SRhJCz8BM9hVoIFnba ZAIP/7fmiaZXLsoT07XfeUyhTZtJWsXoFpioxXj4YW72bwcyk1Ixy5OHgxmamJNU4ERYTxs0M 3/YMFyYPjIVfR7VDdt7o2lpE21m17jyORE1xX6e7qw0WNkrkntGx78z35LiCVDOs5tcTyp3ur AZB4aiopfD/azy8najbUfhlCW35vhusv8wcHHisbCuV4jHfnlxnyW05Sdbq1DxcA45qoo003h lqvoEqCIsorIg2vCTyLzaVkkCBv0avyLsGpmmalZOm1YoSxQFh6t+zRqOH6It+jgCrQAs4X5s p/rf0wjj+2STFS/xgtB8orj5Deb/7RSB5sjgNQHeZ/bjLGirb78VheLo+H/SrLJup0uvHRN45 VduGxCXyLdhXvbnALqMx9V9RkrxVSSI3rS69bMopDO4FnZZJVFxccxvMOnKpj1ofuHk1vixS5 KX8DiOv82dY2xVTz+qKbtJTCBt8AaB1odde965ecCabUXx2wVC4oFCrWVXdMI4vas0k8xH2Dt GlDSLF1ugJp8vWJhDcFvPx20RbV1iyp35RPe/C7MfnQWFXKmUgh8SojkfhTBrlpLd3CBTSyND mnh8GxnZoJUj+Lflh8iBpxs9u1v64nFUyziLF/Xb02mvoCqqjbqV7ZyER8sIECYzJGlfOPIHg YHGaps5 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> But it fails when using C-o from the already displayed *grep*. >>> I think next-error-no-select should override the user setting with >>> display-buffer-overriding-action because the purpose of pop-to-buffer in >>> next-error-no-select is to ensure the *grep* buffer is displayed somewhere: >> >> And if a user wanted to pop up a new window here? > > It pops up according to user setting but only when > this buffer is not displayed already in other window. Still: IMHO it's not the task of the calling function to fix a bad user customization. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 04 17:29:30 2018 Received: (at 32607) by debbugs.gnu.org; 4 Sep 2018 21:29:30 +0000 Received: from localhost ([127.0.0.1]:46065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxIt7-0003xy-UB for submit@debbugs.gnu.org; Tue, 04 Sep 2018 17:29:30 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:52518 helo=pdx1-sub0-mail-a1.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxIt6-0003xq-Dg for 32607@debbugs.gnu.org; Tue, 04 Sep 2018 17:29:28 -0400 Received: from pdx1-sub0-mail-a1.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a1.g.dreamhost.com (Postfix) with ESMTP id 8F79D7ED89; Tue, 4 Sep 2018 14:29:27 -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=slvMk0UVsVVOxbUXonmXZ6PcKzA=; b= AnIAJNblqnqUrGIgT9xo8r6cK7JWFypQBVgGHpCntEckCw62M4FYk5MZFY8c+8JP r/S6jgc3xIBZe8VZkf16HXrR6weJXmJLCSX1bKV4e9NdfRDnEhN13dLLEfEXrJLz kR3uKMI+nf/ofAlaBlvQAdAvSnJ0xGGegYaWV+UAFQc= Received: from localhost.linkov.net (m91-129-101-104.cust.tele2.ee [91.129.101.104]) (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-a1.g.dreamhost.com (Postfix) with ESMTPSA id E68F47EAE7; Tue, 4 Sep 2018 14:29:25 -0700 (PDT) From: Juri Linkov To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: 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> Date: Wed, 05 Sep 2018 00:28:30 +0300 In-Reply-To: <5B8E3998.3050907@gmx.at> (martin rudalics's message of "Tue, 04 Sep 2018 09:51:52 +0200") Message-ID: <87o9ddc8yc.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>> But it fails when using C-o from the already displayed *grep*. >>>> I think next-error-no-select should override the user setting with >>>> display-buffer-overriding-action because the purpose of pop-to-buffer in >>>> next-error-no-select is to ensure the *grep* buffer is displayed somewhere: >>> >>> And if a user wanted to pop up a new window here? >> >> It pops up according to user setting but only when >> this buffer is not displayed already in other window. > > Still: IMHO it's not the task of the calling function to fix a bad > user customization. What is bad in user customization? It's normal customization that corresponds to the old way of using same-window-regexps. It's not responsibility of user customization to workaround deficiencies in core functions. The task of next-error-no-select is to check if the buffer is already displayed, not to pop up a new buffer. There is no such problem in other commands that use pop-to-buffer. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 05 03:47:55 2018 Received: (at 32607) by debbugs.gnu.org; 5 Sep 2018 07:47:55 +0000 Received: from localhost ([127.0.0.1]:46325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxSXb-0006QX-LM for submit@debbugs.gnu.org; Wed, 05 Sep 2018 03:47:55 -0400 Received: from mout.gmx.net ([212.227.15.15]:34281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxSXa-0006Q6-B0 for 32607@debbugs.gnu.org; Wed, 05 Sep 2018 03:47:54 -0400 Received: from [192.168.1.101] ([46.125.250.92]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MX1hk-1gRHYk3OXk-00W1GI; Wed, 05 Sep 2018 09:47:46 +0200 Message-ID: <5B8F8A1B.3030807@gmx.at> Date: Wed, 05 Sep 2018 09:47:39 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> In-Reply-To: <87o9ddc8yc.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:+XEWa7QV5P9ZcypHq9HmyJQVqR5qpGW4EN96Lm9V+p39lTncezA Egsoor9AXUERtgWmsA+pRVnqyfGo+3U/GrjfFDSZ4sNitpArE7lvELw4HiDpRZIKwPTIx37 Id6joYwAvmu2B3xwgt/Y0Mj2d/OrbZcPqdG/crv0lVM70TfBV7QWpSv8JUbmEnlPP9o+IWm eaF1WYJv5ppjH/ahrc2iA== X-UI-Out-Filterresults: notjunk:1;V01:K0:KctcOh1eF+g=:KPQKKzcsXp4+Tqkvmw/8af 3eSWBgYJXA21MvgGQaohf6R/F8i/2BUAB2+rObGdoI+iUbWCRBZtn2Xoaz8FgQIM7NRbuqF1G OOmzEl84u2ZpGarDWbHH9Hu+mKFiRf9M+0LBCoPyDpzFBlSQsBshsrQJ41/ClRK1QBW7H/SLt 7Et04z4BDj2vfwAbDeTq9eNQ91kSg7kddwU8eDEjgvkATInQB4MlF6lFTrdpwfbjWCwmVGwEY AbNV1y8jusMArOSUho9NValxAnhnh8G9XAmRXhpA2OwGvC8IyznaFje9xhafIKEE0wEPMd6mK u3K5+DmaFX5CVa7MBVk/gvwhuRW7YBBNkEOvBEm5G0K4Oxu80kvv50eTFuNQt8vfZfoosWEa/ cNiD6xELXq62qBXOeshmnPFGuFJxeZXbEVs6Hxzv8s+2JexYbAAFVIVSsSo8pM2EvNTMkw+cy 4oXgQypxKXFiloAcrSw1BKsHq6qZoZomJurwnCMMj6w9rmackt8SIkL3Z0JIVRxStJIOc43yB 10sjk9asq4BL6z36hwyg1bOIDc7cqXlm+UQvY5rJYhA3ilMSPn8TPnGxKYz2ojSfBDV8CZYxh NkAMCGMWu44FHxH0t9vpThA5jI0jyXtyifdu+r3iQ2X5Yr5qtB/+B6btsz6uzmgtx53b1ufJw hrwEAIl9j60+Mn5jWrIZZkUgv2gJcw86mvBUKs8LijhPxvhkAd+/099g5/bvuxpKIjZuUDKbg Sp9EN5bJ69Riww0eITqodlbIwwbU/bLY/oaOBQ5wJ6akb4HKY/oHx8NT+o0JRKBhFxUuhqp5d h5AhxI0 X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) > What is bad in user customization? That this particular one (setq display-buffer-alist '(("\\`\\*grep\\*\\'" display-buffer-same-window))) apparently doesn't do what its writer intended. This customization means that its writer requests to display the buffer in the selected window _regardless_ of whether the displayed buffer is already displayed anywhere else. Such a request is legitimate (think of the case where I am perviewing a part of a buffer in another window and I do not want to change that window's point) and an application should not override it. I think the intended customization in the case at hand is (setq display-buffer-alist '(("\\`\\*grep\\*\\'" (display-buffer-reuse-window display-buffer-same-window)))) Or what am I missing? martin From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 05 18:23:14 2018 Received: (at 32607) by debbugs.gnu.org; 5 Sep 2018 22:23:14 +0000 Received: from localhost ([127.0.0.1]:47472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxgCf-0002ZA-PG for submit@debbugs.gnu.org; Wed, 05 Sep 2018 18:23:13 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:49962 helo=pdx1-sub0-mail-a17.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxgCe-0002Z1-5u for 32607@debbugs.gnu.org; Wed, 05 Sep 2018 18:23:12 -0400 Received: from pdx1-sub0-mail-a17.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a17.g.dreamhost.com (Postfix) with ESMTP id 5C5397FD07; Wed, 5 Sep 2018 15:23:11 -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=04MUrIAbjw/qOUhXg33Kq0ie1I4=; b= tinzQm++P1N99Pn6Re2ZxszYWeLbRRATCKZI0rgWmNj6zC8PN/Wh5pk2Oj7m1UiN rs/cxm2JqJH96rTFSmLvMDVAudGLtZWxN97ioniHLhjBAX1KuB7cjs6hNDK5eXZg bBEjVP/J3vEIR1+w9+2ATRErXc0LZBOUTv6klHnwDGM= Received: from localhost.linkov.net (m91-129-101-104.cust.tele2.ee [91.129.101.104]) (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-a17.g.dreamhost.com (Postfix) with ESMTPSA id B133C7FCFB; Wed, 5 Sep 2018 15:23:09 -0700 (PDT) From: Juri Linkov To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: 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> Date: Thu, 06 Sep 2018 01:06:34 +0300 In-Reply-To: <5B8F8A1B.3030807@gmx.at> (martin rudalics's message of "Wed, 05 Sep 2018 09:47:39 +0200") Message-ID: <8736unzjit.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> What is bad in user customization? > > That this particular one > > (setq display-buffer-alist '(("\\`\\*grep\\*\\'" display-buffer-same-window))) > > apparently doesn't do what its writer intended. This customization > means that its writer requests to display the buffer in the selected > window _regardless_ of whether the displayed buffer is already > displayed anywhere else. Such a request is legitimate (think of the > case where I am perviewing a part of a buffer in another window and I > do not want to change that window's point) and an application should > not override it. This is the right customization. The intended customization is to display the buffer in the same window, even if this buffer is already displayed in another window: the user navigates to the needed window and wants this buffer to appear in the selected window, not to switch to some other window that might already display it. That's the point of this bug report. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 06 03:04:50 2018 Received: (at 32607) by debbugs.gnu.org; 6 Sep 2018 07:04:50 +0000 Received: from localhost ([127.0.0.1]:47620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxoLS-0000Si-5J for submit@debbugs.gnu.org; Thu, 06 Sep 2018 03:04:50 -0400 Received: from mout.gmx.net ([212.227.15.15]:42635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxoLP-0000ST-Oh for 32607@debbugs.gnu.org; Thu, 06 Sep 2018 03:04:48 -0400 Received: from [192.168.1.101] ([213.162.68.232]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LpsIh-1fLzM13QcJ-00fnH0; Thu, 06 Sep 2018 09:04:38 +0200 Message-ID: <5B90D17D.5080605@gmx.at> Date: Thu, 06 Sep 2018 09:04:29 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> In-Reply-To: <8736unzjit.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:5ehzO21lhK5Es2bDy/gS5KLLFyg3ZDQp8O+n/cQcwT5ahOxuQFX 6H1uBSDZpLoFEEJtHM4QPVabJ9WemVstUTXDQNlpTDFGfS12aStnHsLoY2giuEKosVweEzj EfrbovVsef2edA2LyxkERQU7InQo5Kahclf7lBC5LJ1H8/gioYJm+s/ZI7pgJH9Se7T5kAn 7Zn+fseAtqKknFtCCRUOQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:s9NNrxsaI4s=:g6ik/Eh8swM4VNMIBua1JL z19ySXdMH4Q3/Br4QsPV1zoaunfJGcXOQpowPiuhpIAFXlLE2Yc7YusEdL7csgKgdPyLPwH2W h86+dIkUipjH7X+6eCjs5ITCfHbAyWMKYuASoY5v1E+rOXr0IYrjs2ed3KcZPssqYGRLFMemO 4G/H+s2WnvSb1amDmbXnjZsR+Li1u9DTVa7NwhWEfRcglnXuOFOgPKXc5XW+50buSJeBq3x+G 9dD1eqjg7r/XjtMiWY6vpCs7srAonsbu3kWGLl3rKx3k4Bpi8g0U/7YtxugDwpNgEItEae2rM /gQh0LLQ/iT6ozTnVdBpdyJDecAPGi9J1LhEGvbrOkhnvowhq9Ekp3y7UmCCnotS7IUNHUMFf yZWfnCVLD+yP8Pq9ctj3dGEUeBKD1fG6rJoIaS1Kp0C+E9JoSEran1/HqFJp3hREg4UP/M5Wv Z4peQxPzj11vouYBbSQgNpj3KN5pS1oh7RI+3F4C4UpTShUa0sTzD64oCoKh79WjJKJi7besr UQEHrWtkHdcKFdfDqw8jcZ7BEpWVRyza2h9wSdJEPe8KAagyG+Dh5lNMkg5btJD50iZRgF5KB icTW0/jpv0ckvr5hrZT2xetlXQyBlQzHxcC5qB2Vf6b7d19Ezk8D9a0FllaznEzipmu6zRDu6 a/tZxVrTD/xYfpSJoaKzd3zV7PLHtkuE+c5o+ifT3ZAZnYrklYvGrSf8qrwf4IgWnQQEsZwKK GYyBDjGxuYLlGvOHvefi0xpbWNWQ2OmqJwYoQkIbAH8Kq1Ygibpoz1xmwEnKMfR16/fL9j/Pa uRhFrVt X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> That this particular one >> >> (setq display-buffer-alist '(("\\`\\*grep\\*\\'" display-buffer-same-window))) >> >> apparently doesn't do what its writer intended. This customization >> means that its writer requests to display the buffer in the selected >> window _regardless_ of whether the displayed buffer is already >> displayed anywhere else. Such a request is legitimate (think of the >> case where I am perviewing a part of a buffer in another window and I >> do not want to change that window's point) and an application should >> not override it. > > This is the right customization. The intended customization is to > display the buffer in the same window, even if this buffer is already > displayed in another window: the user navigates to the needed window > and wants this buffer to appear in the selected window, not to switch to > some other window that might already display it. That's the point of > this bug report. Funny. I don't recall that in all those years we ever disagreed on a single issue. And now we have right two of them. If the intended customization is to display the *grep* buffer always in the selected window, then why "next-error-no-select should override the user setting with display-buffer-overriding-action because the purpose of pop-to-buffer in next-error-no-select is to ensure the *grep* buffer is displayed somewhere" Isn't *grep* displayed somewhere when it shows up in the selected window and also in some other window? Maybe the *grep* case is special but I still fail to see why. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 06 18:25:02 2018 Received: (at 32607) by debbugs.gnu.org; 6 Sep 2018 22:25:02 +0000 Received: from localhost ([127.0.0.1]:48514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fy2hx-0002bK-JN for submit@debbugs.gnu.org; Thu, 06 Sep 2018 18:25:01 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:38968 helo=pdx1-sub0-mail-a22.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fy2hv-0002b7-Qn for 32607@debbugs.gnu.org; Thu, 06 Sep 2018 18:25:00 -0400 Received: from pdx1-sub0-mail-a22.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a22.g.dreamhost.com (Postfix) with ESMTP id DBD1E7E450; Thu, 6 Sep 2018 15:24:58 -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=Yeq3YivfD45Ssmz/13OjMXcjBE4=; b= Fw1+mEwpsa/3tfcOuVRfjdLuLuSIQOyEGLEQJ4guBfABz+tFoQ+4URiBYmCqPA7E 40M3dMHjxuktu9I4+nBJ7T+XGUA22kcozrQgvJBvnBoJADql57b9ygJj2d4kMGYa 4rgrOvCATZU4KdB1z9hE59SYJelYVzRNLcG2+Q6H7Pk= Received: from localhost.linkov.net (m91-129-106-97.cust.tele2.ee [91.129.106.97]) (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-a22.g.dreamhost.com (Postfix) with ESMTPSA id ECFFE7E44C; Thu, 6 Sep 2018 15:24:57 -0700 (PDT) From: Juri Linkov To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: 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> Date: Fri, 07 Sep 2018 00:56:51 +0300 In-Reply-To: <5B90D17D.5080605@gmx.at> (martin rudalics's message of "Thu, 06 Sep 2018 09:04:29 +0200") Message-ID: <87efe6iaws.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Isn't *grep* displayed somewhere when it shows up in the selected > window and also in some other window? Maybe the *grep* case is > special but I still fail to see why. 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 07 02:29:06 2018 Received: (at 32607) by debbugs.gnu.org; 7 Sep 2018 06:29:06 +0000 Received: from localhost ([127.0.0.1]:48688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyAGQ-0008D5-GM for submit@debbugs.gnu.org; Fri, 07 Sep 2018 02:29:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyAGO-0008CX-TL for 32607@debbugs.gnu.org; Fri, 07 Sep 2018 02:29:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fyAGG-000632-HI for 32607@debbugs.gnu.org; Fri, 07 Sep 2018 02:28:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyAGG-00062v-DC; Fri, 07 Sep 2018 02:28:56 -0400 Received: from [176.228.60.248] (port=4126 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fyAGG-0003ud-1F; Fri, 07 Sep 2018 02:28:56 -0400 Date: Fri, 07 Sep 2018 09:28:56 +0300 Message-Id: <83pnxpvn13.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-reply-to: <87efe6iaws.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 07 Sep 2018 00:56:51 +0300) Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32607 Cc: rudalics@gmx.at, 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Juri Linkov > Date: Fri, 07 Sep 2018 00:56:51 +0300 > Cc: 32607@debbugs.gnu.org > > 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. Can we please document all this? I don't see how could anyone glean all that from the available documentation. And I think it's high time to have next-error facilities described in all pertinent details in the ELisp manual. It is way too complex and powerful not to be mentioned there even as a hint. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 07 03:28:58 2018 Received: (at 32607) by debbugs.gnu.org; 7 Sep 2018 07:28:58 +0000 Received: from localhost ([127.0.0.1]:48711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyBCM-0001NC-1y for submit@debbugs.gnu.org; Fri, 07 Sep 2018 03:28:58 -0400 Received: from mout.gmx.net ([212.227.15.19]:55283) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyBCK-0001Mx-6n for 32607@debbugs.gnu.org; Fri, 07 Sep 2018 03:28:56 -0400 Received: from [192.168.1.101] ([212.95.5.234]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MN1j6-1fvzL43ZVY-006irE; Fri, 07 Sep 2018 09:28:46 +0200 Message-ID: <5B9228A3.4020700@gmx.at> Date: Fri, 07 Sep 2018 09:28:35 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> In-Reply-To: <87efe6iaws.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:Y4WR1uuxijM3XHGUEypjABU11ZspY7e/VysVM07afhAyNOFLujT Jt4xg9PXP26RreDkEfIVrgJS6Ntiuoril0VRYbTrN0bkKsEfmJ++sr3Gg5YSG+AtdDEUPFz GT+drOuDbSsmQ6IY9Mk3Hl4dkYf4xaaKl0zNA9p5p9InQKwCkjgqPutU1DbkEkrKV3SEBFR lJm1kql4mTDFFEmd3cvXQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:aecsjKHIchY=:eN5MYOFpNfBylvqCNH/ZvH ATEMfvjavUf4IZiWIvaEcac00IMDlUsr0B/lo25DF3zAapeTUg/TjQm6TrgCe/KDb3105p3Xp qKP2Aym1+1hZrvMbVLVi9xOR1LfrIdHGEute8e2tPSqNgtV3DFsTQwTMbnJNRZWkMVGYBCysc XZj4K0/4e+RAe4hWFhGIDXQy+swkqKc6WnCOesc4Vg1AliThHGTO5onfiN9lTQF5rscpLahlR sVf4wBfuFF6tWbP2XCw7ComqAxxv58lxEhJbtI8e4n36090HsK2sAItgfKzyDUoJf2dsL7C+D dp5tnt7gizvlthNAqEV2rRYtUO3czIQVGdEtnDYOIi7H8gK/g5Cv5ghMhWb31v04HiINTI22O dbj24Ie2TYkppj0jn5xEmUxi+mnjjm5FScqxNRS1yHYrD/sWUx2Xx0vjzPu0xrhYNB6gIMMBM 7sIO46CANsGVJzRO6I+MrFmpIvfB0pBITQYeJqw64qlTPG0LaPdtr2iQ/BCPW1YBkB0Ev5N/Q +Xln5hZLgYE9foL0wHFoQjKV+TP2IKrqRP6iax3ZEgmP1vjQid4TVWRaIXxqSE6R5Pw6bQO1L iHygjtLtBVyNK2QUfWYGn2Yg5H9OzsUOC0ZV1KdzikmPnFbHmC7i3Qycj5k+kIHrOWait6QC8 S0XTeQ1cqG5K6cvKjh2g2Zq2SF4OSM/SgKfVmaUlN2lfhaLbrRCVbP3wdA7Tj2SpDnZDnE1Ar 2j7a08PF1vH+BVNENoXFyi4esEpfP3iWQx2ZDQ1Co4yKItt0cgFgY4BbsfRms9j3aCXeg0jv1 /zFVJue X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 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. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 08 20:05:02 2018 Received: (at 32607) by debbugs.gnu.org; 9 Sep 2018 00:05:02 +0000 Received: from localhost ([127.0.0.1]:50692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fynDq-0005fu-3n for submit@debbugs.gnu.org; Sat, 08 Sep 2018 20:05:02 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:46894 helo=pdx1-sub0-mail-a34.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fynDo-0005fc-P5 for 32607@debbugs.gnu.org; Sat, 08 Sep 2018 20:05:01 -0400 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 D07197F3A0; Sat, 8 Sep 2018 17:04:59 -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:content-transfer-encoding; s=linkov.net; bh=QPIkiY g2ZKJYUZJEGFfKCnOOlfE=; b=GZtRVRRcagudniWqGn02t75Leada6j1xm+vZ86 VLVDpY1t0OH+KWF/4wplbG0NcFUWdH/TxWsdy8+V1XDgKWWThq+AWUARfCZvg3LH psYbl5dvkylW1flisgMkNtzt1AmmtPx8KSFhqKiFvuI4QIMVI1mEI7eJRVLfYirN +ZvJ4= 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 585D57F39C; Sat, 8 Sep 2018 17:04:57 -0700 (PDT) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: 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> <83pnxpvn13.fsf@gnu.org> Date: Sun, 09 Sep 2018 02:28:23 +0300 In-Reply-To: <83pnxpvn13.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 07 Sep 2018 09:28:56 +0300") Message-ID: <87in3f4lig.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: rudalics@gmx.at, 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> The special case is in next-error-no-select. Its purpose is to displa= y >> 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 err= ors) >> 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. > > Can we please document all this? I don't see how could anyone glean > all that from the available documentation. > > And I think it's high time to have next-error facilities described in > all pertinent details in the ELisp manual. It is way too complex and > powerful not to be mentioned there even as a hint. Whereas I helped to develop the next-error framework, I'm not its author, so I don't know the purpose of some parts, for example, I had no idea why next-error-no-select was implemented this way. I see that next-error-no-select is called from compilation-display-error, but don't understand why in grep mode the =E2=80=98n=E2=80=99 key is boun= d directly to next-error-no-select, but not to compilation-display-error. Also I see a glaring question mark in the comments of grep-mode-map asking why "\r" is bound to compile-goto-error, and unfortunately I have no answer. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 08 20:05:08 2018 Received: (at 32607) by debbugs.gnu.org; 9 Sep 2018 00:05:08 +0000 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 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 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= 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) From: Juri Linkov To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: 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> Date: Sun, 09 Sep 2018 02:46:51 +0300 In-Reply-To: <5B9228A3.4020700@gmx.at> (martin rudalics's message of "Fri, 07 Sep 2018 09:28:35 +0200") Message-ID: <87sh2j36jw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 09 01:45:25 2018 Received: (at 32607) by debbugs.gnu.org; 9 Sep 2018 05:45:25 +0000 Received: from localhost ([127.0.0.1]:50775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fysXF-0005bg-4V for submit@debbugs.gnu.org; Sun, 09 Sep 2018 01:45:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fysXD-0005bR-8X for 32607@debbugs.gnu.org; Sun, 09 Sep 2018 01:45:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fysX1-0000Bd-OT for 32607@debbugs.gnu.org; Sun, 09 Sep 2018 01:45:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fysWv-0000A8-Sm; Sun, 09 Sep 2018 01:45:07 -0400 Received: from [176.228.60.248] (port=1907 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fysWj-0007Pq-1Q; Sun, 09 Sep 2018 01:44:54 -0400 Date: Sun, 09 Sep 2018 08:44:58 +0300 Message-Id: <83r2i3ql5x.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-reply-to: <87in3f4lig.fsf@mail.linkov.net> (message from Juri Linkov on Sun, 09 Sep 2018 02:28:23 +0300) Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> <83pnxpvn13.fsf@gnu.org> <87in3f4lig.fsf@mail.linkov.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32607 Cc: rudalics@gmx.at, 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Juri Linkov > Cc: rudalics@gmx.at, 32607@debbugs.gnu.org > Date: Sun, 09 Sep 2018 02:28:23 +0300 > > > Can we please document all this? I don't see how could anyone glean > > all that from the available documentation. > > > > And I think it's high time to have next-error facilities described in > > all pertinent details in the ELisp manual. It is way too complex and > > powerful not to be mentioned there even as a hint. > > Whereas I helped to develop the next-error framework, I'm not its author, > so I don't know the purpose of some parts, for example, I had no idea > why next-error-no-select was implemented this way. I see that > next-error-no-select is called from compilation-display-error, > but don't understand why in grep mode the ‘n’ key is bound directly > to next-error-no-select, but not to compilation-display-error. > Also I see a glaring question mark in the comments of grep-mode-map > asking why "\r" is bound to compile-goto-error, and unfortunately > I have no answer. That's OK: partial documentation is better than no documentation. And we can ask those who were involved in those other parts to contribute their part of knowledge, whether by a patch or by describing the stuff here, so that someone else could then convert that to Texinfo. TIA From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 09 04:40:27 2018 Received: (at 32607) by debbugs.gnu.org; 9 Sep 2018 08:40:27 +0000 Received: from localhost ([127.0.0.1]:50813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyvGd-0001YB-4v for submit@debbugs.gnu.org; Sun, 09 Sep 2018 04:40:27 -0400 Received: from mout.gmx.net ([212.227.17.21]:53411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyvGb-0001Xy-AZ for 32607@debbugs.gnu.org; Sun, 09 Sep 2018 04:40:25 -0400 Received: from [192.168.1.101] ([46.125.250.125]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MEbYb-1g5o4n15Td-00Fn9A; Sun, 09 Sep 2018 10:40:16 +0200 Message-ID: <5B94DC6C.6090107@gmx.at> Date: Sun, 09 Sep 2018 10:40:12 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> In-Reply-To: <87sh2j36jw.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:0KkHH2PCn3z51Oh4ooz9jwkqX+8txk33c2UrlajxW7FblVxmi+S nNak7u5+vjCh3rkAamyOLoXbzVlLE8JTBLD7dTfjI2Sr4muZFfVqEcoa+IOq+5Gs7g6mujS TADgYtymvkcs67fEUXQ4mQfQK9Y0vb+myfNXC5p/sD/Kb/e9X1qttllKtvVlNNtW1+ykHCU xSA73aOob9RhkWuvlvogg== X-UI-Out-Filterresults: notjunk:1;V01:K0:pV/BxMfACkA=:mTzMZSg+83R5z3dxoW8Z8a PEu4s/W2Ei0LJU0YoM175cSzE7zvNkZ8oS43MDG/ccmoLae5zq144i5dt2rsCX36padURAtxW 9UAVURXovdtumbFIab5UuR+IvKLw4AT2KV/LXzKgpflyUeFsDs1urXC1AwWzf7pfQmwYiLGq2 7WtDOOe18DnlZqHGxiSvA8D2h9arnsL+Hmf0cyJytjWYBbMp6wt51aGlnycXIHsbmHfI9EXph cGshcG2UKYH5OQnaeuYkDUVdu2uiFUIduCh9pOYlevwsvL3qce6TQYn6EMU8ZKH781AByk/na VEQdkuJkbo6BIsjRUPDt9VC2e4pK0xoyznhL63ayhnDptLbOzZoWpv4PWKhfjNm4U5BdxJSwc 9wqMJcPnoiTFPd03rn0nhNa63N8SrLeYNXuPt05bNGkn3Ch1lBttQ+K39JskjPTiFlwDquXDz 7kC8x3zdnQj9PGkOsAncPH03EbRiUcs7bX+OeuASSLgITeG86kYN3KeGabGf1ShY14DOtGRdI cARYj6l8qQoH3cHr8v1jmC6w956FieEM7/gD3TXBbWk4OsdtBXG+VJ7C+sG2JgbbObusyeas7 P3XwwiQdUk+wEWvUZPjAb3FQB8nh8D8OqviCrkzEy1grt2BmiAf9U7JzgKJuYA5FvhFqlBtDB 8D1g7Xtq++G3i8VSwkdn+XJvpypEOFqvnjVnQqYsu+0bxLp1BAZoxJmGqEX0Dkz9eILOMjul9 yYT/MH50fp63iB4n1mnCsjQM3PDrJrmyw/ELBk7EvxTRcEJKvUV+9sM74Mmn2WHPc/ko1opUb dmSCeqG X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 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. I have no idea what the precise semantics of "visit" in Compilation Mode or the first line of the 'next-error' doc-string "Visit next `next-error' message and corresponding source code. are. I suspect that the initial idea of compilation mode was to keep or make the buffer with the error messages visible and pop to a window showing the error locus. Later on, the capability to keep the window with the error messages selected was added which means that the selected window jumps from that of the messages buffer to that of the locus buffer and then back to that of the messages buffer. That later capability seems to be that of 'next-error-no-select' whose doc-string should probably not say what the function does not ("Finds and highlights the source line like \\[next-error], but does not select the source buffer.") but rather what the function is supposed to do instead. I have no idea why the messges buffer should be made or kept visible (a user might want to keep a completely unrelated window selected and navigate the messages buffer from there with the help of some private key binding). If the purpose of 'next-error-no-select' is simply to not select the window of the locus buffer, then 'next-error-no-select' should no rely on 'next-error'. Rather we should provide a generic function to display the locus buffer and have 'next-error' select the window used and 'next-error-no-select' not select that window. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 09 12:17:01 2018 Received: (at 32607) by debbugs.gnu.org; 9 Sep 2018 16:17:01 +0000 Received: from localhost ([127.0.0.1]:51452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fz2OT-00072J-3w for submit@debbugs.gnu.org; Sun, 09 Sep 2018 12:17:01 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:37784 helo=pdx1-sub0-mail-a38.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fz2OR-00072B-QO for 32607@debbugs.gnu.org; Sun, 09 Sep 2018 12:17:00 -0400 Received: from pdx1-sub0-mail-a38.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a38.g.dreamhost.com (Postfix) with ESMTP id 9A5607F24E; Sun, 9 Sep 2018 09:16:58 -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=N8clLBCFdeaPtgglE6wo5xNbQ78=; b= V71HhDJMEe4T1igrwX11Vrv9INwEvGz07abrz7uJmbUqaWS49/2KqiDBPOgFrnl8 /2wWcSI8J5IBWAWtc6UnUCwuNCd3VoDeyLYpOeFMiL5JVKYge8mW4evAeGE+F0pm HxJV3KDGxiv27UKjSJiHa7NjKnys9vGwzCAD22qd9Oc= Received: from localhost.linkov.net (m91-129-104-147.cust.tele2.ee [91.129.104.147]) (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-a38.g.dreamhost.com (Postfix) with ESMTPSA id 2B3387F250; Sun, 9 Sep 2018 09:16:56 -0700 (PDT) From: Juri Linkov To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: 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> <87sh2j36jw.fsf@mail.linkov.net> <5B94DC6C.6090107@gmx.at> Date: Sun, 09 Sep 2018 19:01:05 +0300 In-Reply-To: <5B94DC6C.6090107@gmx.at> (martin rudalics's message of "Sun, 09 Sep 2018 10:40:12 +0200") Message-ID: <878t4awte5.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > If the purpose of 'next-error-no-select' is simply to not select the > window of the locus buffer, then 'next-error-no-select' should no rely > on 'next-error'. Rather we should provide a generic function to > display the locus buffer and have 'next-error' select the window used Maybe you mean something like (save-window-excursion (next-error)) From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 10 04:30:04 2018 Received: (at 32607) by debbugs.gnu.org; 10 Sep 2018 08:30:04 +0000 Received: from localhost ([127.0.0.1]:51725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fzHa7-0005wH-HR for submit@debbugs.gnu.org; Mon, 10 Sep 2018 04:30:03 -0400 Received: from mout.gmx.net ([212.227.15.18]:48953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fzHa3-0005vD-Qc for 32607@debbugs.gnu.org; Mon, 10 Sep 2018 04:30:00 -0400 Received: from [192.168.1.101] ([46.125.250.8]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M6jIK-1fcPZs0vvY-00wVVu; Mon, 10 Sep 2018 10:29:52 +0200 Message-ID: <5B962B7B.7090602@gmx.at> Date: Mon, 10 Sep 2018 10:29:47 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> <878t4awte5.fsf@mail.linkov.net> In-Reply-To: <878t4awte5.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:ufOtmg3Vd8+6jnG07Q97fSuRsF3El0DoE0V+0AHUlySSxlSrLKh 89d9WPgXsDnzW4hgxeOAGMCwKXE3VSYSuTkNXUAk+PALA3Ug/LbZ7VfOCqc3ncO7JJ4dGYu 93Nu7QJmFcn7ONEjkBZme65Y70w2Oyvh0Us530/8PYflRQSF7Ly9Q2RhT8cDARsOQL4aeNz QspjQOib22ikedixez6xg== X-UI-Out-Filterresults: notjunk:1;V01:K0:xzqwO7fPuj4=:badbUX5F+D2Gfqu/dsIn8c hZbYw/D/0PnZgGxT+hfz4N9gRseV7zAueOSDyLii5dERUjE4SN5v51Ld7xGqSaB+1+SgsgLDK uE38kHnHwKWwfILQgSQzun27t4IGrbck07U47S76NDVcpxoJ5tDUY6qqBQnCzwYVhO/NgkJEw G27ttEIEwkMcgW+WPvDifQFMDRuUuONjRFVmlee/R82empZMnCg27oyjlQzeO8Nmebt2QVAiq Ei8tcrsRtofw/XN5NwqfSTTIFMAN4N9Y+ty3cD21FvMyAPt1gneCxhJ7JcjFsNcUPkZaM7fy4 Y2ouu1niR8RGCS//JNBLFciDtwM/tdDmxoty+eA7dXvacNWr5eIsToZuiMyI2B8uVLlaWiAG7 Opvx8gXCsbvLXYdtCe7tkxqFWyE9ZCtf7q7cb/JXZlbObqLDzdTUoCDAKZu4bRVLGeUEdRxkT jgVQQTQMdtGTDtbgoZRnJDtGfLz0uZoZfPVZJebzUsnq9eFub8u9GGG7v3fWCD+3vl1pqJ/kj VZc+3PaPOF/qghvYJQvTDO7zLehXATIKI1XUyIJMHS6Vv5SZ1dAiYGyT5fu8PsXmz765fA61h yp+CaSlZYFL7Uwe9mK2wy9B4YgnR48wPXRZWpyRAxnxGzdO8oelcc6bluZtcCABUfGUCsGiOc gFVxxV51akZVMr5wLuFZEu+5TWtg5CvadEkIlkASQyXrHkunkyQ2uyRHugt46ffd47UZH4YE+ w94iCaAvONIdarL4rft643qiWvMXWvYcDQmO3HPw8gMOd35i84K+mBzYMt2oAee7wOyZCVAZN +P6sw6g X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> If the purpose of 'next-error-no-select' is simply to not select the >> window of the locus buffer, then 'next-error-no-select' should no rely >> on 'next-error'. Rather we should provide a generic function to >> display the locus buffer and have 'next-error' select the window used > > Maybe you mean something like > > (save-window-excursion (next-error)) Certainly not because that function may have to display the locus buffer in a new window. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 11 20:11:16 2018 Received: (at 32607) by debbugs.gnu.org; 12 Sep 2018 00:11:16 +0000 Received: from localhost ([127.0.0.1]:37443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fzskW-0005C2-9P for submit@debbugs.gnu.org; Tue, 11 Sep 2018 20:11:16 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:51220 helo=pdx1-sub0-mail-a38.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fzskU-0005Bu-H3 for 32607@debbugs.gnu.org; Tue, 11 Sep 2018 20:11:14 -0400 Received: from pdx1-sub0-mail-a38.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a38.g.dreamhost.com (Postfix) with ESMTP id A85007F267; Tue, 11 Sep 2018 17:11:13 -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=jynUc6OlBnHSrDACgrD2ZImiGEQ=; b= rjBKjrwqQyN3irwlQCx1K68rRrh0AmelX3QI7v7JcOyoa26/zCiHZe2Osdc9IDq0 AQwp7xle8B8s54/DLlsKZMeMy4NK1ZhCk6dV80OqMiJAtTfdzc7IARHR8OXniwD3 A+yTTnojdCvDyPTZUNBDQnl4R9FjjpHqdn3MikVNX6w= Received: from localhost.linkov.net (m91-129-104-147.cust.tele2.ee [91.129.104.147]) (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-a38.g.dreamhost.com (Postfix) with ESMTPSA id F17AE7F269; Tue, 11 Sep 2018 17:11:11 -0700 (PDT) From: Juri Linkov To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: 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> <87sh2j36jw.fsf@mail.linkov.net> <5B94DC6C.6090107@gmx.at> <878t4awte5.fsf@mail.linkov.net> <5B962B7B.7090602@gmx.at> Date: Wed, 12 Sep 2018 02:47:46 +0300 In-Reply-To: <5B962B7B.7090602@gmx.at> (martin rudalics's message of "Mon, 10 Sep 2018 10:29:47 +0200") Message-ID: <87zhwnoau5.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> If the purpose of 'next-error-no-select' is simply to not select the >>> window of the locus buffer, then 'next-error-no-select' should no rely >>> on 'next-error'. Rather we should provide a generic function to >>> display the locus buffer and have 'next-error' select the window used >> >> Maybe you mean something like >> >> (save-window-excursion (next-error)) > > Certainly not because that function may have to display the locus > buffer in a new window. All that I understood from this thread, is that since next-error-no-select window juggling involves two windows, it has to override the same-window user customization using display-buffer-overriding-action. Currently I see no other solution that don't involve more fundamental changes. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 12 03:02:37 2018 Received: (at 32607) by debbugs.gnu.org; 12 Sep 2018 07:02:37 +0000 Received: from localhost ([127.0.0.1]:37730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fzzAb-0007PB-Mu for submit@debbugs.gnu.org; Wed, 12 Sep 2018 03:02:37 -0400 Received: from mout.gmx.net ([212.227.17.22]:50075) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fzzAa-0007Ov-C6 for 32607@debbugs.gnu.org; Wed, 12 Sep 2018 03:02:36 -0400 Received: from [192.168.1.101] ([213.162.73.211]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lh7M3-1fWvYa1Z4x-00oagB; Wed, 12 Sep 2018 09:02:27 +0200 Message-ID: <5B98B339.1030503@gmx.at> Date: Wed, 12 Sep 2018 08:33:29 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> <878t4awte5.fsf@mail.linkov.net> <5B962B7B.7090602@gmx.at> <87zhwnoau5.fsf@mail.linkov.net> In-Reply-To: <87zhwnoau5.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:S+x6vG5872M+MNzU3MoQvCnALAK7kBWM0c1YQRIex1N0GEBesxa IsksrryBzz/hCJTGLTG4+vRISMHHWg8++oNsLxXIOHV9YTX64xHE90kmU1DWZ/5V+64PfcF CTjs48PItKExSze6WRllgkH+3wGBVf+BmXh2SPf3BYBX1816MBjAymBTKh1paBz+aq80smy Cw/1hZNcvmV4hlfySOxGg== X-UI-Out-Filterresults: notjunk:1;V01:K0:GbSX2Kf75+E=:QTq4zxmC4255epwkMz+CEX SxvCQRO214zBZEfm2UchCnRvUKiqHSupSMT6t2CW6NvSew45rEboe9TqXOaZDnYzoplLkOblj tO28hQzTwCOc1k1HBWVHWj7gFQzgGvvc0FP8LmkT4dgYug3Objtk+Rcy2Lt7MP16QsNM56dey ZEJt90b+D41985PclaoV7jo6ScnUcidSp8QtUfQcwh+iPCYIKt6myfKp+WX9pwQl3IyQjppra wjLzhdU28jIWp55IQryevZSgTu0c5Ix8XmiReIabVrjoDXCwjffUpiP3mM0TecpISFcemvpsZ 0HFfdCya98AwhMg8RQj1gjgLKXKjaAsh5niO4ZFF7EiRRwno7pAaSdXxoMdEb8KtRqj7MF7l3 3zxwYwUW+omvGGwVx0/ILl6mttNuCTbrrBZlyFFSQHwitQSSbghPLPS87+7QP3NHPaO1p8oB8 +shib7NFUXbBboSEmAWDheXOyLQ5FD6zkAGcEHrAZB+HCVLRRYZ2FcIGDOFp6F7SiHUWJG6T6 zd6qZEtG0Xh4Ot2ZSBTIdDghtjeiAwJRMmkUjQ1S/RwmkxDdbueDhzknKWlys0wgh3oEzBhES fSY5LpcnM2iPl0nyLgZJeoYcu350fSPAfm9cg3fQ0aWQIEkndABCph+cMZDiDWkjyLpudAPAq Kh3L93PkYhNbpmsWsebDE+g+gg1ACQh7TKN0Vc9Qa221AKRzR1Iz0OecQOzGkpF60AgiWyPv5 oDhh/fwL1dt18NV0DXqGlKooEX+pgTJaBffLuk2rfeBPBQL1cLU8NcvyeadohbPCOxi6k1Sc2 tBdckCi X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > All that I understood from this thread, is that since next-error-no-select > window juggling involves two windows, it has to override the same-window > user customization using display-buffer-overriding-action. Currently > I see no other solution that don't involve more fundamental changes. Agreed. Let's install the 'display-buffer-overriding-action' change and leave it there. martin From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 12 17:47:38 2018 Received: (at 32607-done) by debbugs.gnu.org; 12 Sep 2018 21:47:38 +0000 Received: from localhost ([127.0.0.1]:38503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0Cz4-0002MM-05 for submit@debbugs.gnu.org; Wed, 12 Sep 2018 17:47:38 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:32974 helo=pdx1-sub0-mail-a21.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0Cz2-0002ME-5r for 32607-done@debbugs.gnu.org; Wed, 12 Sep 2018 17:47:36 -0400 Received: from pdx1-sub0-mail-a21.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a21.g.dreamhost.com (Postfix) with ESMTP id 293B580003; Wed, 12 Sep 2018 14:47:35 -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=5PvG+2L3pFsdgc0ojND/G/4qJ7o=; b= OQXVzArKkDaPif/Bs+b13NHwTG+VptfEVNVNVIz+TEWlsiWKaOvJ+B9QNPxolRrd PW9Z4m6jkY5NjkKS/VV5v2C6J4kXAAtldneuK1Ylqr7otQmT/OfHGZS63KNjlgzY Bz/J1qJxl9khcKSIGDEd0bVh9/aQpXxnDTdnR4oGLDQ= Received: from localhost.linkov.net (m91-129-104-147.cust.tele2.ee [91.129.104.147]) (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-a21.g.dreamhost.com (Postfix) with ESMTPSA id 7C88B8001C; Wed, 12 Sep 2018 14:47:33 -0700 (PDT) From: Juri Linkov To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: 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> <87sh2j36jw.fsf@mail.linkov.net> <5B94DC6C.6090107@gmx.at> <878t4awte5.fsf@mail.linkov.net> <5B962B7B.7090602@gmx.at> <87zhwnoau5.fsf@mail.linkov.net> <5B98B339.1030503@gmx.at> Date: Thu, 13 Sep 2018 00:47:14 +0300 In-Reply-To: <5B98B339.1030503@gmx.at> (martin rudalics's message of "Wed, 12 Sep 2018 08:33:29 +0200") Message-ID: <87lg86e6cd.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607-done Cc: 32607-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> All that I understood from this thread, is that since next-error-no-select >> window juggling involves two windows, it has to override the same-window >> user customization using display-buffer-overriding-action. Currently >> I see no other solution that don't involve more fundamental changes. > > Agreed. Let's install the 'display-buffer-overriding-action' change > and leave it there. OK, done. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 12 18:04:03 2018 Received: (at 32607) by debbugs.gnu.org; 12 Sep 2018 22:04:03 +0000 Received: from localhost ([127.0.0.1]:38511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0DEx-0002lI-D6 for submit@debbugs.gnu.org; Wed, 12 Sep 2018 18:04:03 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:45514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0DEu-0002ks-Il for 32607@debbugs.gnu.org; Wed, 12 Sep 2018 18:04:02 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w8CM3wrs006919; Wed, 12 Sep 2018 18:03:59 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 9F56CAE08A; Wed, 12 Sep 2018 18:03:58 -0400 (EDT) From: Stefan Monnier To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> Date: Wed, 12 Sep 2018 18:03:58 -0400 In-Reply-To: <5B94DC6C.6090107@gmx.at> (martin rudalics's message of "Sun, 09 Sep 2018 10:40:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6372=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6372> : inlines <6876> : streams <1798271> : uri <2709192> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) IIUC next-error-no-select is provided so you can do `n n n n n` to display the various grep hits "in their habitats" while staying within the *grep* buffer. > If the purpose of 'next-error-no-select' is simply to not select the > window of the locus buffer, then 'next-error-no-select' should no rely > on 'next-error'. Rather we should provide a generic function to > display the locus buffer and have 'next-error' select the window used > and 'next-error-no-select' not select that window. Sounds right, Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 12 18:06:23 2018 Received: (at 32607) by debbugs.gnu.org; 12 Sep 2018 22:06:23 +0000 Received: from localhost ([127.0.0.1]:38515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0DHB-0002om-Qx for submit@debbugs.gnu.org; Wed, 12 Sep 2018 18:06:23 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:50795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0DH9-0002od-WC for 32607@debbugs.gnu.org; Wed, 12 Sep 2018 18:06:20 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w8CM6JLK018438; Wed, 12 Sep 2018 18:06:19 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id E65ECAE08A; Wed, 12 Sep 2018 18:06:18 -0400 (EDT) From: Stefan Monnier To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> Date: Wed, 12 Sep 2018 18:06:18 -0400 In-Reply-To: <5B94DC6C.6090107@gmx.at> (martin rudalics's message of "Sun, 09 Sep 2018 10:40:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6372=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6372> : inlines <6876> : streams <1798271> : uri <2709193> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > on 'next-error'. Rather we should provide a generic function to > display the locus buffer and have 'next-error' select the window used > and 'next-error-no-select' not select that window. BTW, it's not just a question of selection: "display the locus buffer" may also hide the source buffer, hence the need for the subsequent pop-to-buffer. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 12 18:22:20 2018 Received: (at 32607) by debbugs.gnu.org; 12 Sep 2018 22:22:20 +0000 Received: from localhost ([127.0.0.1]:38527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0DWe-0003Cw-1y for submit@debbugs.gnu.org; Wed, 12 Sep 2018 18:22:20 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:38868 helo=pdx1-sub0-mail-a21.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0DWc-0003Cp-HX for 32607@debbugs.gnu.org; Wed, 12 Sep 2018 18:22:18 -0400 Received: from pdx1-sub0-mail-a21.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a21.g.dreamhost.com (Postfix) with ESMTP id 841347FFD7; Wed, 12 Sep 2018 15:22:17 -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=hNLhHSPnHzpJwKKmxlfmbyjxvC8=; b= VHCoZBhdsCeBQphC/m10nitepODOmezWNBw5jmG5autOxy9tLrOjKKhd4dvLoarK icDCe80kG+UaZiSzpGyZaqZiJ0eKkxNYd5mt5biLt1LS89na2r7AK84kfPDwre6Q jY9Fa/EbxNwSX60WdeOuWTS3JxXKPuPzbWyg8EkNgI0= Received: from localhost.linkov.net (m91-129-104-147.cust.tele2.ee [91.129.104.147]) (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-a21.g.dreamhost.com (Postfix) with ESMTPSA id A82CA7FFE1; Wed, 12 Sep 2018 15:22:15 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: 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> <87sh2j36jw.fsf@mail.linkov.net> <5B94DC6C.6090107@gmx.at> Date: Thu, 13 Sep 2018 01:21:15 +0300 In-Reply-To: (Stefan Monnier's message of "Wed, 12 Sep 2018 18:03:58 -0400") Message-ID: <87d0tie4ro.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: martin rudalics , 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > IIUC next-error-no-select is provided so you can do `n n n n n` to display > the various grep hits "in their habitats" while staying within the > *grep* buffer. I checked that this workflow works correctly with the recent fix and the reported configuration. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 13 03:46:33 2018 Received: (at 32607) by debbugs.gnu.org; 13 Sep 2018 07:46:33 +0000 Received: from localhost ([127.0.0.1]:38691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0MKf-0000uS-3j for submit@debbugs.gnu.org; Thu, 13 Sep 2018 03:46:33 -0400 Received: from mout.gmx.net ([212.227.17.20]:36459) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0MKd-0000uG-42 for 32607@debbugs.gnu.org; Thu, 13 Sep 2018 03:46:31 -0400 Received: from [192.168.1.101] ([213.162.73.2]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M4Wwq-1fdS9w3TZ6-00yiua; Thu, 13 Sep 2018 09:46:20 +0200 Message-ID: <5B9A15C4.5010905@gmx.at> Date: Thu, 13 Sep 2018 09:46:12 +0200 From: martin rudalics MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:etNrjky9MLjLxukBZ60eu4on8jVqf539VRmkoQVTfLl4g0z4GJe UPLlLAg1x6N4/4TTaTgP5Gal6u3JmBBup3DZqGlq7aIhJr5gpyMzbEEWVaMwdE8x+p0AbXQ XwrIl0+xsD0MX6c7BMeEmS4XUn/+c+G3RnqcMg3q4hv7BbAqGBvhcnClD2+NoX+4OiW50Sc BFJ59sSTvsxlhl/SsBmLQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:lvdoUfoBSGg=:ENAQBcezUVTyZaxkl0JPpk 7jwtchuZMR03OMOxIz+d7pQpPiFkLf6li2H3UifNJCLHfHmni5IyDZCIhx7bwTbTR13Akab0s /5vBUZXDzw/dKqMEFhDHp85FMLls4aRcaPCtzvjORg53uM1arYpKozPVgPj1lFsI2n4PvLPnz LoMPTdfK5eRrD9AVpv+yIt4PysV/M087B+U3+o6kQXR4dFKGunfW+9OdSyavR/rgwlFUbeFFs rqUVjGX8bvoZ6Pwm/D3jxbeuc20/oljylLBNN1oFWCO6zLMqiaA9MpWWQuvRFde5oLlBWUS2M hOhMNYveWCkACO4mFTqD1FH0Zb0dFJf72Is842dIRPY74YE+eYR9/qu4eyh0xrHLLiaUrZ0jx yOo2DGO2c4KTNiyeTeSWGPc0T8zB90b2AKnKG64Eko4KPjW8+SzQ/C9+wp6gHFrvK8qUow+g3 y6uloTjXBjxTT16GLKg8qsuVhbCPMutqIKBHZxJzHRvDXouN0u8Eir1NIKISwOI56U+L4RJs1 zTWaWKOo4IKbPbnGoEn0Y5PbF8IR6RvixPRvAWmG7S7sB25Y8WW5NkaTnXiVslyHWu8Nlo0NS Mmn1giV07xHxtyk1NJp3Iz0Q9coKCscUHsLmoUs5X66q7lH9HrPhpVh/VHP1kx4Vg01upNbau U5xbyysDNFArsX0zXsd8/Fh7Fj5Vw8zTOZwd0GzZinLCHKJ48OMZKyqPey73ULsTEUjbmFGBi r+3c5lq5QX4FVLd93k6cec3iV9/xhOBeti2Qt9RClxVXCSJZO9XFEhQlw7FwuyXogI54l8HNk /08v6wmDxXgAEQ1qX9Gm9Kq2ti3QNe68DDU3Ar0M3/qhos+9k0= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > BTW, it's not just a question of selection: "display the locus buffer" > may also hide the source buffer, hence the need for the subsequent > pop-to-buffer. ... which may then hide the locus buffer. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 13 07:26:55 2018 Received: (at 32607) by debbugs.gnu.org; 13 Sep 2018 11:26:55 +0000 Received: from localhost ([127.0.0.1]:38775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0Plu-0006aU-Py for submit@debbugs.gnu.org; Thu, 13 Sep 2018 07:26:54 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:47233) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0Plt-0006aM-Ap for 32607@debbugs.gnu.org; Thu, 13 Sep 2018 07:26:54 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w8DBQpjS029941; Thu, 13 Sep 2018 07:26:52 -0400 Received: by pastel.home (Postfix, from userid 20848) id F20E16A663; Thu, 13 Sep 2018 07:26:50 -0400 (EDT) From: Stefan Monnier To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> Date: Thu, 13 Sep 2018 07:26:50 -0400 In-Reply-To: <5B9A15C4.5010905@gmx.at> (martin rudalics's message of "Thu, 13 Sep 2018 09:46:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6373=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6373> : inlines <6876> : streams <1798324> : uri <2709588> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> BTW, it's not just a question of selection: "display the locus buffer" >> may also hide the source buffer, hence the need for the subsequent >> pop-to-buffer. > ... which may then hide the locus buffer. Indeed. I guess for this reason next-error-no-select might want to let-bind display-buffer-overriding-action to something like (nil (inhibit-same-window . t)) during the call to next-error. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 13 19:22:02 2018 Received: (at 32607) by debbugs.gnu.org; 13 Sep 2018 23:22:02 +0000 Received: from localhost ([127.0.0.1]:39791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0avx-00027p-Tp for submit@debbugs.gnu.org; Thu, 13 Sep 2018 19:22:02 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:57470 helo=pdx1-sub0-mail-a31.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0avw-00027b-2g for 32607@debbugs.gnu.org; Thu, 13 Sep 2018 19:22:00 -0400 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id EBD7A7F977; Thu, 13 Sep 2018 16:21:58 -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=6E6gMgAjBmmLluqyUZHb2qlJY1Y=; b= zTkyoGLmQAajVn4UXmo2iFrck/YCZEdiMhO5ivF0WRoQy43Z1p+Ravd919CMjK8m wUSHBSnuKAQjftJbgP4lkJ/NrcbcHyAgrbkJWm/4dbhLKCWOfT/8uylru8lqFEHN XMunrRHIvOwiAzWPvHRrXOSe/KkQhhjWhTqJZ3Vl8wY= Received: from localhost.linkov.net (m91-129-104-147.cust.tele2.ee [91.129.104.147]) (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-a31.g.dreamhost.com (Postfix) with ESMTPSA id B15BA7F6F6; Thu, 13 Sep 2018 16:21:57 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: Stefan Monnier Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: 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> <87sh2j36jw.fsf@mail.linkov.net> <5B94DC6C.6090107@gmx.at> <5B9A15C4.5010905@gmx.at> Date: Fri, 14 Sep 2018 02:04:08 +0300 In-Reply-To: (Stefan Monnier's message of "Thu, 13 Sep 2018 07:26:50 -0400") Message-ID: <87y3c5ov87.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: martin rudalics , 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> BTW, it's not just a question of selection: "display the locus buffer" >>> may also hide the source buffer, hence the need for the subsequent >>> pop-to-buffer. >> ... which may then hide the locus buffer. > > Indeed. I guess for this reason next-error-no-select might want to > let-bind display-buffer-overriding-action to something like > (nil (inhibit-same-window . t)) during the call to next-error. Then the same overriding should be applied to both: diff --git a/lisp/simple.el b/lisp/simple.el index ffd7fcc067..17ebcb2e16 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -383,9 +383,10 @@ next-error-no-select Finds and highlights the source line like \\[next-error], but does not select the source buffer." (interactive "p") - (let ((next-error-highlight next-error-highlight-no-select)) + (let ((next-error-highlight next-error-highlight-no-select) + (display-buffer-overriding-action '(nil (inhibit-same-window . t)))) (next-error n)) - (let ((display-buffer-overriding-action '(display-buffer-reuse-window))) + (let ((display-buffer-overriding-action '(nil (inhibit-same-window . t)))) ;; Override user customization such as display-buffer-same-window ;; and use display-buffer-reuse-window to ensure next-error-last-buffer ;; is displayed somewhere, not necessarily in the same window (bug#32607). (pop-to-buffer next-error-last-buffer) From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 13 21:34:29 2018 Received: (at 32607) by debbugs.gnu.org; 14 Sep 2018 01:34:29 +0000 Received: from localhost ([127.0.0.1]:39852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0d09-0005Vd-0A for submit@debbugs.gnu.org; Thu, 13 Sep 2018 21:34:29 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:32984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0d07-0005VU-2E for 32607@debbugs.gnu.org; Thu, 13 Sep 2018 21:34:27 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w8E1YPrU027316; Thu, 13 Sep 2018 21:34:25 -0400 Received: by pastel.home (Postfix, from userid 20848) id F30096A66C; Thu, 13 Sep 2018 21:34:24 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> Date: Thu, 13 Sep 2018 21:34:24 -0400 In-Reply-To: <87y3c5ov87.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 14 Sep 2018 02:04:08 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6373=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6373> : inlines <6878> : streams <1798380> : uri <2709965> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32607 Cc: martin rudalics , 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> Indeed. I guess for this reason next-error-no-select might want to >> let-bind display-buffer-overriding-action to something like >> (nil (inhibit-same-window . t)) during the call to next-error. > > Then the same overriding should be applied to both: > > diff --git a/lisp/simple.el b/lisp/simple.el > index ffd7fcc067..17ebcb2e16 100644 > --- a/lisp/simple.el > +++ b/lisp/simple.el > @@ -383,9 +383,10 @@ next-error-no-select > Finds and highlights the source line like \\[next-error], but does not > select the source buffer." > (interactive "p") > - (let ((next-error-highlight next-error-highlight-no-select)) > + (let ((next-error-highlight next-error-highlight-no-select) > + (display-buffer-overriding-action '(nil (inhibit-same-window . t)))) > (next-error n)) > - (let ((display-buffer-overriding-action '(display-buffer-reuse-window))) > + (let ((display-buffer-overriding-action '(nil (inhibit-same-window . t)))) > ;; Override user customization such as display-buffer-same-window > ;; and use display-buffer-reuse-window to ensure next-error-last-buffer > ;; is displayed somewhere, not necessarily in the same window (bug#32607). > (pop-to-buffer next-error-last-buffer) The first inhibit-same-window should hopefully make the second unnecessary. If the first fails to do its job or somehow indirectly causes the original buffer not to be displayed in the original window, I'm not really sure what we should do about it. IOW, for the second part I'm not sure either of display-buffer-reuse-window or inhibit-same-window is clearly superior to the other. Maybe to get closer to "the ideal", we should go for something like: (let* ((orig-window (selected-window)) (orig-buf (window-buffer orig-window))) (let ((next-error-highlight next-error-highlight-no-select) (display-buffer-overriding-action '(nil (inhibit-same-window . t)))) (next-error n)) (cond ((eql (window-buffer orig-window) next-error-last-buffer) ;; inhibit-same-window did its job, we can just return to the original ;; window. (select-window orig-window)) ((eql orig-buf next-error-last-buffer) ;; Somehow the original window was affected by `next-error`, so ;; we need to work harder to bring the buffer back. (select-window orig-window) (pop-to-buffer-same-window next-error-last-buffer)) (t ;; Something weird is going on. We don't really know where we were ;; (orig-window was not showing the buffer where we were supposed ;; to "stay"), so let's just try and keep both buffers displayed ;; while at the same time trying not to gratuitously creating new ;; windows either. (let ((display-buffer-overriding-action '(display-buffer-reuse-window (inhibit-same-window . t)))) (pop-to-buffer next-error-last-buffer))))) But maybe we should instead trust inhibit-same-window to do its job and go for a simple: (save-selected-window (let ((next-error-highlight next-error-highlight-no-select) (display-buffer-overriding-action '(nil (inhibit-same-window . t)))) (next-error n))) -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 15 19:49:30 2018 Received: (at 32607) by debbugs.gnu.org; 15 Sep 2018 23:49:30 +0000 Received: from localhost ([127.0.0.1]:41820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1KJe-00039l-6P for submit@debbugs.gnu.org; Sat, 15 Sep 2018 19:49:30 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:37888 helo=pdx1-sub0-mail-a20.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1KJc-00039d-M4 for 32607@debbugs.gnu.org; Sat, 15 Sep 2018 19:49:28 -0400 Received: from pdx1-sub0-mail-a20.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a20.g.dreamhost.com (Postfix) with ESMTP id DB7518103A; Sat, 15 Sep 2018 16:49:27 -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=nAhpcwYaF1qEm2GZS8+xafKWen0=; b= BLD8fh76Q1HeS6gSdV8M8HF3NAh1PoY30bkZThjcGUKckeV4xC/qiYnWOk8IEsLl 8sHBcqh529IS3m7fwLna+kXF7MBtKGFutI8Q5+/tC5+2IvH+bdHSexe1tzUfdQLN b8WI/6wooeTpbeolJF0QRgA1QVdOZcOmVkg4VYKikrY= Received: from localhost.linkov.net (m91-129-107-237.cust.tele2.ee [91.129.107.237]) (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-a20.g.dreamhost.com (Postfix) with ESMTPSA id CBAB580236; Sat, 15 Sep 2018 16:49:25 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a20 X-DH-BACKEND: pdx1-sub0-mail-a20 From: Juri Linkov To: Stefan Monnier Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Organization: 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> <87sh2j36jw.fsf@mail.linkov.net> <5B94DC6C.6090107@gmx.at> <5B9A15C4.5010905@gmx.at> <87y3c5ov87.fsf@mail.linkov.net> Date: Sun, 16 Sep 2018 02:31:44 +0300 In-Reply-To: (Stefan Monnier's message of "Thu, 13 Sep 2018 21:34:24 -0400") Message-ID: <878t42z5tz.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32607 Cc: martin rudalics , 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > The first inhibit-same-window should hopefully make the > second unnecessary. If the first fails to do its job or somehow > indirectly causes the original buffer not to be displayed in the > original window, I'm not really sure what we should do about it. > IOW, for the second part I'm not sure either of > display-buffer-reuse-window or inhibit-same-window is clearly superior > to the other. > > Maybe to get closer to "the ideal", we should go for something like: > > (let* ((orig-window (selected-window)) > (orig-buf (window-buffer orig-window))) > (let ((next-error-highlight next-error-highlight-no-select) > (display-buffer-overriding-action '(nil (inhibit-same-window . t)))) > (next-error n)) > (cond > ((eql (window-buffer orig-window) next-error-last-buffer) > ;; inhibit-same-window did its job, we can just return to the original > ;; window. > (select-window orig-window)) > ((eql orig-buf next-error-last-buffer) > ;; Somehow the original window was affected by `next-error`, so > ;; we need to work harder to bring the buffer back. > (select-window orig-window) > (pop-to-buffer-same-window next-error-last-buffer)) > (t > ;; Something weird is going on. We don't really know where we were > ;; (orig-window was not showing the buffer where we were supposed > ;; to "stay"), so let's just try and keep both buffers displayed > ;; while at the same time trying not to gratuitously creating new > ;; windows either. > (let ((display-buffer-overriding-action '(display-buffer-reuse-window > (inhibit-same-window . t)))) > (pop-to-buffer next-error-last-buffer))))) I see that such explicit handling even supports the case when next-error-last-buffer gets changed on different frames (when using next-error-buffer-on-selected-frame). > But maybe we should instead trust inhibit-same-window to do its job and > go for a simple: > > (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. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 16 05:10:00 2018 Received: (at 32607) by debbugs.gnu.org; 16 Sep 2018 09:10:00 +0000 Received: from localhost ([127.0.0.1]:41915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1T44-0000cX-FC for submit@debbugs.gnu.org; Sun, 16 Sep 2018 05:10:00 -0400 Received: from mout.gmx.net ([212.227.17.22]:43351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1T42-0000cJ-36 for 32607@debbugs.gnu.org; Sun, 16 Sep 2018 05:09:58 -0400 Received: from [192.168.1.101] ([212.95.5.6]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LhTjQ-1fWp8x1Cts-00manz; Sun, 16 Sep 2018 11:09:43 +0200 Message-ID: <5B9E1DD4.8090802@gmx.at> Date: Sun, 16 Sep 2018 11:09:40 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov , Stefan Monnier Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> In-Reply-To: <878t42z5tz.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:yzObkwSmirNzajregnnv4hBcAWnTuD/pswNF14Oslv2WMS5vA/u b+MR2t7EdZiAxoz+QI9v5RWOdjOjvIyyAcnE+qmgVdrz6QDXLoTtu7zgCVg1WXuIDX6XxxW /+8tcbBD8GqQezfF/fFyV+Ny+RCCD+Z7joACXWyZb09GoTbheDQNTo+/60QcDpeUflo2d3m I5GUW5VNhIZntRV3w+59g== X-UI-Out-Filterresults: notjunk:1;V01:K0:Bsnur9LuxJQ=:rcjr2/qMiikb6Dy3FMI4kG aBI91Z82FLb9hdxJQSIDbYWNy6vumhPnZKSShAlksAdsTxE4PURdgXK9Mvt2DONhIb/DrqZR1 WGbtz5giy7fpMAegFTlSkKVGqvKxLln/cB4nhgGG/8MwAqUeR/N5mXtsIQ2XqQfOkEZHSEqE4 Nj7W1ZjBd5DnsV3swXlGeyW9pxVkIW0Dtpa+EPxnt2A4H6CEwRUG3NsDYzDUooTnJx2rU/OSG sGzXrxMaO310CZtHIlKOtW4n9f1sheHdh7P4AHXN71tKUNhyoPqMRR3APEwwuXTTwrVTMUdcT 1sMc/Y9PQxD9sw5UFC0/DtHk9giGulcnlE4X9aR/FIgdMs3uSWtAtzPZHF44aRyBrTN0eIalg u7lN/YJVxEojn2GMoKQsp7lzqfFaSURExyZxonTtmYWq0vy5PG9CPbiPpEAqwK4FA4M7Uw5f7 GLU6OF+eUaSynPuM75r0swZqV+4KgjdwftxHCx93ZtTXUh907nsYcD3ui1RQmlsr8c84YxSCV CezHnNKEWYrL3XdfHY8bAxSISVfg4xMY33ozjleLqNtAZl5MoSF6lEmUPSjTNtZ76wAzal1b6 RfdLMYiRSBAGSY8T2STdjbcakSgZTJWz5Qq4+52DAazdh3CJW0EMFRoWM+nsY70oqNquCOCjo CqXwu280DFqwbSDH3Pyn3oMt7IFgXxO9t6Da13N43BFySGRb1kv98P4xmphYoeUJeQrFGHQre d/O362jekUHI2+fO/9GuYBCmCxAgE3tqSL5ZVyC+M+euQCRDLnfNFuAJmh9ra27yu6A+Z50Xd 6VWWCxeRn4MKBc13PiIJvJmyz6/254JQynpRVt+X8EP3Cu4B/k= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> But maybe we should instead trust inhibit-same-window to do its job and >> go for a simple: >> >> (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. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 16 17:19:33 2018 Received: (at 32607) by debbugs.gnu.org; 16 Sep 2018 21:19:33 +0000 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 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: =?us-ascii?q?A2HHBQAKyJ5b/0mKs2tbHgEGDIFQggiBP?= =?us-ascii?q?yWISoREi0kBgh8gAZYXgXoLE4RTBAICg14iNBgBAwEBAQEBAQICAmkoQgwBhGs?= =?us-ascii?q?GViMQCzQSFBgNJC6FCKUcigGLBIIAhCSKVgKcRAmQLIhahjOUT4FCOYFVMxoIM?= =?us-ascii?q?IMokG4jhCGKQAEB?= X-IPAS-Result: =?us-ascii?q?A2HHBQAKyJ5b/0mKs2tbHgEGDIFQggiBPyWISoREi0kBgh8?= =?us-ascii?q?gAZYXgXoLE4RTBAICg14iNBgBAwEBAQEBAQICAmkoQgwBhGsGViMQCzQSFBgNJ?= =?us-ascii?q?C6FCKUcigGLBIIAhCSKVgKcRAmQLIhahjOUT4FCOYFVMxoIMIMokG4jhCGKQAE?= =?us-ascii?q?B?= X-IronPort-AV: E=Sophos;i="5.53,382,1531800000"; d="scan'208";a="45808847" 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 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id BC258AE222; Sun, 16 Sep 2018 17:19:24 -0400 (EDT) From: Stefan Monnier To: martin rudalics Subject: Re: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select 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> Date: Sun, 16 Sep 2018 17:19:24 -0400 In-Reply-To: <5B9E1DD4.8090802@gmx.at> (martin rudalics's message of "Sun, 16 Sep 2018 11:09:40 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 32607 Cc: 32607@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>> (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 From unknown Thu Sep 11 21:35:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 15 Oct 2018 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator