From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73734: [PATCH] Fix tmm menu layout Date: Sat, 12 Oct 2024 19:26:41 +0300 Message-ID: <86v7xxuw1q.fsf@gnu.org> References: <87cyk812uv.fsf@ledu-giraud.fr> <86iku00wbz.fsf@gnu.org> <878quv96sk.fsf@ledu-giraud.fr> <868quv24mb.fsf@gnu.org> <874j5j87sj.fsf@ledu-giraud.fr> <86r08nyvws.fsf@gnu.org> <87frp3ys9a.fsf@ledu-giraud.fr> <86msjbyoqz.fsf@gnu.org> <87y12u3ola.fsf@ledu-giraud.fr> <867caezj0u.fsf@gnu.org> <87wmidbef1.fsf@ledu-giraud.fr> <861q0lwfct.fsf@gnu.org> <87ed4lxqkl.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18606"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, 73734@debbugs.gnu.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 12 18:55:14 2024 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 1szfOb-0004gw-85 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Oct 2024 18:55:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szfOE-00028c-4g; Sat, 12 Oct 2024 12:54:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szfOC-00028P-5w for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 12:54:48 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1szfOB-0004ks-Rw for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 12:54:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=klRN2HGadCvofBmw9nwf45JbbI9eNBFNKyUe1/uKHzg=; b=igqJMTYrLsY3tJXgriXU/cj80Qnj3LrDqPXWPcAwElKvdaYTpNY2Efg9RpcV3HwA0H0Aawpk2bNEutkB2TuITzohpeLAdHiVE1hKO2uun9if8gK309k9bBe5HWZz3KI08kpDaeHY7gQW4Lfs6jLGhD7BQAwVNW7KzK7EnMK+LGzpg6iyeFspv0F3pLk1rfDmva2wYKD0ny4kGi162Zj2uxjT5zxI/05z/1MLwXxuS6iWc8soozWnPrKq62dfQltLOxJrPzDgqPPIece9DZnt0mR2rYBZV/3fT8b6cIeoL5ZwsoNYIyjWQ7WVir3dSvslNAz3jMb5egikP0r3X8mbyg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1szfOQ-0004La-38 for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 12:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Oct 2024 16:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73734 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 73734-submit@debbugs.gnu.org id=B73734.172875208716667 (code B ref 73734); Sat, 12 Oct 2024 16:55:02 +0000 Original-Received: (at 73734) by debbugs.gnu.org; 12 Oct 2024 16:54:47 +0000 Original-Received: from localhost ([127.0.0.1]:53464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szfOA-0004Kk-SA for submit@debbugs.gnu.org; Sat, 12 Oct 2024 12:54:47 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szfO8-0004KL-69 for 73734@debbugs.gnu.org; Sat, 12 Oct 2024 12:54:45 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szex2-00029G-3f; Sat, 12 Oct 2024 12:26:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=klRN2HGadCvofBmw9nwf45JbbI9eNBFNKyUe1/uKHzg=; b=WKJVk+KUNPp9 Ucjxtouv9xeb8XxN+Z+SyOo+OaEPTX7vG5UWANi8tbaDPhx8WFUyqtDzYTWm7qbOKXsfyK57d564W yKYxdzqBX62b1Kni0GQ1NPkaa602vrA+BTKPs9/95sFOeguu9QuOC18OxW4I9GsIl4gsVqNQwREBZ Gs9dtP5ZSInJr4/iOjXrLcGYubMYCi63eGxK5SQsCNPzuAiABZmTN5LQH2Q1mimNhFYf5nqCf7fQ4 EYwWH0mOMARn0Xc6OXmt4w8nH5WjvV7yGSQtpjJAcHhgHxS3XK4MbP9+lpFTE9OujGTSv/4OTsRMD rw8OuGfFJOVPIv+6msm6Ag==; In-Reply-To: <87ed4lxqkl.fsf@ledu-giraud.fr> (message from Manuel Giraud on Sat, 12 Oct 2024 17:56:42 +0200) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293463 Archived-At: > From: Manuel Giraud > Cc: rudalics@gmx.at, 73734@debbugs.gnu.org > Date: Sat, 12 Oct 2024 17:56:42 +0200 > > >> - What is the purpose of the "(min 30)"? Because if the window > >> is large enough this will always return 30. > > > > First, I didn't write this code and don't consider myself an expert, > > so what follows are basically my guesses. (In the code I proposed I > > simply didn't touch those parts to clearly separate my changes from > > the rest.) > > > > I think the minimum of 30 is there to make sure we don't produce just > > 2 sets of columns when the window is wide enough to allow more. This > > uses the screen real estate more efficiently, so the *Completions* > > window is not as tall as it would be with just 2 sets of columns. > > Ok, that makes sense. I was under the impression that 30 is too small > but you're right that it could (should?) stay the same. > > >> - Should we use frame-width instead of window-width? It seems > >> that when this function is called (get-buffer-window > >> "*Completions*") always returns nil. > > > > I think we should fall back to frame-width, but use the width of the > > *Completions* window if it exists. I'm quite sure there's a sequence > > of commands which will leave the *Completions* buffer on display, and > > in that case the window showing it will be reused. > > Alright, so what about this new version of the patch? FWIW, I have > tested it lightly and the only time the keybinding alignment is off is > when menu entry is quite long and we needed the 2 spaces separation with > the keybinding. LGTM, thanks.