From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#33870: 27.0.50; xref-goto-xref not configurable Date: Tue, 08 Jan 2019 00:02:57 +0200 Organization: LINKOV.NET Message-ID: <87wongazxq.fsf@mail.linkov.net> References: <87a7ktqqx7.fsf@mail.linkov.net> <9215183d-0a44-88b5-5b3c-d0da31f749ad@yandex.ru> <878t02egph.fsf@mail.linkov.net> <878t011lch.fsf@mail.linkov.net> <83lg403o9c.fsf@gnu.org> <87r2dq8z9n.fsf@mail.linkov.net> <5C31C477.9040108@gmx.at> <874laluz3g.fsf@mail.linkov.net> <5C3315E6.9010709@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1546899789 11432 195.159.176.226 (7 Jan 2019 22:23:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 7 Jan 2019 22:23:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 33870@debbugs.gnu.org, joaotavora@gmail.com, dgutov@yandex.ru To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 07 23:23:04 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggdIV-0002rv-VZ for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Jan 2019 23:23:04 +0100 Original-Received: from localhost ([127.0.0.1]:49275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggdKc-0001wz-TI for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Jan 2019 17:25:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggdKS-0001vU-47 for bug-gnu-emacs@gnu.org; Mon, 07 Jan 2019 17:25:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggdKR-0005Bt-4z for bug-gnu-emacs@gnu.org; Mon, 07 Jan 2019 17:25:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49768) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ggdKR-0005AZ-0z for bug-gnu-emacs@gnu.org; Mon, 07 Jan 2019 17:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ggdKQ-0000kj-Iq for bug-gnu-emacs@gnu.org; Mon, 07 Jan 2019 17:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Jan 2019 22:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33870 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33870-submit@debbugs.gnu.org id=B33870.15468998662826 (code B ref 33870); Mon, 07 Jan 2019 22:25:02 +0000 Original-Received: (at 33870) by debbugs.gnu.org; 7 Jan 2019 22:24:26 +0000 Original-Received: from localhost ([127.0.0.1]:49046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggdJq-0000jW-7V for submit@debbugs.gnu.org; Mon, 07 Jan 2019 17:24:26 -0500 Original-Received: from firebrick.maple.relay.mailchannels.net ([23.83.214.59]:7077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggdJo-0000jG-Aw for 33870@debbugs.gnu.org; Mon, 07 Jan 2019 17:24:25 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 4B82C5C47F7; Mon, 7 Jan 2019 22:24:23 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a35.g.dreamhost.com (unknown [100.96.33.121]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id E6A2B5C42D0; Mon, 7 Jan 2019 22:24:22 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a35.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Mon, 07 Jan 2019 22:24:23 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Descriptive-Illustrious: 5e17245309143c94_1546899863104_1725085781 X-MC-Loop-Signature: 1546899863104:2650158664 X-MC-Ingress-Time: 1546899863103 Original-Received: from pdx1-sub0-mail-a35.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a35.g.dreamhost.com (Postfix) with ESMTP id 902AC7F5D7; Mon, 7 Jan 2019 14:24:22 -0800 (PST) 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=5sgfnU 54UeRBuvKADba8x2pcJ88=; b=22AUz8WSlkkN+Wl2d6Nb3FGqvPdek9Sv7tvs5a 9queR4UwZvWIa6FnirPZOJdwMkownOiBtnwxRAos+pdLockZVn/XzUJHa+m4hLcH UlJOrUuRBPO/1k+qAfo2eIMR0yFZgQU7rg0mXJyzpj+O0xczrM9wPg/Z7xuXBNEP 7GCZ8= Original-Received: from mail.jurta.org (m91-129-109-141.cust.tele2.ee [91.129.109.141]) (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-a35.g.dreamhost.com (Postfix) with ESMTPSA id 162B67F4DE; Mon, 7 Jan 2019 14:24:18 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a35 In-Reply-To: <5C3315E6.9010709@gmx.at> (martin rudalics's message of "Mon, 07 Jan 2019 10:03:34 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrvdejgdduheekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledrudegudenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdelrddugedupdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt 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: 209.51.188.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:154235 Archived-At: >> The semantics is that they do what the default actions do >> plus something specific. Maybe then move the default part >> from their body to some other fallback layer? Then just use e.g. >> display-buffer-at-bottom, without the -maybe part. >> Or maybe use an alist for that, something like >> >> ((maybe-try . default-actions)) > > I would never have written these "maybe" function in the first place. > They need more code lines then they spare. So I have no real opinion. I understand that the word =E2=80=9Cmaybe=E2=80=9D indicates it's not gua= ranteed that the function will do what it's intended to do. IOW, these functions are conditional. Since we can't lightly rename old functions, I have a question only about functions added in Emacs 27, namely, display-buffer--maybe-at-botto= m. Its current body: (let ((alist (append alist `(,(if temp-buffer-resize-mode '(window-height . resize-temp-buffer-window) '(window-height . fit-window-to-buffer)) ,(when temp-buffer-resize-mode '(preserve-size . (nil . t))))))) (or (display-buffer--maybe-same-window buffer alist) (display-buffer-reuse-window buffer alist) (display-buffer--maybe-pop-up-frame buffer alist) (display-buffer-in-previous-window buffer alist) (display-buffer-at-bottom buffer alist))) I propose to remove this function and replace its parts with more alists, i.e. this blob `(,(if temp-buffer-resize-mode '(window-height . resize-temp-buffer-window) '(window-height . fit-window-to-buffer)) ,(when temp-buffer-resize-mode '(preserve-size . (nil . t)))) with something shorter like `(fit-to-buffer . t)' And also to replace a long list of display-buffer-* that is a copy of `display-buffer-fallback-action' with something shorter like an alist `(pre-action . display-buffer-fallback-action). >>> Also note that 'display-buffer' resizes a window iff that window is >>> new or always has shown the buffer to display before. >>> >>> There's one thing about 'display-buffer-at-bottom' that stupefies me: >>> Here >>> >>> (let (split-width-threshold) >>> (setq window (window--try-to-split-window bottom-window alist= ))) >>> >>> we bind =E2=80=98split-width-threshold=E2=80=99 so we can split the b= ottom window into >>> two side by side windows. I recently found a branch of mine where I >>> bind 'split-height-threshold' to nil instead and now cannot remember >>> what we really wanted - split that window horizontally or vertically. >>> Can you? In either case feel free to change that to what you conside= r >>> the more appropriate binding - maybe even binding both. >> >> It seems this code has no effect, it's never used. Could you suggest >> such window configuration to test that would call it? > > A single window frame where the buffer is not displayed runs this > part. You are lucky if you can invoke its second branch. I always get only its third branch in all tried configurations when testing with completions of `C-x C-f TAB TAB'. >> There is another problem: in two small vertically split windows >> 'display-buffer-at-bottom' sometimes displays the buffer in the >> upper window. > > From judging the code I'd say this is impossible. But with Emacs > nothing is impossible. After resizing an initial frame to 12 lines, so every vertically split window gets 6 lines, typing `C-x C-f TAB TAB' displays *Completions* in the upper window, when a previous window where *Completions* was previously displayed was moved to the upper window, e.g. 0. emacs -Q 1. resize the frame to 12 lines 2. C-x 2 3. C-x C-f TAB TAB C-g ;; *Completions* were displayed in the bottom wi= ndow 4. C-x 0 5. C-x 2 6. C-x C-f TAB TAB C-g ;; *Completions* displayed in the upper window th= at was previous