From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#28814: [BUMP, PATCH] (26.0.90; When *xref* window is needed, original window-switching intent is lost ) Date: Wed, 25 Oct 2017 13:24:01 +0300 Message-ID: <4b46c989-f94e-a5ce-9264-069c34096419@yandex.ru> References: <87infjm3p3.fsf@gmail.com> <871slyi3lk.fsf_-_@gmail.com> <87lgk22ryu.fsf@gmail.com> <87fua91vis.fsf@gmail.com> <13af136e-12fb-4e8d-81ff-63424b1e1943@yandex.ru> <87y3nzu0xu.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1508927131 11905 195.159.176.226 (25 Oct 2017 10:25:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Oct 2017 10:25:31 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 Cc: 28814@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 25 12:25:26 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7IsA-00019A-5b for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Oct 2017 12:25:18 +0200 Original-Received: from localhost ([::1]:47535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7IsF-0005sg-Li for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Oct 2017 06:25:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7Is1-0005nL-TW for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 06:25:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7Iru-0005Fu-RT for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 06:25:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51983) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7Iru-0005Fe-DQ for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 06:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e7Irt-0007c8-UJ for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 06:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Oct 2017 10:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28814 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28814-submit@debbugs.gnu.org id=B28814.150892705429182 (code B ref 28814); Wed, 25 Oct 2017 10:25:01 +0000 Original-Received: (at 28814) by debbugs.gnu.org; 25 Oct 2017 10:24:14 +0000 Original-Received: from localhost ([127.0.0.1]:60664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Ir7-0007ab-On for submit@debbugs.gnu.org; Wed, 25 Oct 2017 06:24:14 -0400 Original-Received: from mail-wm0-f43.google.com ([74.125.82.43]:55271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Ir4-0007aH-Sb for 28814@debbugs.gnu.org; Wed, 25 Oct 2017 06:24:11 -0400 Original-Received: by mail-wm0-f43.google.com with SMTP id r68so910582wmr.3 for <28814@debbugs.gnu.org>; Wed, 25 Oct 2017 03:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0YWWuZKPDOpFWLUZRAnf9X2Ig36dHV7wKTY20gc/qVA=; b=CiJkhIgaxqMd6Rr6a+L5xfVEGofGQb0yemdsumDYe4kvgrv6Nr44WnioLEYlqwpEGY XHX0D8vsQ/BzEH58ibofL/UbMJNta1QGJWchQRNv90XpceqkVc8b+QARXkVvIQaY/vXQ XDAks0QFo9teipfqfrM6lzCHOL+wAAWVqzgC95aoSMXOPVjfpjNleUj3f+O41NsRMKu5 3G5bwznw2xNdZInlbaIc91vb8q5sORRkgYkKxj6KJna8JYQMaAsytqKoONIAM7CI29v0 8QzGmb0oJAstp/mDwp3LotSjYUFyz/r16EnxxaBmsxa8k1ICEKQ3IkL+AYi8xcUYI3tV 7n8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0YWWuZKPDOpFWLUZRAnf9X2Ig36dHV7wKTY20gc/qVA=; b=TRGOs+XB/se5FkLc2rP76ZkwXdA1ih7IZd1simph94vdCJyIZ3VETz47PEmGw6POGs O30gmJXcwus2X6Ihjq20SBED+5vSlTgRLciVNHym0TlWyFJTQr7XZiO+mIm2Irz66mbi qmtbOAU7oGABJ6naWtJ7hhtE+gVkh5n3I2rS571P1gCnBeG/RVNyw8LHDNgNVT3fX+Ib 4gAS1Emdp7A4o0j/Ec3ciOSJDA9ibbK4yOebOoKeT0EM0BiNnB1jQhQozp30hX98a+az GEdwebrgBWGNiT/ESbJRHZP72fpwNRCRoYlAvqeiE4YYgkamO071KMVkS3PhWLHslP6W nqmQ== X-Gm-Message-State: AMCzsaW48UxE4tRXSIfW+PeANLTL1RmdrLZBiGwjyZ1DzIBbv+RjRkq7 eToBqI12WJKAXS5vuTW717jeHKWi X-Google-Smtp-Source: ABhQp+SzIH750Ej1AJpY7UZ/MtyE6nTfmVs49jEybZ3icCbFU+If2nkciqMJuwunkZlKAhq80LpD8w== X-Received: by 10.80.186.29 with SMTP id g29mr19551593edc.206.1508927044812; Wed, 25 Oct 2017 03:24:04 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id s6sm1688154edc.2.2017.10.25.03.24.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 03:24:03 -0700 (PDT) In-Reply-To: <87y3nzu0xu.fsf@gmail.com> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138952 Archived-At: On 10/25/17 10:43 AM, João Távora wrote: >> OK, but is it the correct thing to do? The thresholds are there for a >> reason, and having a window that's only a few lines tall (which could >> happen in some example) will hardly be more helpful than showing it in >> a different window, even if the user expected xref to use the "other >> window". > > Well, I don’t think it’s that bad if a tiny window pops up, considering: Yeah, maybe it's not too bad. Like I said, no strong objections. > I see, there’s prior art here. You approach is much more ambitious than > mine and given the hairiness of window code, it’s no wonder it didn’t > work well, if you will excuse the hindsight 20/20 :-) It would have given a more consistent mental model, though. And it's something that corresponds to some users expectations already. Think Ctrl-P or "Goto Definition" preview in Sublime Text. You can look at the destinations and pick one, or not pick anything, and the tabs list would be intact. > If it helps, this itch didn’t pop out of thin air: as you know, xref.el > is lifted from SLIME’s UI. SLY, my fork of SLIME, does the same, and a > user complained about SLY’s use of popup windows in a way that finally > convinced me. See https://github.com/joaotavora/sly/issues/121 I agree that it might be a step forward, and help you retain some main aspects of behavior that the users are accustomed to. I just wish it was a step toward a more well-rounded UI. >> If there are other non-dedicated windows, will one of them be used >> (that would seem fine)? > > Yes, of course, in keeping with the current spirit that splitting a > small window is a last resort before popping a frame. Good. >> I have to wonder if we have other commands that quit the current >> window when called with a prefix. Particularly commands bound to RET. > > I see, it’s a bit odd indeed, but I had no idea of any kind of rule or > policy in that direction. If we don't, maybe we should. Consistency in the way modes work is a good thing, and allows the user to adapt to each of them much quicker. Not to mention having to keep the effects of different bindings in memory (both muscle and cranial). > Anyway, In the thread you pointed me to, there was talk of an ’a’ > command but I never saw it. It was some hypothetical > xref-quit-and-goto-xref. I’m perfectly fine with implementing that > instead. But 'a' (correct me if I'm wrong) normally replaces a buffer in the *current* window. And kill the previous buffer. > Of course my priority goes towards RET doing xref-quit-and-goto-xref and > something else doing xref-goto-xref. If that default isn’t changed, I’ll > probably to that remap in my init file.. So you'd always use "something else" to navigate to project-find-regexp search results?