From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#45688: 28.0.50; New action for display-buffer? Date: Fri, 8 Jan 2021 09:31:28 +0100 Message-ID: <6859d73c-da77-af77-481f-3046d5195d53@gmx.at> References: <87im8a1dff.fsf@gnus.org> <83y2h6133r.fsf@gnu.org> <8735ze0yp7.fsf@gnus.org> <83o8i20w1f.fsf@gnu.org> <87lfd5yny9.fsf@gnus.org> <87ft3cpoy9.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11270"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45688@debbugs.gnu.org To: Juri Linkov , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 08 09:32:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kxnBq-0002Sy-NP for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Jan 2021 09:32:10 +0100 Original-Received: from localhost ([::1]:40160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxnBp-0004V2-Gk for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Jan 2021 03:32:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxnBi-0004Uo-6B for bug-gnu-emacs@gnu.org; Fri, 08 Jan 2021 03:32:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxnBh-00012r-Ts for bug-gnu-emacs@gnu.org; Fri, 08 Jan 2021 03:32:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kxnBh-0005Qq-PU for bug-gnu-emacs@gnu.org; Fri, 08 Jan 2021 03:32:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Jan 2021 08:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45688 X-GNU-PR-Package: emacs Original-Received: via spool by 45688-submit@debbugs.gnu.org id=B45688.161009469920849 (code B ref 45688); Fri, 08 Jan 2021 08:32:01 +0000 Original-Received: (at 45688) by debbugs.gnu.org; 8 Jan 2021 08:31:39 +0000 Original-Received: from localhost ([127.0.0.1]:49237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxnBL-0005QD-1K for submit@debbugs.gnu.org; Fri, 08 Jan 2021 03:31:39 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:35195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxnBJ-0005Pz-32 for 45688@debbugs.gnu.org; Fri, 08 Jan 2021 03:31:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610094690; bh=CkJxuKjEGK99uLDWQYqkg4b1n6YVGhKKwtnPPMGk1ho=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=REsPLkJZqPJb1d1aEtdBSiuhqmAw75Q0B/+QUntUcBODgHl/f32PaCgPauY0UaEsW 7f7MUVc/PDTsI5Bhg6dcgBie0AsZPDMglUqIqsuxi/NMmuZFQMacY4XjMtrxUDQnuW Q871+TPSZC/+feszfvSW8cF+5VGCMURkITx8uaY0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.50]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mirna-1kLQ613pSO-00esCl; Fri, 08 Jan 2021 09:31:30 +0100 In-Reply-To: <87ft3cpoy9.fsf@mail.linkov.net> Content-Language: en-US X-Provags-ID: V03:K1:2Ej5oNb+xTJCj/KLJ+oxU+hISItxYJG7BPggOTo7MobjHmp8f6I iEY3SmuZZYEHy8K6p/fE4HW2xnC9Qvh1X4TxgHwo1+Yw0WlctnCeEcQAb/ixOw2iC+MXLZ0 KaMgRtCmz6VHDd5fBXQEwDCpOxlagGehcC/npVJA5977H643R6YU3lpA0KiQ8oEyUfRFkUw 4MYrSIrJyU4/+vAvxgoGg== X-UI-Out-Filterresults: notjunk:1;V03:K0:d2BlsWh5wBk=:f9OV8dK3lWLxDynRnXvIei RTFK+d85CekkoFZjiGiyMBPbxUriGqmc6Q42XDizAlKs9oCMXhQ9/mQGJP28A7jnAoWQL+HCz zSvkPKlZ+f2pTItjyPYyDkAkzm2dO8/p9ldUB01sGn/oXquIm9mJWaLFfgnt+CrNFvQufMD/r 6va89sfuasKTFzX3swVeirl6bcQCp3CcwuDKeq0ficrvjfngn9+jEbz5XCNoVfUmhnFtSG35S BIHJOEU7Qvj3GZXkfFAMR0Ms/rMOtF7+zSU76OnNVPyPo0/1HEzx+xDoHWqmyVOsF57rgw2TY 3+u24zu2hf6GBhkp/+hPB8BvOxnSEnE0LnNDR/XkXMN+JwuLXoIH9QqahaHpg4JyIK67I43RL Ri3j2m02lsC0RYKZooP5Fjy+QZ+Mw74NZKOd8dBqZAOItQo1DaW1mnNZT/xOPEn2OSLXcyrSq hfcLFTpJVgk0hG/49qEUNuK57Ogq1bkmyA0bJ++H9w9CHQ2qC7GImL9LMsVqrNgPDv3g3s4wY 1VvuKfG2eBcXOoukOpnPmwYK1a2G+bdI8SJ1m7o339pIkAHPA7RyBjN3RzutWjxIxSdf8k/HI 1PiaPRzy4POTE2U/+bg1L28ILW9c58FnauB9PmMZ9HXhGMEywAQcYdF/oxLpTUguMkm3bOFAP KLe71Cy5rmC6ElZ6KE8YaJd9dccIGC70/WYSKFYPnvuhm2HgIb1+DXTJdKCVWy3YC3IPnyF1U wgxM8Er91Nf0f1lwgEslnJgF9Z8RxwAdkUBGVF1RppbAQ0krbq9zhkz5uVTt7jwVdKwJ3qRz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197514 Archived-At: > XEmacs does absolutely the wrong thing. When I have a window > with a source buffer, then run grep in another window, then > want to visit grep hits in the third window, visiting > the next file from the grep window obscures the window > with the source buffer, it doesn't use the same window > where I'm visiting grep hits. We're asking too much from 'display-buffer' here. It can't second-guess a user's intentions in particular with the interpretation of grep and xref hits. I see three basic patterns here: - a hit is detected in a buffer currently shown but that window's point is the position where I want to continue to work - show the hit in another window, - a hit is detected in a buffer currently shown and I don't care about that window's current point - move that window's point to the hit, - one or a few hits are already shown in windows and I would like to either compare them or at least for the moment not lose any of these windows (no matter how small they are) - try popping up yet another window. Do you have more? In either case, I cannot generally predict beforehand which of these will apply in a specific situation so I'd like to see some versatile grep/xref-DWIM layer that handles these patterns ad hoc, possibly assisted by some simple M-g binding. But we have to identify all potentially useful patterns first. > I tried to replace get-lru-window with get-mru-window > but it selects the current window which is mru indeed, > but makes no sense - what is needed is mru-1, then > I tried to set the arg NOT-SELECTED of get-mru-window to t > in display-buffer-use-some-window, then it works sensibly. Neither of these will catch all needs: mru-ish replaces the previous hit found, lru-ish the oldest hit found so far. Any of these might be the most interesting one found so far. martin