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 03:07:56 +0300 Message-ID: References: <87infjm3p3.fsf@gmail.com> <871slyi3lk.fsf_-_@gmail.com> <87lgk22ryu.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 1508890162 22289 195.159.176.226 (25 Oct 2017 00:09:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Oct 2017 00:09:22 +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 02:09:17 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 1e79Fp-0003bm-Bw for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Oct 2017 02:09:05 +0200 Original-Received: from localhost ([::1]:45993 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e79Fw-00046H-ED for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Oct 2017 20:09:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e79Fq-00046A-9H for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2017 20:09:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e79Fm-0002m3-Sz for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2017 20:09:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51741) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e79Fm-0002lu-Nx for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2017 20:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e79Fm-00040a-FZ for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2017 20:09: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 00:09:02 +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.150889008715328 (code B ref 28814); Wed, 25 Oct 2017 00:09:02 +0000 Original-Received: (at 28814) by debbugs.gnu.org; 25 Oct 2017 00:08:07 +0000 Original-Received: from localhost ([127.0.0.1]:60422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e79Es-0003zA-Pw for submit@debbugs.gnu.org; Tue, 24 Oct 2017 20:08:07 -0400 Original-Received: from mail-wr0-f169.google.com ([209.85.128.169]:47004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e79Eq-0003yg-Ry for 28814@debbugs.gnu.org; Tue, 24 Oct 2017 20:08:05 -0400 Original-Received: by mail-wr0-f169.google.com with SMTP id l1so22312317wrc.3 for <28814@debbugs.gnu.org>; Tue, 24 Oct 2017 17:08:04 -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=Ewe8F0WB89CB/5h84RtcYJs0lOMpx9L2CccZmF+q5sY=; b=bibP/ATImrkapvL7KyLQN2rGhIReedJjmYCBQ4IRwaDp9vXaKUlSyC6ILnMCVq/qSh 3zpEk14aUUSqcjNacHTR6pbT0OW6eWUqV/OtsfDdBF9uc/BNDnqqNG0LkiHNo5weCFzW edX/K3IqfNC7Dfb+FP8z84scROoroNj/i/6Y+GHJr/brrB9pyyIzjL7IagtWfzYMwTRK V0arKqTofgKsqexTg8molgqgcVC/e7ZbT/EUMPnotkV5T14eclQu0AG+1okfTBbifyyQ 9uDj7sy2He18KzDN9VIxzdfK0Gz2/S4By9ulOA1kR+a5ULbok3yXER1AuDlU+LjmJDmK RVLA== 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=Ewe8F0WB89CB/5h84RtcYJs0lOMpx9L2CccZmF+q5sY=; b=owHVMjliML2HZnBIMM/jDrBKXGUy9BN6Qrv3q5/2FEXJYamHJAh9Wi2C6aNjT1U70Z PLF6Pkq78216AgnqDNjXsXeifvm17YhOLOI9400/SKEwI19NnIbYjMdJ17gaK2OKjHp+ fR71Km4Wq72BrsIWZF6uGvPZ7jYU6ygXJcL3Q9OkYFBg68AMC8BNFl0PeA2Vh8hiMmdl S5Hb1JS3mrHcUbIq94wYl5nWlorlaAG1sr+3UOr8+AgZEOAtNU/zJ4+tJmI8CFVp518u pqwdM00ZDSwVZ/kFAEK4A9fn7A634fDmpvJwzNQp0QyOGYN8qNdxQLOljk5LlSx6nrZg 4q9Q== X-Gm-Message-State: AMCzsaVHq4bqeZ9badp9AIl0oP1pJxyZbNHLelZybfsanvKsZOMCB7/j PjVJLQ/2Ak52ffP44vEJeIN/DjbA X-Google-Smtp-Source: ABhQp+TOlmowqZvPlV7Cms+UMuB1q8VZAQfGwN4U//UU0YBxuLYJJm99qemswqOl4HEYrhsxBteGXQ== X-Received: by 10.223.176.82 with SMTP id g18mr251677wra.234.1508890078898; Tue, 24 Oct 2017 17:07:58 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id 12sm411666wmy.46.2017.10.24.17.07.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2017 17:07:57 -0700 (PDT) In-Reply-To: <87lgk22ryu.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:138940 Archived-At: On 10/23/17 11:23 AM, João Távora wrote: > The cause of this problem is that split-window-sensibly refuses to split > a window whose dimensions are below those of split-height-threshold and > split-width-threshold. The reason you don't see frames popping up every > time you do C-x 4 b on a small frame is that this function contains a > safety net for these cases: if the window to be split is the only one > available in the frame, it disregards the dimension threshholds and > splits anyway. The attached window.el patch is a correct way to > generalize this to account for dedicated windows. 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". This stuff is difficult, and personally I don't like either of the easily reachable solutions. > I see and I will try to answer. I proposed two patches previously: > > * a first one to fix the non-determinism of window popping/selecting > behaviour; > * a second one to make the *xref* buffer less obstrusive. > * (now there is the third one that fixes the frame-popping glitch) > > IIUC it is the second one that clashes with "the dissapearing *xref* > problem" that I have yet to read up on. If we don't come up with a > solution for that, I would be OK with a solution that leaves it unsolved > but adds some customization point (hook) for the user to put this > behaviour in. Indeed, but there's also a matter of consistency, and of making the overall design work in a predictable fashion. More in the follow-up email.