X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Dani Moncayo <dmoncayo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 05 Jul 2025 08:22:03 +0000 Resent-Message-ID: <handler.78959.B.17517037193738 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 78959 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs <bug-gnu-emacs@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.17517037193738 (code B ref -1); Sat, 05 Jul 2025 08:22:03 +0000 Received: (at submit) by debbugs.gnu.org; 5 Jul 2025 08:21:59 +0000 Received: from localhost ([127.0.0.1]:39643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uXy9m-0000y8-MM for submit <at> debbugs.gnu.org; Sat, 05 Jul 2025 04:21:59 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53148) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <dmoncayo@HIDDEN>) id 1uXy9k-0000xC-As for submit <at> debbugs.gnu.org; Sat, 05 Jul 2025 04:21:56 -0400 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 <dmoncayo@HIDDEN>) id 1uXy9d-0000bI-Ht for bug-gnu-emacs@HIDDEN; Sat, 05 Jul 2025 04:21:49 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <dmoncayo@HIDDEN>) id 1uXy9b-0003bH-RD for bug-gnu-emacs@HIDDEN; Sat, 05 Jul 2025 04:21:49 -0400 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-313a188174fso2197237a91.1 for <bug-gnu-emacs@HIDDEN>; Sat, 05 Jul 2025 01:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751703706; x=1752308506; darn=gnu.org; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dsL+qaiLFu9dwSoprL8BVNfjpFfCldktjyy47uYh96M=; b=lCcN/fwYIG/LhOVbZ5fmOTHM9nIwfSHbVeHaTt1TNXnrd77GvWZ0w+ZIkWDiOzmon+ VPjYgSn0HE4d3lZ6piY9gd/woSRZVnBU1p3V1vfLHjPmNyARzAIQ8OEuHQh4cBdZYKd6 ijmnHA/BefqAWP1+9a3zx9fERQUqFAZgffcMJ0LpyxLw8B2oryQLqMR/lMaj5wPbFR/R FLJYn71DE1QBpr2aRDrkKHblza12712A0yokPAaKlpW+2/ANQtflKENNBt4rVNGh0dz3 jIC7jIhMOk2vnSmNid7V2iJJjEX2Yf0d20l8kQ6iE7auvix2VqNmBeRLJ8Pvq/Y1jzLD VqCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751703706; x=1752308506; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dsL+qaiLFu9dwSoprL8BVNfjpFfCldktjyy47uYh96M=; b=OrefyrAvBgIOSurCW6IU4bTqtdVdgHp6wFpnKHcGHULuXx8jRgSD9rEaf3LgRi1W/N dJZhRhfAZySMMScAoILcmVHlbjcfXQ7c13YlfeZIS91ej5aZ1juGQZQUsftYDFKHR9Vx OFUo5SBnWSoL6J8z2vR714sPaYBIYYzMxPfXYZGfDzaQ5zJQQagOijgbcgMdjmmKXdxv naIG4vdRg04MAb7mrtotwYSZnB226I1d4kyJtlN949mUJL/F3aIZLL/6VEvvZKagOt5A N+e1i5lG3hB1MZfanZF5vyUWxp6twMpodBPZ8npN4UxCje7YKXGVqTPu9P8Im1EUYNC2 DOfw== X-Gm-Message-State: AOJu0Yw9bWUJWzHojScUnBGrYfNShHk9tDllNDWIzJ+32j0TCuTWLRs3 clgYpBPv3i65LfU6/Q2rvAyv4FnnZtLkMIjg+/NDx0ONcms2VUrrRPHfSddrxRnaOSM4K9DKvna ZanAiYRHSEdS8TNG28n7RCLZYI/kMsRNl4j4i X-Gm-Gg: ASbGncti3eFjMw7wxN+kgPCbNncpglyMjThh/oIQIqP1wtG0TN6Z+CUuBMPYOUZwDWD vwDADWO8dN56vYe7k6stvo7EChQDKX/Ughg2dmavjxp0d/s/rtRdsjvvRzeXzodfSbraybl99qD GRNhQIEuybXa5i23u7mGUjZpFm7dgFxyUVhhzzVpZzPCc= X-Google-Smtp-Source: AGHT+IE5NBQGBuMAbYYYohFRL3gARW3HDBugHme5SKpuio/YicSTlG43VrqnU5t6N9Dp9UusGRIZdNSSLBsjEDPrKv0= X-Received: by 2002:a17:90b:53c5:b0:315:9624:37db with SMTP id 98e67ed59e1d1-31aab8371e9mr6938810a91.3.1751703705570; Sat, 05 Jul 2025 01:21:45 -0700 (PDT) MIME-Version: 1.0 From: Dani Moncayo <dmoncayo@HIDDEN> Date: Sat, 5 Jul 2025 10:21:34 +0200 X-Gm-Features: Ac12FXyLLkruzBY4Mxl4JTwchimg3kZikE-nLAFDyE8qi4RmSejL1XXxCngO680 Message-ID: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=dmoncayo@HIDDEN; helo=mail-pj1-x1036.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) Starting from =E2=80=98emacs -Q=E2=80=99, type this: M-x a u t o - <TAB> That should create a *Completions* buffer with some completion alternatives sorted alphabetically and arranged in several columns. OK, now type 'M-v' to select that buffer and try to move around completion alternatives with =E2=80=98n=E2=80=99 and =E2=80=98p=E2=80=99. = Note that these keys move among the completion alternatives in alphabetical order, as expected. Now, repeat the experiment after setting =E2=80=98completions-format=E2=80= =99 to 'vertical: (setq completions-format 'vertical) This time, =E2=80=98n=E2=80=99 and =E2=80=98p=E2=80=99 do _not_ move in alp= habetical order, as (I think) they should. --=20 Dani Moncayo In GNU Emacs 31.0.50 (build 46, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2025-07-04 built on C11-Q8YAKWONJX0 Repository revision: 763c3cd081a833940961373a73705640b1808636 Repository branch: master Windowing system distributor 'Microsoft Corporation', version 11.0.12010000 System Description: Ubuntu 24.04.2 LTS Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB Important settings: value of $LANG: C.UTF-8 locale-coding-system: utf-8-unix
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Dani Moncayo <dmoncayo@HIDDEN> Subject: bug#78959: Acknowledgement (31.0.50; *Completions* buffer navigation with 'n' and 'p') Message-ID: <handler.78959.B.17517037193738.ack <at> debbugs.gnu.org> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> X-Gnu-PR-Message: ack 78959 X-Gnu-PR-Package: emacs Reply-To: 78959 <at> debbugs.gnu.org Date: Sat, 05 Jul 2025 08:22:04 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 78959 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 78959: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78959 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> In-Reply-To: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> Resent-From: Dani Moncayo <dmoncayo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 05 Jul 2025 09:40:02 +0000 Resent-Message-ID: <handler.78959.B78959.175170836916073 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 78959 <at> debbugs.gnu.org Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175170836916073 (code B ref 78959); Sat, 05 Jul 2025 09:40:02 +0000 Received: (at 78959) by debbugs.gnu.org; 5 Jul 2025 09:39:29 +0000 Received: from localhost ([127.0.0.1]:40631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uXzMm-0004BB-QX for submit <at> debbugs.gnu.org; Sat, 05 Jul 2025 05:39:29 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:53602) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <dmoncayo@HIDDEN>) id 1uXzMj-00049c-Aw for 78959 <at> debbugs.gnu.org; Sat, 05 Jul 2025 05:39:26 -0400 Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-313a001d781so1288896a91.3 for <78959 <at> debbugs.gnu.org>; Sat, 05 Jul 2025 02:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751708358; x=1752313158; darn=debbugs.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=RSq+cVSMBbXJmq8tzS7V+DLjE4QaudeQJ0RXKZqQ1fQ=; b=Iu3nqmxUM+zM9l+PBgTbNr0DS0QMdRKhPK32U7oMlM4/+TJmuPp90+hOqlXXItN+0j n3fyF+L5ETfZ9cDGQxw/1G/cmvc1MbVZ+BxYdYyWMSOQVLctIO/iL7dTK+ZX2zvsazQ3 MQDJ1pT4vEPFWNu/ubACaQf6Pb3xdMEFnqxqa48x2bm05d1gRX5eQTFqXtSmMtA9RtdO xLzfxbzqKHqxIeuu1XHWYgELYFSmktRGJCR5Q+elS0AeFbn1aRDfBMhVvBfOkUuvYjNS LDznY19OdWYL+74M+z8poNX74UR/SrShlSEaI7T+y3OixUfD7MwF732os0Hy3CNqJWxl cQmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751708358; x=1752313158; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RSq+cVSMBbXJmq8tzS7V+DLjE4QaudeQJ0RXKZqQ1fQ=; b=PKoIs/m6o4P53/4I+j1V2uz81N+eP4gOHz1C1sKLXdT9zDxROmgCH02u2JF51CH0oT elB+uZhjsrzPBNSNIBzixPBVdCwFiNJQKler2m1TAm1uTnbk2KfMuC4U8q4+VcqMl85G +KGkIB85x5SYWddAPnEM5DasLRjCiizZs1uWx8M6eEmYpxBZzff3bxPn4vXw3TchYjZo ARUm0F+oc2LWWV1CHEGAGdwclwXg+/x7GneyHGZ8//OuHfngxKPTaOMzpVP02DXoiBhH u4mS2a0YuD8lMSmyDr1WZrtNR8rQGiMujFr3FGpdhXta9J7nEihLWwoOiiiADJsN4OK1 mCPw== X-Gm-Message-State: AOJu0Ywry3ljRXQyxEatyPufHqi4ondqLjNgSD2PkomeNfk4Xo4ItI+V 4ak5sXtCbGewSFgJFIZySaR+iPnG8l3F3WVhgbWAJS0j4RNW+eutzH1r8pDQEw/CVXUwKsiF5Hq YVx1AGwdXbA7BYSz9PJ50xCqZOfUT4luPag3v X-Gm-Gg: ASbGncvqOxV92eqhWsyMwzDoWqfgrE0hq4DrVqnj0xOuvQDu5sjn6RLH+voouXzv98B AnC0GDK84M3BBSkS/v+Uob2r/jTTXurU4oTfIFu7tyB6QrMFBhdafsKab4W1aoj0zjSncGbISQC Mh0SWTCZr/VFqNjVJIKAySqBQXODAy0ttgggpGvjFyiV0= X-Google-Smtp-Source: AGHT+IH5PbjRsRjkjJ4TY8ZAvS9jvBtpGzQHeUV0NzT+Ju2KwHuP0JWJCpio500+lJGDuYZVBUlvf5EXhEGCObA+R2I= X-Received: by 2002:a17:90b:1d52:b0:315:f140:91a8 with SMTP id 98e67ed59e1d1-31aac4ba08dmr8886867a91.16.1751708358386; Sat, 05 Jul 2025 02:39:18 -0700 (PDT) MIME-Version: 1.0 From: Dani Moncayo <dmoncayo@HIDDEN> Date: Sat, 5 Jul 2025 11:39:07 +0200 X-Gm-Features: Ac12FXwOOJGFMcN_wE-0Wxoy-8CtoAbXZyGbtan1Xi8BdBkZ40AAwAYpQFxRkH4 Message-ID: <CAH8Pv0gMkGFuVtc2Z=sB+xf7g1dRxasRuRFrPt_O5wNgRXJp7A@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) A couple of further remarks. In general, the navigation among candidates should be consistent with the 'completions-sort' setting, I think. The same issue reported in this ticket applies to the keys M-<down> and M-<up>, when typed from the minibuffer to navigate among completion candidates. Thanks. -- Dani Moncayo
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Stephen Berman <stephen.berman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 05 Jul 2025 19:07:02 +0000 Resent-Message-ID: <handler.78959.B78959.175174241127393 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dani Moncayo <dmoncayo@HIDDEN> Cc: 78959 <at> debbugs.gnu.org Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175174241127393 (code B ref 78959); Sat, 05 Jul 2025 19:07:02 +0000 Received: (at 78959) by debbugs.gnu.org; 5 Jul 2025 19:06:51 +0000 Received: from localhost ([127.0.0.1]:47326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uY8Dq-00077j-P9 for submit <at> debbugs.gnu.org; Sat, 05 Jul 2025 15:06:51 -0400 Received: from mout.gmx.net ([212.227.17.22]:47869) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>) id 1uY8Do-00077J-LI for 78959 <at> debbugs.gnu.org; Sat, 05 Jul 2025 15:06:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1751742401; x=1752347201; i=stephen.berman@HIDDEN; bh=BFWbB1nXbGiWvA/WUeNGmj4SpY7e7Gdw/4djmYTSchg=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=bTcax66IoIa3Jg7lcTZaLLmk/26JxXydYhy72apjONHwFMu5lRfRXwj4MZitwwgJ TR84fKIRQXf3K+/5uRlRv/benhq80GiQEJ03sIvTMK+HAdMfNEDE1Oni/yh9KeV5p 7UqOaQj0SGiOL1Eu5wKfSI6lQcKAFDpjivUN3ZGnulI1Wwjc9sXmVsWKtEqAIKG6A hrRJMlQdnMUlGJuLrhBlKzg4Hp7OkrPIlRNLX1S0zeId7TCc1caaQsJx21g9c8hXB molU5+R6lQf0f9BRKj3Xf5sQlY58R6kfaiBybEm95QtzjsBivIRIPC6uP1EVoQ1fc v6Q/culBGK6qxXicJQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([94.134.95.218]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M26r3-1uVfFQ0LqT-009j9Q; Sat, 05 Jul 2025 21:06:41 +0200 From: Stephen Berman <stephen.berman@HIDDEN> In-Reply-To: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> Date: Sat, 05 Jul 2025 21:06:40 +0200 Message-ID: <87ecuuwj7j.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:k1cokfZi0lNlo1elFYu4I02LnsTC4icV1BIqcYmp3Vj2pigj+Ex uroi2P1BhdnWZLTaSumixuEV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UVzZU B0w5bp0OwFNwJAdQravV9+Y0B2VXrQ/6PQBMCDMV5mo7zQT03mp1wiEM6XT6KLHBKb0/c9AMP Iq+IBVhMIJXpNgSePdIcXMxan44uEEKxeM8DMX/7r+lpAXj/9mGav/HZLi0EgQVjBSC+miAoK RzXxQwMKOdNfPcbF6nzsd82ZYino5k7LgEs5dAlnTVuG7Oi63uZcIH79sHteK8CGxSZiLhzHZ BXrcUbThjBmqu+017byCcG7o0gonJYQoc5r5lVhJEqLz7E5RQcwcPUNmlImppqqTwojZN5Vw0 6B/oHct+Mubdpcj/jeOFs3LtqRaMeVh6N6i+C2O3D1EO0BuImoMCkWi6X7gPxqg/l4q8y1eP5 OmvoSW6PbjDnko41RhmZSBv4KluRVmilxsgFDSn1IRFyGPR82xGNt0ztcpitUCfNouxlRfEh6 EsCh1V0cKiQkvcmMTBmo+C7IpFFTRl/QcnIKN31ifCvjomS/rqSNFaQqyKUIUg X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.5 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, 5 Jul 2025 10:21:34 +0200 Dani Moncayo <dmoncayo@HIDDEN> wrote: > Starting from =E2=80=98emacs -Q=E2=80=99, type this: M-x a u t o - <TAB> > > That should create a *Completions* buffer with some completion > alternatives sorted alphabetically and arranged in several columns. > > OK, now type 'M-v' to select that buffer and try to move around > completion alternatives with =E2=80=98n=E2=80=99 and =E2=80=98p=E2=80=99.= Note that these keys move > among the completion alternatives in alphabetical order, as expected. > > Now, repeat the experiment after setting =E2=80=98completions-format=E2= =80=99 to 'vertical: > (setq completions-format 'vertical) > > This time, =E2=80=98n=E2=80=99 and =E2=80=98p=E2=80=99 do _not_ move in a= lphabetical order, as (I think) > they should. On Sat, 5 Jul 2025 11:39:07 +0200 Dani Moncayo <dmoncayo@HIDDEN> wrote: > A couple of further remarks. > > In general, the navigation among candidates should be consistent with > the 'completions-sort' setting, I think. > > The same issue reported in this ticket applies to the keys M-<down> > and M-<up>, when typed from the minibuffer to navigate among > completion candidates. I tried to give it a shot with the attached patch, which seems to DTRT for your test case with `n', `p', `M-<down>' and `M-<up>'. You might give it a try and see if you find any problems with it. (But maybe don't look at the code too closely, it's ugly as hell....) Steve Berman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: next-completion patch Content-Transfer-Encoding: quoted-printable diff --git a/lisp/simple.el b/lisp/simple.el index fa173b26289..afd6eafe1f4 100644 =2D-- a/lisp/simple.el +++ b/lisp/simple.el @@ -10177,17 +10177,34 @@ next-completion ;; If in a completion, move to the end of it. (when (get-text-property pos 'mouse-face) (setq pos (next-single-property-change pos 'mouse-face))) - (when pos (setq pos (next-single-property-change pos 'mouse-face)= )) - (if pos - ;; Move to the start of next one. - (goto-char pos) - ;; If at the last completion option, wrap or skip - ;; to the minibuffer, if requested. - (when completion-auto-wrap - (if (and (eq completion-auto-select t) tabcommand - (minibufferp completion-reference-buffer)) - (throw 'bound nil) - (first-completion)))) + (if (eq completions-format 'vertical) + (let ((goal-column (current-column))) + (next-line) + (cond ((eq (char-after) 10) + (first-completion)) + ((eobp) + (goto-char pos) + (let ((cnt (count-lines (point) (save-excursion + (first-completion) + (point))))) + (previous-line (1- cnt))) + (setq pos (point)) + (when (get-text-property pos 'mouse-face) + (setq pos (next-single-property-change pos 'mouse-= face)) + (when pos (goto-char pos)) + (setq pos (next-single-property-change pos 'mouse-= face)) + (when pos (goto-char pos)))))) + (when pos (setq pos (next-single-property-change pos 'mouse-fac= e))) + (if pos + ;; Move to the start of next one. + (goto-char pos) + ;; If at the last completion option, wrap or skip + ;; to the minibuffer, if requested. + (when completion-auto-wrap + (if (and (eq completion-auto-select t) tabcommand + (minibufferp completion-reference-buffer)) + (throw 'bound nil) + (first-completion))))) (setq n (1- n))) =20 (while (< n 0) @@ -10197,22 +10214,55 @@ next-completion (not (bobp)) (get-text-property (1- pos) 'mouse-face)) (setq pos (previous-single-property-change pos 'mouse-face))) - (when pos (setq pos (previous-single-property-change pos 'mouse-f= ace))) - (if pos - (progn - (goto-char pos) - ;; Move to the start of that one. - (unless (get-text-property (point) 'mouse-face) - (goto-char (previous-single-property-change - (point) 'mouse-face nil (point-min))))) - ;; If at the first completion option, wrap or skip - ;; to the minibuffer, if requested. - (when completion-auto-wrap - (if (and (eq completion-auto-select t) tabcommand - (minibufferp completion-reference-buffer)) - (progn - (throw 'bound nil)) - (last-completion)))) + (if (eq completions-format 'vertical) + (let ((goal-column (current-column))) + (cond ((save-excursion + (equal (buffer-substring-no-properties + (point) + (next-single-property-change (point) 'mous= e-face)) + (buffer-substring-no-properties + (first-completion) + (next-single-property-change (point) 'mous= e-face)))) + (end-of-line) + (goto-char (previous-single-property-change + (point) 'mouse-face)) + (let ((goal-column (current-column)) + p) + (while (not (or (eobp) (eq (char-after) 10))) + (setq p (point)) + (next-line)) + (goto-char p))) + (t + (previous-line))) + (when (eq (char-after) 10) + (goto-char pos) + (when (get-text-property pos 'mouse-face) + (setq pos (previous-single-property-change pos 'mouse-f= ace)) + (when pos (goto-char pos)) + (setq pos (previous-single-property-change pos 'mouse-f= ace)) + (when pos (goto-char pos))) + (let ((goal-column (current-column))) + (while (not (or (eobp) (eq (char-after) 10))) + (setq p (point)) + (next-line)) + (goto-char p)))) + (when pos + (setq pos (previous-single-property-change pos 'mouse-face))) + (if pos + (progn + (goto-char pos) + ;; Move to the start of that one. + (unless (get-text-property (point) 'mouse-face) + (goto-char (previous-single-property-change + (point) 'mouse-face nil (point-min))))) + ;; If at the first completion option, wrap or skip + ;; to the minibuffer, if requested. + (when completion-auto-wrap + (if (and (eq completion-auto-select t) tabcommand + (minibufferp completion-reference-buffer)) + (progn + (throw 'bound nil)) + (last-completion))))) (setq n (1+ n)))) =20 (when (/=3D 0 n) --=-=-=--
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Dani Moncayo <dmoncayo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 06 Jul 2025 07:15:03 +0000 Resent-Message-ID: <handler.78959.B78959.175178605328557 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175178605328557 (code B ref 78959); Sun, 06 Jul 2025 07:15:03 +0000 Received: (at 78959) by debbugs.gnu.org; 6 Jul 2025 07:14:13 +0000 Received: from localhost ([127.0.0.1]:50321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uYJZl-0007QW-AJ for submit <at> debbugs.gnu.org; Sun, 06 Jul 2025 03:14:13 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:60624) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <dmoncayo@HIDDEN>) id 1uYJZi-0007PP-6J for 78959 <at> debbugs.gnu.org; Sun, 06 Jul 2025 03:14:10 -0400 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-313f68bc519so1618439a91.0 for <78959 <at> debbugs.gnu.org>; Sun, 06 Jul 2025 00:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751786044; x=1752390844; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=dQfDLmVDb7/6armr3AsIJrSwsQu2VQsL528y21xFz8Q=; b=kli/4HYorwBzZ5KCu4qoXt85Z9mjBLl9w9ccXPG1330Zo1wtpv/R8A8IdCcsRybqUb WLMKkZpoapqrXEIIVykcr0qghC6HT/FpQtCpOpCQYH+2z8kt7KDtGQRmbcp13xM2xB4a yk5MesLJS2+M9LFXU2NnUXd9Cy6ZOg2OrWwoUiGKqhERhtq9+oaPYS+DEZu4Qp0nWbDy XnmKDXriHubjdgVG8RYGbRHmks8eMtf8gLUYOr4JfIZjcX9jIK61x0ODU2GOvbXAyOk6 ryTTcooPmg1bPlPyAlRZiJdhZTTPSw/PwfrApOtUab4f1Od1fCqCrkWMcBnRalHk2G8I ya2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751786044; x=1752390844; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dQfDLmVDb7/6armr3AsIJrSwsQu2VQsL528y21xFz8Q=; b=a2Nggn0fxXlS0tPiErQxFSncDYjAorydrOUkShwndJhYZ4G+DVZrPonF7+SZHkWSA1 ST3O2U6eq2vqZxyqNBfJCPY18mUBMAdq9jfrfKKOvlMdt6lh7pseri20SZnUw5ez/1JX 34GINeAhGjtRB/hlkqpEPELD1iUfvPzqOhBlzBWDcuzP24pBu8s182XueyieH6cN7Lax gwBzw5TbLIb4jL09qzJGmJArkd8ziYXT0ziLTXmCp7l9h0jSIT6FWcAehHNtftMzW+Eu 1X7VOuZNWycHThNILX97/mqTTG1r9QlZPCw24yDOm8umz8Qq8TWcHdEdmdwCCfGaFIdL 7cfQ== X-Gm-Message-State: AOJu0YyskSZcKY5ekN/qTM5jtGedLTiOp+fZgPS5bD0Rw/9bqkbIvie4 tZtSpqD2uIF1+BD2q0GfaebC3h448mxgEeb6UG1xohZafBR3v6ZNc05wW45XDEpV5jL48tyqB9w U5eMlcOfY/7krXLQsiF5lsebpO2gGoAY= X-Gm-Gg: ASbGnctUJjLVwNHKhU+hHY0MRscWL7XDxXrTyU3K4MkHXDqggmO7bjiBYlZP+gYPjf9 oct7rOiM1+cLz9nC+Kc2Zmg15BIeaAIu85j7idBL17yCvyUOnYvdhHPQsP+/Z7uvQRVL2wJjFQB 7kYQMW0CguUYyfIOnoUdyGew/bRAqDKJ8fIVX5jqjyKzo= X-Google-Smtp-Source: AGHT+IFOXSVlzRyyk8zE8XNNSJbR35S4ou11SDzNAPWwI628jJR71qP+nRaZDExEAWTxWrZlLnU/PwQwx6TSPw1lpJY= X-Received: by 2002:a17:90b:584e:b0:312:db8:dbdd with SMTP id 98e67ed59e1d1-31aadd9ffccmr11761377a91.28.1751786043839; Sun, 06 Jul 2025 00:14:03 -0700 (PDT) MIME-Version: 1.0 References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> In-Reply-To: <87ecuuwj7j.fsf@HIDDEN> From: Dani Moncayo <dmoncayo@HIDDEN> Date: Sun, 6 Jul 2025 09:13:52 +0200 X-Gm-Features: Ac12FXy9ZXirFZtBDBS59UT6IBkJC_tUW2nKMSNVpJD6s-hnaNxlXoozdpJPBlo Message-ID: <CAH8Pv0j6PprENwoXJUzqct0giE83BtyijPq5UHmzT1Yyr=G4iA@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On Sat, Jul 5, 2025 at 9:06=E2=80=AFPM Stephen Berman <stephen.berman@HIDDEN= et> wrote: > > [...] > > I tried to give it a shot with the attached patch, which seems to DTRT > for your test case with `n', `p', `M-<down>' and `M-<up>'. You might > give it a try and see if you find any problems with it. (But maybe > don't look at the code too closely, it's ugly as hell....) I've just re-tested the recipe of the OP with your patch applied, and it seems to fix the problem. (I can't say almost anything about the code, cause I lack the needed knowledge to assess it). Thanks! --=20 Dani Moncayo
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Dani Moncayo <dmoncayo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 06 Jul 2025 07:23:03 +0000 Resent-Message-ID: <handler.78959.B78959.17517865791051 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.17517865791051 (code B ref 78959); Sun, 06 Jul 2025 07:23:03 +0000 Received: (at 78959) by debbugs.gnu.org; 6 Jul 2025 07:22:59 +0000 Received: from localhost ([127.0.0.1]:50408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uYJiF-0000Gr-2T for submit <at> debbugs.gnu.org; Sun, 06 Jul 2025 03:22:59 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:55360) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <dmoncayo@HIDDEN>) id 1uYJiB-0000FM-T0 for 78959 <at> debbugs.gnu.org; Sun, 06 Jul 2025 03:22:56 -0400 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-313154270bbso2200873a91.2 for <78959 <at> debbugs.gnu.org>; Sun, 06 Jul 2025 00:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751786569; x=1752391369; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=FaHzX0Xxf4xgO+v+R7bQvukwLR+36x69N6FRzqtlcKA=; b=cHIr39YD9R/0w/azKUGfCZO5x7JRE35Wan4//XdOho0BzQYfxtFtgW7r4Dq3KGBoG/ i5ZTCki9272YmtgywqIb3mpTDxHBnN6rAVxkRmdrV0vffHAGktEBTTzfIvlIZ42D64AL EjpdszvkmuCdlHKOV4zf/3FHyoj2IEH+0vZB5Bs4PY4g3UXR0R03PSMHyrD4r0NVNRgJ 6QEH6yeX4uogfdOLpdC+EzOVHWjp/Imjih+rEN/U5u7/PYsECY/4Iph1jBIgBa/z6UAp lhCjnOSy8PwrPA8Hz6vrdX07JvA3LN22YQUtyCPZcuItePEqvWFwE6O6+RSO6UrSXl8P mNgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751786569; x=1752391369; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FaHzX0Xxf4xgO+v+R7bQvukwLR+36x69N6FRzqtlcKA=; b=BS347b+aV4vk06WO6nCipHtx6MHf2eMoaaFownnz36kEovKQ6Nzma2Rbdaw1+8H1SK d1um5CbQKsUMtexTt8L8Iu03zkWnmX2yrnVkwB0y58V7VgY+9Jhbvgq1+QFgPY7y0Z8m bsSXuGYmbnDZ3dhmPDg/UHjGf/zOwdDOFpJV0pQlajMY9LDT8s3lVyBKAlNKCqURMhG6 0SsDkk/JLf7VqHDJy+6oueR7I0D7V90O9nXkcmBr+EYwO3VFSNrDV92B+vP4KENjNEYm Wu2Xzn0XowtfPxNg6R8kZFMeF0/j/Sh3+bqZZ+wUbqTZg1tiKQ3OGksSrVqY4zOE9Ggw F5zQ== X-Gm-Message-State: AOJu0YypZaMbGmTfkRZpTWTwR7YrGwJUjQNlSfJYPCtPb+631a8DyD3b w5xyJOQRVYmDjjigahd1rTBCS4iGg9p6k7u/AQ+PTur7el3Is5BxJaXpjjbltq08Bg+/ojQjeux 4O081KfWyfsQZlcJ1XvX2Sn15zEbu+h+VVPKa X-Gm-Gg: ASbGncu4f4UIgs7tZNLqZU4b/AvLj5FRqXs1fRd2FlZa+2WzggaBDM2RetpRftkeji0 yKq+oGIoksY0HVq5/sJVgKdKGoWikMJ9YTkzXunqMrIH0raEvNbDMtqbkqM+bUY0tlKvG501hUR 7A56Q4y8J2s2qiy59dfOAUfHyriZeitNQFx4o8HP+5ifo= X-Google-Smtp-Source: AGHT+IFK/zZZaHFx1+owg9J3gk8tHppiC5eOqylP22a7xkfzHSbL86r11x3XebSRr0HsYGgyh47yKhMVcfNaMOKLnxs= X-Received: by 2002:a17:90b:3c8f:b0:312:1d2d:18e2 with SMTP id 98e67ed59e1d1-31aac4b2f1cmr12609678a91.20.1751786569426; Sun, 06 Jul 2025 00:22:49 -0700 (PDT) MIME-Version: 1.0 References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <CAH8Pv0j6PprENwoXJUzqct0giE83BtyijPq5UHmzT1Yyr=G4iA@HIDDEN> In-Reply-To: <CAH8Pv0j6PprENwoXJUzqct0giE83BtyijPq5UHmzT1Yyr=G4iA@HIDDEN> From: Dani Moncayo <dmoncayo@HIDDEN> Date: Sun, 6 Jul 2025 09:22:37 +0200 X-Gm-Features: Ac12FXzcYAAN7OKidkfq1wuz7gmm3KRPDlt6KdA91DuT2MdMDZmNANjq7ZpnqNI Message-ID: <CAH8Pv0h7kB43Fjp0v6zYV5N5wSFnp9kfT0hUfRtiRt4AWov7Tg@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On Sun, Jul 6, 2025 at 9:13=E2=80=AFAM Dani Moncayo <dmoncayo@HIDDEN> wr= ote: > > [...] > > I've just re-tested the recipe of the OP with your patch applied, and > it seems to fix the problem. I just found a minor issue: with completions-format set to 'vertical, if I = type: M-x a u t o - <TAB> M-<down> I get an error in the echo area ([No completion here]), and the cursor in the *Completions* buffer is not placed in the first candidate (as it should). I have to type a second M-<down> to go to the first candidate. --=20 Dani Moncayo
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Stephen Berman <stephen.berman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 06 Jul 2025 09:39:02 +0000 Resent-Message-ID: <handler.78959.B78959.175179470211332 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dani Moncayo <dmoncayo@HIDDEN> Cc: 78959 <at> debbugs.gnu.org Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175179470211332 (code B ref 78959); Sun, 06 Jul 2025 09:39:02 +0000 Received: (at 78959) by debbugs.gnu.org; 6 Jul 2025 09:38:22 +0000 Received: from localhost ([127.0.0.1]:51832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uYLpF-0002wd-Rj for submit <at> debbugs.gnu.org; Sun, 06 Jul 2025 05:38:22 -0400 Received: from mout.gmx.net ([212.227.15.19]:34575) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>) id 1uYLpB-0002vB-9q for 78959 <at> debbugs.gnu.org; Sun, 06 Jul 2025 05:38:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1751794690; x=1752399490; i=stephen.berman@HIDDEN; bh=WT4ABcb7D0tPPXM6ZDH2w3/lnZZImx4ORmhVf/PbYn4=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=onssBKSSjDAJ0rQeaDxyZCxFdibHrSzEby03K8q/r+jlOsnlcx4yA18KEiObueCB WQnR5xhBICJ/huzwcpqeCO23qwZDiDiABQpE1C2VdW5lx6CepEZT6T5NjKvYYxF0B AhAxta2LuGxliI01M4VOkez/wE3eHZqJ2CoicSCFsSi0WK0YN0NPm+216mIeZaP7B k6yuTqu0fr2B8VhdciQzNcJsjG38amgehU6TuZX3vMtT/A3mr+LniNJoh1BkowuD0 fcDKyh0Em+wiSupAfsIRPWQyoPs+q2vTTB71nKX8pq+mt1ITLox6FqV9qeDtVJgi5 5OeXZzZMZAdRfw3BSQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([94.134.95.231]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MIx3I-1uDwct3QSo-00Hf9M; Sun, 06 Jul 2025 11:38:09 +0200 From: Stephen Berman <stephen.berman@HIDDEN> In-Reply-To: <CAH8Pv0h7kB43Fjp0v6zYV5N5wSFnp9kfT0hUfRtiRt4AWov7Tg@HIDDEN> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <CAH8Pv0j6PprENwoXJUzqct0giE83BtyijPq5UHmzT1Yyr=G4iA@HIDDEN> <CAH8Pv0h7kB43Fjp0v6zYV5N5wSFnp9kfT0hUfRtiRt4AWov7Tg@HIDDEN> Date: Sun, 06 Jul 2025 11:38:09 +0200 Message-ID: <87jz4l4q2m.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:P749E0VVD7FIgqgJSwEwQBZ/5HO6fx1qWbQUUjwOHzBj+juf8e7 0v/f4uXvuLxnfFXP1MPhqlLeaXamscAnaybBv9SZrul9Na4NIjx7S57GwAanPK3ruxIGec3 UM5khAAtZ57RCW7UfRvFDwXi4RDTNHol9p+o5dOI5YLQFWJ9whxfU3Hb/CZuBFCppqVicLP n1dIr4b4eTMTmuXFUxhqA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ShXgnx6QFcI=;+yRBOwPOVj82PSBonL31T13XRAN 7hdRBHEpMn0YtNh3VnBQ9UVWCuA1HdZorda4GslrAwLPDd8VSQZxqUN1h2p7KSeWRKJlFLGUu WogItnmfEBxgeqoaD+lmDv4NNrSbvq23/iSaHKHivdCyE6WP/HnYgjLy0DUQWzRur/6rxI7jZ gSLB7kta2BLtCgaRTnZElVsltp1D3kQ1L8mwod5o/PAk1UoscqBAdc3VAWd01elcFDADOO1Kb dr0emajwMJdwSGqh0LmwGmBrmOJXis/VVh01z8h8F6eUnjihC2BY4OuM8Gsbgqq9sZSObKufL ZPUtjoGwQVfOxeW0yq7vzLwHR24Phqcr90z8YvPsQGf3HIIE8wid6b/XvhFOCjvpI8vZUd1N5 1Wp3KNybvvIsN5GHKCWUz/p+TwugCcmdWjQpTApnoejcXiI1FEf3arhrN4ewzU7I7mzuIUdnE SsWTpBqgEL7PYsxPetPGwxFneztvVp6v0gullJhMWgE8oVumW5bIKHIf65BKBTC0nvtPXR5Vh JeuHL61InX9j/NN8Z70bScSLiRKY3sofjZ6dExh94UUqmEvNZNicC/wTFu9B8E/wYKSXHNZwD TiJg+tC3wcZ/Vz2XuGaQyG5hQHmyDy3HdXBPkN4Hrdi7TnEiQWasSMuqx/T/2dm1lV+tQFKSN u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zOq2T4XTbiLilRLCBHohsdHPl7gy5PeLALymGceQ+SQCyiCbVqM/o1kNuC6Hbs7ZxX FfrDhXtpIEH+orKn7jBAFogOjgLCzwTXsW26gqYByOZW94HgKcYvx0U/8PFhDogfXWgGp+/95 4ay5KUc5zpegYMh2zeQDYzA4Zj2cGWfOlogA17om2Bod7VAktwbP0JsLs9exAaoIfxwKo1IfV kywl+tpjZvHGofas7rax4yJf3NwUU4XddFoRJ7t6JNMX3Pb9QwLAJiy6qOCW7yDpn1nSJjkoF TOTFJdaAhMnC4HseZqHMkex3vg2tzLm69hYwyjjMKTIg1PfQy/e+dpl1Sl3ng39d0jVB6Wyad LCivRRqj+RlwcGDgcTM20lxn9WnNXanFmNbST54xkP2VxCyiwDQC+YtlOF8UU9/bztbCtsAZ8 FwXRKtT7pgyLW8L0MNC1fIduHQmNC2sGqGocXhpdEkzGam1mbs1SMRsfPsZKACg79w62Q87rZ V125Mf/H2Aoc6F+kYd5Chf7rLbQg1oWc/qEU1VPTSUQhPPSL/zEyRzxT3Ihxx5hh5Z7YwTUVZ ESThoV3oxHUkc003gXCGFgRhC1qfEIaK26B58e2EoYzo0YNh9z3rWdfgdt/bEFFmPSXNH7Gvn W/hcLgt32TOfSCUmPoK4WBpfxYKrYX/Lg5b+fERwE= X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.5 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sun, 6 Jul 2025 09:22:37 +0200 Dani Moncayo <dmoncayo@HIDDEN> wrote: > On Sun, Jul 6, 2025 at 9:13=E2=80=AFAM Dani Moncayo <dmoncayo@HIDDEN> = wrote: >> >> [...] >> >> I've just re-tested the recipe of the OP with your patch applied, and >> it seems to fix the problem. > > I just found a minor issue: with completions-format set to 'vertical, if = I type: > > M-x a u t o - <TAB> M-<down> > > I get an error in the echo area ([No completion here]), and the cursor > in the *Completions* buffer is not placed in the first candidate (as > it should). I have to type a second M-<down> to go to the first > candidate. Thanks for testing and finding this problem! The attached patch (replacing, not modifying, my previous patch) should fix it. Steve Berman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: next-completion patch Content-Transfer-Encoding: quoted-printable diff --git a/lisp/simple.el b/lisp/simple.el index fa173b26289..c5e70170751 100644 =2D-- a/lisp/simple.el +++ b/lisp/simple.el @@ -10177,17 +10177,38 @@ next-completion ;; If in a completion, move to the end of it. (when (get-text-property pos 'mouse-face) (setq pos (next-single-property-change pos 'mouse-face))) - (when pos (setq pos (next-single-property-change pos 'mouse-face)= )) - (if pos - ;; Move to the start of next one. - (goto-char pos) - ;; If at the last completion option, wrap or skip - ;; to the minibuffer, if requested. - (when completion-auto-wrap - (if (and (eq completion-auto-select t) tabcommand - (minibufferp completion-reference-buffer)) - (throw 'bound nil) - (first-completion)))) + (if (eq completions-format 'vertical) + (let ((goal-column (current-column))) + (if (bobp) + (progn + (goto-char (first-completion)) + (setq goal-column (current-column))) + (next-line)) + (cond ((eq (char-after) 10) + (first-completion)) + ((eobp) + (goto-char pos) + (let ((cnt (count-lines (point) (save-excursion + (first-completion) + (point))))) + (previous-line (1- cnt))) + (setq pos (point)) + (when (get-text-property pos 'mouse-face) + (setq pos (next-single-property-change pos 'mouse-= face)) + (when pos (goto-char pos)) + (setq pos (next-single-property-change pos 'mouse-= face)) + (when pos (goto-char pos)))))) + (when pos (setq pos (next-single-property-change pos 'mouse-fac= e))) + (if pos + ;; Move to the start of next one. + (goto-char pos) + ;; If at the last completion option, wrap or skip + ;; to the minibuffer, if requested. + (when completion-auto-wrap + (if (and (eq completion-auto-select t) tabcommand + (minibufferp completion-reference-buffer)) + (throw 'bound nil) + (first-completion))))) (setq n (1- n))) =20 (while (< n 0) @@ -10197,22 +10218,55 @@ next-completion (not (bobp)) (get-text-property (1- pos) 'mouse-face)) (setq pos (previous-single-property-change pos 'mouse-face))) - (when pos (setq pos (previous-single-property-change pos 'mouse-f= ace))) - (if pos - (progn - (goto-char pos) - ;; Move to the start of that one. - (unless (get-text-property (point) 'mouse-face) - (goto-char (previous-single-property-change - (point) 'mouse-face nil (point-min))))) - ;; If at the first completion option, wrap or skip - ;; to the minibuffer, if requested. - (when completion-auto-wrap - (if (and (eq completion-auto-select t) tabcommand - (minibufferp completion-reference-buffer)) - (progn - (throw 'bound nil)) - (last-completion)))) + (if (eq completions-format 'vertical) + (let ((goal-column (current-column))) + (cond ((save-excursion + (equal (buffer-substring-no-properties + (point) + (next-single-property-change (point) 'mous= e-face)) + (buffer-substring-no-properties + (first-completion) + (next-single-property-change (point) 'mous= e-face)))) + (end-of-line) + (goto-char (previous-single-property-change + (point) 'mouse-face)) + (let ((goal-column (current-column)) + p) + (while (not (or (eobp) (eq (char-after) 10))) + (setq p (point)) + (next-line)) + (goto-char p))) + (t + (previous-line))) + (when (eq (char-after) 10) + (goto-char pos) + (when (get-text-property pos 'mouse-face) + (setq pos (previous-single-property-change pos 'mouse-f= ace)) + (when pos (goto-char pos)) + (setq pos (previous-single-property-change pos 'mouse-f= ace)) + (when pos (goto-char pos))) + (let ((goal-column (current-column))) + (while (not (or (eobp) (eq (char-after) 10))) + (setq p (point)) + (next-line)) + (goto-char p)))) + (when pos + (setq pos (previous-single-property-change pos 'mouse-face))) + (if pos + (progn + (goto-char pos) + ;; Move to the start of that one. + (unless (get-text-property (point) 'mouse-face) + (goto-char (previous-single-property-change + (point) 'mouse-face nil (point-min))))) + ;; If at the first completion option, wrap or skip + ;; to the minibuffer, if requested. + (when completion-auto-wrap + (if (and (eq completion-auto-select t) tabcommand + (minibufferp completion-reference-buffer)) + (progn + (throw 'bound nil)) + (last-completion))))) (setq n (1+ n)))) =20 (when (/=3D 0 n) --=-=-=--
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Dani Moncayo <dmoncayo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 06 Jul 2025 11:35:04 +0000 Resent-Message-ID: <handler.78959.B78959.175180169922118 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175180169922118 (code B ref 78959); Sun, 06 Jul 2025 11:35:04 +0000 Received: (at 78959) by debbugs.gnu.org; 6 Jul 2025 11:34:59 +0000 Received: from localhost ([127.0.0.1]:53270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uYNe6-0005kb-PB for submit <at> debbugs.gnu.org; Sun, 06 Jul 2025 07:34:59 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:54441) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <dmoncayo@HIDDEN>) id 1uYNe3-0005j4-SQ for 78959 <at> debbugs.gnu.org; Sun, 06 Jul 2025 07:34:56 -0400 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-3135f3511bcso2164122a91.0 for <78959 <at> debbugs.gnu.org>; Sun, 06 Jul 2025 04:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751801690; x=1752406490; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SsXJZOunyTg9COJsAEcoId2QJnQw+JIh8d9N3hAKbNA=; b=kT9RQWtE/BMHq/DsinJIfUQS6Spr0ZkUatYpCsF8UwwkexxJFXw+LyXSSGorj4tYBE jtIraC+m6NXfAojtTr7lykIYVJLVSgcYFU2ADYk/1/8b/tqbk+Ewtjg5KIi+LHjN1HY+ yNRvR2cp9dh+iUa8AjaMq5hsW8J8mlmGyJMNosLrAb/RAbqPDjP45U2tzdDEa8CZ/M3X xyHmr3SLsa1zm5yR/0Yn8mYLOlgDQfhnhczkZemqzvkzkkHdRasW8qBipeanundzv4Bx WlKz2AYCxqlrqXDuvzRpsP/APV5oxsgIjJjvURQF7G74hmIPkspp1+CJE5gI9oRq7NLG Mdvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751801690; x=1752406490; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SsXJZOunyTg9COJsAEcoId2QJnQw+JIh8d9N3hAKbNA=; b=ZUqwSfAGdiv6bX5Ys3IWLObOLPjpwDoM6osuvde//gvKsQE45DURQyXiX86PD/6h/C jwAAo6mlW00+ByHXAlN32kNw0ds9C3PQ2Aq6mO+UnOvJwkTP4Xo8zTVJR53wOKwWVYBG v+bsSPCOc+c9lUEKUfA13s/dG1v7Pbmw0IYSIFwL6KroR342brrWgG3qeUjSsqoJcrSV 3gsp4+DxHWti6FsoBJBo1SKd1R4rFU5odOuFSrz+Za6Q6oPuPg2AGtfiCdpPd4494s7h 5UecpxLY7LUcGbpnf6QqlnjKKH5Q4WKP12LEDMxnEiTVTQjZ9vQwYZXNJvBkNn/okMnC 0jTw== X-Gm-Message-State: AOJu0YzjK0MfbDAcuuo5Ggi/fEFMQU/4BQgrAmrc9ve0MkD8WnNT6ZYy 7se7h1omi3tf2FPRw8Ke/4wL8lh+/lZJ/KeVl6ak20dwV2lRqhPR0BUgQGORDwc+WjgR17Nmlet Tix3KQaWQpPqJm1QnNxvES1O/Ud8oABQ= X-Gm-Gg: ASbGncuPoHlNrdhJZRaOTrncM5Okmn43CHHAWe98UU2899yROs2vIEDhnHndsiay25c 3+qo99qGcEZIkrV+z8y0WmHSVRKZFvfS36rxz+STc2V8n0DUG0AN9W8blulkmwVYnLLaEU6rOr+ vvdOTtxfTVhyBLHx799Mq3ef2xC4rG4Vr2MYhq1qA8dTE= X-Google-Smtp-Source: AGHT+IHznL4ozPEpb1auvOt92ZT1gPlz3GITCw5Vp5KdComcUFIDQIsHSPUr+2TyuCl8T2HZEz60zRkHhYarBoXQaCk= X-Received: by 2002:a17:90b:2e50:b0:311:baa0:89ce with SMTP id 98e67ed59e1d1-31aac448241mr16230795a91.12.1751801689683; Sun, 06 Jul 2025 04:34:49 -0700 (PDT) MIME-Version: 1.0 References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <CAH8Pv0j6PprENwoXJUzqct0giE83BtyijPq5UHmzT1Yyr=G4iA@HIDDEN> <CAH8Pv0h7kB43Fjp0v6zYV5N5wSFnp9kfT0hUfRtiRt4AWov7Tg@HIDDEN> <87jz4l4q2m.fsf@HIDDEN> In-Reply-To: <87jz4l4q2m.fsf@HIDDEN> From: Dani Moncayo <dmoncayo@HIDDEN> Date: Sun, 6 Jul 2025 13:34:38 +0200 X-Gm-Features: Ac12FXw6z3L9t6wohsj-ZrF0Gft7LuVfVRnKoQ4hgxohvTiJ-yDEUa3yyI6jLVU Message-ID: <CAH8Pv0icoduUnD5mNcSV8hAszRWNvz_jZv=+vvs7+4OZHWdMkw@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On Sun, Jul 6, 2025 at 11:38=E2=80=AFAM Stephen Berman <stephen.berman@gmx.= net> wrote: > > On Sun, 6 Jul 2025 09:22:37 +0200 Dani Moncayo <dmoncayo@HIDDEN> wrote= : > > > On Sun, Jul 6, 2025 at 9:13=E2=80=AFAM Dani Moncayo <dmoncayo@HIDDEN= > wrote: > >> > >> [...] > >> > >> I've just re-tested the recipe of the OP with your patch applied, and > >> it seems to fix the problem. > > > > I just found a minor issue: with completions-format set to 'vertical, i= f I type: > > > > M-x a u t o - <TAB> M-<down> > > > > I get an error in the echo area ([No completion here]), and the cursor > > in the *Completions* buffer is not placed in the first candidate (as > > it should). I have to type a second M-<down> to go to the first > > candidate. > > Thanks for testing and finding this problem! The attached patch > (replacing, not modifying, my previous patch) should fix it. With this one, all seems to work fine. Thanks! --=20 Dani Moncayo
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 07 Jul 2025 07:01:03 +0000 Resent-Message-ID: <handler.78959.B78959.175187164721631 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175187164721631 (code B ref 78959); Mon, 07 Jul 2025 07:01:03 +0000 Received: (at 78959) by debbugs.gnu.org; 7 Jul 2025 07:00:47 +0000 Received: from localhost ([127.0.0.1]:60886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uYfqJ-0005cp-DJ for submit <at> debbugs.gnu.org; Mon, 07 Jul 2025 03:00:47 -0400 Received: from mout-y-111.mailbox.org ([91.198.250.236]:33108) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uYfqF-0005c0-M7 for 78959 <at> debbugs.gnu.org; Mon, 07 Jul 2025 03:00:44 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-111.mailbox.org (Postfix) with ESMTPS id 4bbFW72Xbzz9xqF; Mon, 7 Jul 2025 09:00:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1751871635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tmvHu4+nNBIEzNIUhr+ReXjsCOeSDWWOexD7WSUEQOk=; b=U9Puq3NLH/qNB3z4cr3BeqsXyg2HJZAldxE7FM8wp3CAZ5diNlxHUiKuAEUEQ3LhhE+uoy 6OJDZd02jDLh7Gmkc/DLrXeowKX5TNlZISseTQocYW0Y3HmocrR9FeJADVGKu3Z4aTUuJZ cn1hGbGYQNrOSk/XzjeiS4ARFIJPkIS88VqvT2VYVic4q+mv5x2TyyLv4fMfeOlT7wTT2b h14XKe+QO7m5eJZSWiO74sfnoIwRPZs2A61EaiFhRnLb5mkCpqRXpy0y2MhCr6J5I3rrGU D0uQtq3ne//5K6iKQbRUuHCa3OqW/c3D8vsK4mcPgrWzK9YU6VQ6NVyYi0RANg== From: Juri Linkov <juri@HIDDEN> In-Reply-To: <87ecuuwj7j.fsf@HIDDEN> Organization: LINKOV.NET References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> Date: Mon, 07 Jul 2025 09:49:23 +0300 Message-ID: <87o6tw4hbo.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >> The same issue reported in this ticket applies to the keys M-<down> >> and M-<up>, when typed from the minibuffer to navigate among >> completion candidates. > > I tried to give it a shot with the attached patch, which seems to DTRT > for your test case with `n', `p', `M-<down>' and `M-<up>'. You might > give it a try and see if you find any problems with it. (But maybe > don't look at the code too closely, it's ugly as hell....) Isn't this just about keybindings? When completions-format is customizeed to `vertical', keybindings `n' and `p' could be just remapped from `next-completion' to `next-line-completion', and from `previous-completion' to `previous-line-completion'.
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Stephen Berman <stephen.berman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 07 Jul 2025 07:56:02 +0000 Resent-Message-ID: <handler.78959.B78959.175187491716369 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov <juri@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175187491716369 (code B ref 78959); Mon, 07 Jul 2025 07:56:02 +0000 Received: (at 78959) by debbugs.gnu.org; 7 Jul 2025 07:55:17 +0000 Received: from localhost ([127.0.0.1]:60938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uYgh3-0004Fc-3k for submit <at> debbugs.gnu.org; Mon, 07 Jul 2025 03:55:17 -0400 Received: from mout.gmx.net ([212.227.17.20]:47503) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>) id 1uYgh0-0004CA-4F for 78959 <at> debbugs.gnu.org; Mon, 07 Jul 2025 03:55:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1751874903; x=1752479703; i=stephen.berman@HIDDEN; bh=ooSTxQdzPj64e8qo4WyY4H/8Kg2mTG6iKuFY2mZ0gL4=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=i+FxxRn+OFqhn6bqgB8rCKRvucqCFtIYI7I+bbQ1/HFWT7p/Q63oS2QZqZtw1aBJ mpbOPKONPj/7SD40LkTNxfmMCttPRs7xJcm3Bq0mj7rLty91xadO/zqgHofbXx9RN eZEj1ee2mF9sQdWNwuX1LvpcW1KrsjWKnbkED6hxhrhG/3d1DF52UIM2RDg9TLFWL GuozR/THhbJpSXpTfYjOFKObF2DZwKSalH8hXGQx2WJnaRKVTUuVuQKUyYeQecNFm vCj4v1ltCsAZJFnJW8P1ZSRkHgsHqpnCUbTGeh+8lI4LWHOWlxtnJ55WEIs9cYXUF vZeTVJ1mBUKanIDKXw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([94.134.95.252]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N7i8Y-1ulM9t2B7a-00wwJB; Mon, 07 Jul 2025 09:55:03 +0200 From: Stephen Berman <stephen.berman@HIDDEN> In-Reply-To: <87o6tw4hbo.fsf@HIDDEN> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> Date: Mon, 07 Jul 2025 09:55:02 +0200 Message-ID: <874ivo77vt.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:ZsWVr2Xlis5OHHtwpb3rixhlad0wOCkwk4G3EE8XC0gKumqQUvK s3BWQafy7BfvVFnfqvhURJmtXNMxgq73r7r0OxUx/AuSNufnaRviPFxy4Rc/Y+LfdqwF0Bc /DPkFBZ6FrtwlNzYF+bhWt9BphJpgHUy32X+5JwSn5NhsUrQfS/LjHxDMUcukz3lgbv+EVd oSb2a5rhLWLG5wJhl1Mig== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:F9IGiq+4c3A=;NfuVnCSxodvL4JVWulenZBfcOHk HvXdvms0TU0s1C8GbKFAebRe70b6K4cgYsDEcoVdqUfbVY86D8BwSm07IdIJcimv3KgGKTaTl ZDk7RTrKoNBRKrNV3VsO+FEh+Kkl3BzTC819afB1Ei/l1F6GGhvp5x6TJSEYQKr7gzQEe7NbE VIjgOr5ACL7NH1Bc1n4OBZLjfvz3p3JKkM0WwOm1zQRHMg7Ewn4wAgrZpAzcIzNYsHw/igjv2 gktZdVuW/Y2u3PFyhk2EX0wgmlkPSy7aUBj2HugW983H3nX8tWrSm6cJevOkWWuSJ6DevgBFH qBxq419/HX4NcHDwTnFEwj9NIM5pEgcN9t7m0dMBfXySO9djcXUHbHjG+GFVQA5Oc4UNSJRZw pgTPyOJShkt+o5yIK0WHL8u5+bwk0EJNEzkk46kFr2Soh7pEq5izES+FhRp2KECjpRwB/EflH seQMuJT4SNiE81yqGd4pTHWtFK7f2BPkY+AVCeTK8sFzVmuF1a+VOGkyyksI21umqmkwq80dU LzXkj4/EMGe1aQa/poG7N7Q2I+NtgkFmrXsnCBoCR+Nof0yvyVo9hIyFbbyJUs9tOhwpOwNpC +eP2f+vgGRgyalmFUitxQ9h4DDdQ8Btr9WJsv2kA0o3KW3+LzjsK8vY1Cmp2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/TFhlioPHoE3Q449asQK+Ke6oOWmSZG6t4b6ARMEgvp/dB47U+HmlgNz5xF0J7Yyc8 Os602Adjm/Ak3PdbYX1C+WJMByUZncJb9mFcTZysOzcbOZKI/7p2gLCvi1juv0cwhFacGP2cx 0AZwqTm9HlSQBt7+ut8sKP5DWmkafbn5Jo1tlWduT5v6/3db7YJXOaATvE5PPPxCjAYU1H+DG 8bPyQFgfVDQsmkCTDAWdBSpXTwMEOKsqTCcgq2fRcdzKe28GdJdMjBumUYEtU7/eXc7mBAvFp vJwYPax6ZtXX2KHyBnE3Kz9fELPvxsV757dV8h9iYEWp0CKUQuF549zgZUktxHtNy8+rFPQ92 lPS90TaEKmydtgoqIWqsrSVZLGVQ8ttk9XvNlOKqiq18v7wnzFk8mVH1Kvd3qP6nPRZNS+Hqb deX/EThne5rMZoRfoGfEBDQGbLP5l9+pE+R6QUrkjrby1UKGEqx0o4TeV3/URzX51jI/0cJaq /0GB0u5BAm5JrpEnG3M/1PSdz/5HQcwOvZiL9RbZiM1uoRkfcveZDa9sAsO0kd4JN+FrEe/lx QFdBCpNmk+3uxHVKet5ViepYvYs7wtX3iCXjcS44q5Hh/7nrW6wn7b8HdB8FSHP/of90SeL X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On Mon, 07 Jul 2025 09:49:23 +0300 Juri Linkov <juri@HIDDEN> wrote: >>> The same issue reported in this ticket applies to the keys M-<down> >>> and M-<up>, when typed from the minibuffer to navigate among >>> completion candidates. >> >> I tried to give it a shot with the attached patch, which seems to DTRT >> for your test case with `n', `p', `M-<down>' and `M-<up>'. You might >> give it a try and see if you find any problems with it. (But maybe >> don't look at the code too closely, it's ugly as hell....) > > Isn't this just about keybindings? When completions-format is > customizeed to `vertical', keybindings `n' and `p' could be > just remapped from `next-completion' to `next-line-completion', > and from `previous-completion' to `previous-line-completion'. Bindings for `next-line-completion' and `previous-line-completion' already exist in `completions-list-mode-map' (<down> and <up>, respectively), and using these keys with `completions-format' set to 'vertical only moves point within the current column in the *Completions* buffer. You can move to the next or previous column with <right> or <left> and then continue with <up> or <down>. But this bug report was about using the same keys to scroll through all completions in the sorted order according to whether the display is horizontal or vertical; `{next,previous}-line-completion', as currently implemented, don't DTRT for that. Steve Berman
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 07 Jul 2025 16:30:05 +0000 Resent-Message-ID: <handler.78959.B78959.175190578622934 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175190578622934 (code B ref 78959); Mon, 07 Jul 2025 16:30:05 +0000 Received: (at 78959) by debbugs.gnu.org; 7 Jul 2025 16:29:46 +0000 Received: from localhost ([127.0.0.1]:37281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uYoiv-0005xo-J6 for submit <at> debbugs.gnu.org; Mon, 07 Jul 2025 12:29:45 -0400 Received: from mout-y-111.mailbox.org ([2001:67c:2050:103:465::111]:50886) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uYoir-0005wc-Cg for 78959 <at> debbugs.gnu.org; Mon, 07 Jul 2025 12:29:42 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-111.mailbox.org (Postfix) with ESMTPS id 4bbV7Z5QFzz9ySQ; Mon, 7 Jul 2025 18:29:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1751905770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XhqAkYVjEzZQ/ZD49KMCezf90LwEbk3ZFtijxzqXHk8=; b=pJmfuTwfq2DZLckrmKYjzxNcDoFibbYYs/o5PftguqZObyXHX3g0W3zPekS3gtDhveqe5i sOafKAunxex4Uvi9mHvgMW2nw0+yxhicG9CgC4o0oKwjivSkCTmoFo5RUG6ahI8h3d3pRI 5TasiUHAdDyz4GLcx/B3uJ7tVOtrVxfWM1eaB7sjDe9l8m7p812EenIUMJlz99PQ0npq08 m7CzFL+hBim2pEgHY2FmMq36u/TN9AtNGlpBExjNDG46s8I1qXol+UOFDpl5ywBbRYcn8z lc5UHVkJMXr69ZxpTeWpjiTYO18p1nuK+AeDa3CfyZq745KXtLwL0/vh970/aQ== From: Juri Linkov <juri@HIDDEN> In-Reply-To: <874ivo77vt.fsf@HIDDEN> Organization: LINKOV.NET References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> Date: Mon, 07 Jul 2025 19:25:33 +0300 Message-ID: <87wm8k2cjm.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4bbV7Z5QFzz9ySQ X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >>>> The same issue reported in this ticket applies to the keys M-<down> >>>> and M-<up>, when typed from the minibuffer to navigate among >>>> completion candidates. >>> >>> I tried to give it a shot with the attached patch, which seems to DTRT >>> for your test case with `n', `p', `M-<down>' and `M-<up>'. You might >>> give it a try and see if you find any problems with it. (But maybe >>> don't look at the code too closely, it's ugly as hell....) >> >> Isn't this just about keybindings? When completions-format is >> customizeed to `vertical', keybindings `n' and `p' could be >> just remapped from `next-completion' to `next-line-completion', >> and from `previous-completion' to `previous-line-completion'. > > Bindings for `next-line-completion' and `previous-line-completion' > already exist in `completions-list-mode-map' (<down> and <up>, > respectively), and using these keys with `completions-format' set to > 'vertical only moves point within the current column in the > *Completions* buffer. You can move to the next or previous column with > <right> or <left> and then continue with <up> or <down>. But this bug > report was about using the same keys to scroll through all completions > in the sorted order according to whether the display is horizontal or > vertical; `{next,previous}-line-completion', as currently implemented, > don't DTRT for that. When the display is horizontal, 'n' and 'p' could use `next-completion' to `next-line-completion'. When the display is vertical, 'n' and 'p' could use `next-line-completion' and `previous-line-completion'.
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Stephen Berman <stephen.berman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 08 Jul 2025 16:37:08 +0000 Resent-Message-ID: <handler.78959.B78959.175199261214250 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov <juri@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175199261214250 (code B ref 78959); Tue, 08 Jul 2025 16:37:08 +0000 Received: (at 78959) by debbugs.gnu.org; 8 Jul 2025 16:36:52 +0000 Received: from localhost ([127.0.0.1]:44237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uZBJL-0003hf-8E for submit <at> debbugs.gnu.org; Tue, 08 Jul 2025 12:36:51 -0400 Received: from [212.227.17.21] (port=43047 helo=mout.gmx.net) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>) id 1uZ3oP-0004u2-BL for 78959 <at> debbugs.gnu.org; Tue, 08 Jul 2025 04:36:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1751963765; x=1752568565; i=stephen.berman@HIDDEN; bh=1dALCtsyROGwi7As7gAWz5NU4c3S5L/nmH4g4IkGVmY=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=It8uGd3x8O5zd4chxtoWIk0U+t/i8QXNqRN6Qsf5lQcNdfBLgIMNUh5gj5Ud0eDi /Db0LjDFP0DA9A0Xeqr+u+5ZaroQQbYbKH3+MXsMMnkINd+cscHCpGaScnvszQGmj OkMdPlS2vLq6GBx6XZYzji6uQyKJhGvsxi04GFFQJorlGiv1ydUxzfaa2n3w/2kkx hDxH3vsn1vPT/rvsOreIYRDgWRlvxoABBM0nn6voXf8TRZq4q3Ot/GOAgQYQj1CPD AcO84g5tqKQ90L+2bk+sBAM5CoUlrjvbBD+yES9mfFfFdJ/pDY0opXNiKYwhOP02c XoUdzXvNE5bbJtCIWA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([88.130.48.245]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MpDNf-1v1GLD2qb9-00geEW; Tue, 08 Jul 2025 10:36:04 +0200 From: Stephen Berman <stephen.berman@HIDDEN> In-Reply-To: <87wm8k2cjm.fsf@HIDDEN> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> Date: Tue, 08 Jul 2025 10:36:04 +0200 Message-ID: <87ldozyt8r.fsf@HIDDEN> User-Agent: Gnus/5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1fF w9Q0MCeqlEKLWSnOfejJMdAwGDXULaYwENARqB/YyX81wbapWf7TOxhANlzzhmOcu33WYiOBv DFUTBFgg9t2WJK6lBzd7NCCPZQEM9W/LUgvQwkyyEQTlfHkKp9Ftr42iAyoLKLCwU0c5OYb6a PhXfk8991r4gyya6jJtnNx+TOTVTs/8P8qZiiIXLiQtr9vlVhu1TU8JSQPYFPp+7TRPZUOWZ7 0gxdNZHUjgRiyhHO5fwOZPaeAAeKoqmPGi3Wgv9w8PgJ0p8rnytechYUg7YPC/LqP4Rx9Zryi DcS/UxBZI3nB7gwPMmeba9hnC2GTN6s2krjre6kdkgahaDT9PWeVN+aMZUEtgWGIzfXJHmq9q HaoGda/L2Ul3gUomVVjsHZfmUuR/49UITWIoutJ6H5/VhG3IkWrd75DlyrtnP5Xx6yy6ve4Mu zUIWoXmUkR2waleWp+LAZzyD1GmKjUpKVOt1gDeJ/8z+iQuechgCIOVrR161Fm4K76m7zYnGT TzQQgMXjys3jafmYsiqu/M0W/QDkycnpKvOcwR7WKRkZ9jZfzxA6TIDCRnHylt7Mp4esro7BC Va0QgmDKqO4OF/lmnR2oXBuCOA15wwES4kZidmXsSElpdYjuZNbxXo2nrC3XE638ON/YRgjFv yC700/8kjzBpvqHv75+Hj0MbvJLOPEggIEGjnUWy8/ly+iNY+POggcrL2drtvZ5OuDkOiVu/L Dg== X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Mon, 07 Jul 2025 19:25:33 +0300 Juri Linkov wrote: >>>>> The same issue reported in this ticket applies to the keys M-<down> >>>>> and M-<up>, when typed from the minibuffer to navigate among >>>>> completion candidates. >>>> >>>> I tried to give it a [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stephen.berman[at]gmx.net) 0.0 T_SPF_TEMPERROR SPF: test of record failed (temperror) 0.0 T_SPF_HELO_TEMPERROR SPF: test of HELO record failed (temperror) 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS 0.0 SPOOFED_FREEMAIL_NO_RDNS From SPOOFED_FREEMAIL and no rDNS X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.4 (/) --=-=-= Content-Type: text/plain On Mon, 07 Jul 2025 19:25:33 +0300 Juri Linkov <juri@HIDDEN> wrote: >>>>> The same issue reported in this ticket applies to the keys M-<down> >>>>> and M-<up>, when typed from the minibuffer to navigate among >>>>> completion candidates. >>>> >>>> I tried to give it a shot with the attached patch, which seems to DTRT >>>> for your test case with `n', `p', `M-<down>' and `M-<up>'. You might >>>> give it a try and see if you find any problems with it. (But maybe >>>> don't look at the code too closely, it's ugly as hell....) >>> >>> Isn't this just about keybindings? When completions-format is >>> customizeed to `vertical', keybindings `n' and `p' could be >>> just remapped from `next-completion' to `next-line-completion', >>> and from `previous-completion' to `previous-line-completion'. >> >> Bindings for `next-line-completion' and `previous-line-completion' >> already exist in `completions-list-mode-map' (<down> and <up>, >> respectively), and using these keys with `completions-format' set to >> 'vertical only moves point within the current column in the >> *Completions* buffer. You can move to the next or previous column with >> <right> or <left> and then continue with <up> or <down>. But this bug >> report was about using the same keys to scroll through all completions >> in the sorted order according to whether the display is horizontal or >> vertical; `{next,previous}-line-completion', as currently implemented, >> don't DTRT for that. > > When the display is horizontal, 'n' and 'p' could use > `next-completion' to `next-line-completion'. > When the display is vertical, 'n' and 'p' could use > `next-line-completion' and `previous-line-completion'. I think either I don't understand your proposal or you misunderstand the issue. If your proposal is correctedly implemented with the attached patch, then it doesn't DTRT: setting `completions-format' to 'vertical, typing `M-x auto- TAB M-v' and then typing `n' and `p' repeatedly only moves between items in the first column of the *Completions* buffer. What the OP wanted, and my patch provides, is movement column-wise between all items. I don't see how `{next,previous}-line-completion' can do this as currently implemented. If misunderstood your proposal, please clarify it. Steve Berman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: next/previous completions patch Content-Transfer-Encoding: quoted-printable diff --git a/lisp/simple.el b/lisp/simple.el index fa173b26289..9af3fe15233 100644 =2D-- a/lisp/simple.el +++ b/lisp/simple.el @@ -10041,8 +10041,8 @@ completion-list-mode-map (define-key map [M-down] 'minibuffer-next-completion) (define-key map "\M-\r" 'minibuffer-choose-completion) (define-key map "z" 'kill-current-buffer) - (define-key map "n" 'next-completion) - (define-key map "p" 'previous-completion) + (define-key map "n" 'next-completion-switch) + (define-key map "p" 'previous-completion-switch) (define-key map "\M-g\M-c" 'switch-to-minibuffer) map) "Local map for completion list buffers.") @@ -10305,6 +10305,20 @@ next-line-completion (if pos (goto-char pos)))) (setq n (1+ n))))) =20 +(defun next-completion-switch (&optional n) + "Move according to `completions-format' to next completion item." + (interactive "p") + (pcase completions-format + ('horizontal (next-completion n)) + ('vertical (next-line-completion n)))) + +(defun previous-completion-switch (&optional n) + "Move according to `completions-format' to previous completion item." + (interactive "p") + (pcase completions-format + ('horizontal (previous-completion n)) + ('vertical (previous-line-completion n)))) + (defvar choose-completion-deselect-if-after nil "If non-nil, don't choose a completion candidate if point is right afte= r it. =20 --=-=-=--
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 09 Jul 2025 06:20:02 +0000 Resent-Message-ID: <handler.78959.B78959.175204195625640 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175204195625640 (code B ref 78959); Wed, 09 Jul 2025 06:20:02 +0000 Received: (at 78959) by debbugs.gnu.org; 9 Jul 2025 06:19:16 +0000 Received: from localhost ([127.0.0.1]:48005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uZO9E-0006fO-1J for submit <at> debbugs.gnu.org; Wed, 09 Jul 2025 02:19:16 -0400 Received: from mout-y-209.mailbox.org ([91.198.250.237]:44274) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uZO99-0006eN-Kq for 78959 <at> debbugs.gnu.org; Wed, 09 Jul 2025 02:19:12 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-209.mailbox.org (Postfix) with ESMTPS id 4bcSVH4thrzB0Wr; Wed, 9 Jul 2025 08:19:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1752041943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EacMxMu4dISnfTtd1oZWPyZ2t0jQdLuJ6Q85ENfZZnk=; b=Dq6FkW6xUB6rwZA/H+jVWRJOO/7wDuUiZXuRa9jfRVZFSupAaPYeWS3MNHxkqR+xI/gvtM KPr26jclw1NcfIjss/Vis4LVAu6QEBVBlaWqlJfXuuXA8OVXJCYQ2FK1fTfNKZ8CbmgUV8 xMQ5rsliXpW5Lq1bEIwnk5SkBz3VLlv4FMyVrhfzAljGTXjYZGcAazJHiXNx4Fx08syLZe sX6qXieYY6drqGr9D1t2m/H+aHzRkMDGnm6mzrhRY9lGBE18L8YI1gCHIbqV1WZ6n88r2U RnYWsCKYp1iR7EMzpluISTFdMYKAXGhzV37KEUL8zuBi/HRPhew1lrh5Ir0Kkw== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates 2001:67c:2050:b231:465::102 as permitted sender) smtp.mailfrom=juri@HIDDEN From: Juri Linkov <juri@HIDDEN> In-Reply-To: <87ldozyt8r.fsf@HIDDEN> Organization: LINKOV.NET References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> Date: Wed, 09 Jul 2025 09:16:43 +0300 Message-ID: <875xg1sxxc.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4bcSVH4thrzB0Wr X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >> When the display is horizontal, 'n' and 'p' could use >> `next-completion' to `next-line-completion'. >> When the display is vertical, 'n' and 'p' could use >> `next-line-completion' and `previous-line-completion'. > > I think either I don't understand your proposal or you misunderstand the > issue. If your proposal is correctedly implemented with the attached > patch, then it doesn't DTRT: setting `completions-format' to 'vertical, > typing `M-x auto- TAB M-v' and then typing `n' and `p' repeatedly only > moves between items in the first column of the *Completions* buffer. > What the OP wanted, and my patch provides, is movement column-wise > between all items. I don't see how `{next,previous}-line-completion' > can do this as currently implemented. If misunderstood your proposal, > please clarify it. Do I understand correctly that you mean such behavior: when `next-line-completion' reaches the bottom of the column it should wrap to the top of the next column? If you will improve `next-line-completion', this will provide symmetry between `next-completion' and `next-line-completion'. Or wrapping to the next column should be optional? Then maybe in your `next-completion-switch', `(next-line-completion n)' should be called with a new argument e.g. `(next-line-completion n 'next-column)'? > @@ -10041,8 +10041,8 @@ completion-list-mode-map > - (define-key map "n" 'next-completion) > - (define-key map "p" 'previous-completion) > + (define-key map "n" 'next-completion-switch) > + (define-key map "p" 'previous-completion-switch) > [...] > +(defun next-completion-switch (&optional n) > + "Move according to `completions-format' to next completion item." > + (interactive "p") > + (pcase completions-format > + ('horizontal (next-completion n)) > + ('vertical (next-line-completion n)))) > + > +(defun previous-completion-switch (&optional n) > + "Move according to `completions-format' to previous completion item." > + (interactive "p") > + (pcase completions-format > + ('horizontal (previous-completion n)) > + ('vertical (previous-line-completion n))))
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Stephen Berman <stephen.berman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 10 Jul 2025 16:06:02 +0000 Resent-Message-ID: <handler.78959.B78959.175216353316695 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov <juri@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175216353316695 (code B ref 78959); Thu, 10 Jul 2025 16:06:02 +0000 Received: (at 78959) by debbugs.gnu.org; 10 Jul 2025 16:05:33 +0000 Received: from localhost ([127.0.0.1]:58762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uZtm6-0004Kx-QL for submit <at> debbugs.gnu.org; Thu, 10 Jul 2025 12:05:32 -0400 Received: from mout.gmx.net ([212.227.17.20]:55891) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>) id 1uZtm2-0004Jc-Fj for 78959 <at> debbugs.gnu.org; Thu, 10 Jul 2025 12:05:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1752163520; x=1752768320; i=stephen.berman@HIDDEN; bh=TSNCQ8byo9eDSkv+5J4TcW4FxEG4EXuHRcb9PiVzspE=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=uIMtjFJGY75Hkc6DDIH1dlTrBJIs6aJnLF3kaklt2FAgTRa9tX8vvWhqOxjtBGMK qqSLClYC8cM4Ta3iOnj+PF8+hlkX3KfVGRziw3rrIEC4EyUnBBkJKAXmgnftq9SwN iq7Wcb9BnNHbq5HfweBdLdcrfKRwDvQiTmSbzlmVM26TpQKnqshp1j21MqvN3y+Cl gl9RVcuwsg7sLgS5HWY7KRmpOLPSiGxYzAesokikgjEAo1/cJcIJ0ikYzKNdE0ZKW DU9eybrHTxml3m2CUvpOAIY/lyK9UOUiBSbMLdl4S/dTmZeSQixgjUFE4u35UuFME 8n9ahwtUZbow1xbAVA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([94.134.94.84]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N5GE1-1uh4ws2M2X-00r8ps; Thu, 10 Jul 2025 18:05:19 +0200 From: Stephen Berman <stephen.berman@HIDDEN> In-Reply-To: <875xg1sxxc.fsf@HIDDEN> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> Date: Thu, 10 Jul 2025 18:05:18 +0200 Message-ID: <87a55cc9q9.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:CisQftDb5QaBLhJPQnzTsjgm3C+QvkKjJgYg5C81VClnXHBDY0o +FO/NV9gFg0W6NH0S/F5bkGphbFE8YkKKGkJnMlTporI3EqsvQlrfaj7s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YhJwwmfSx5nMkpOA3LOqxSMRd4I1Iw7qFjxvntL33nNFjfm7CNbWfS7 usNJLINTs+zJ8eR5p5MCMsX/8FSmzkchKirI59sUgwGfsp2EPjSDfDMe8jFCUT9FlXfsbAr5Z aoXSngOoySO6cFsQlD8HIKTpqL5mVpXav/72U7H7tY/Q9AwnCEU5WuH/Aq/SrH83121IUvLRx YJ5uz5eL5XHBq3dyKdOVlfG/X2mMGdllKdkdGRX0ZIEfVVdfwo1SuEmWoPRUrkQ5zBcYHngC6 bUPkCR/+srFuaE0/AyzOkVHrG2QPcZCITyYcK7TDU39cnGzTDh8enA5q+EiRZASDbIK8IFdjF 0n8jS5xPX/IWLGzMfCjCKeCXCG/nSf8fkEAWmKH0m6eFoUjdSMpb4gT1mX2UebMAatGLAALju wGCieFzJGL7ar1LbokeHz/bimsvuiIGUS1/o3Y2RXf8bNZgDepLqwDSyPzNO2OjpT5uwKHofX sUIIku6ya4B7+KdQgr2lfRF+VSHONejcsxhl/wkTlG7lGmVtEY/XGMVnGhBs1zGLuHAwbvouu 2JbXjEjrOMRRaK5isr6loN2hbedBJBVx8wtUP/osE/wKiZpF3v6Jg6ojd73tSAA+HA== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain On Wed, 09 Jul 2025 09:16:43 +0300 Juri Linkov <juri@HIDDEN> wrote: >>> When the display is horizontal, 'n' and 'p' could use >>> `next-completion' to `next-line-completion'. >>> When the display is vertical, 'n' and 'p' could use >>> `next-line-completion' and `previous-line-completion'. >> >> I think either I don't understand your proposal or you misunderstand the >> issue. If your proposal is correctedly implemented with the attached >> patch, then it doesn't DTRT: setting `completions-format' to 'vertical, >> typing `M-x auto- TAB M-v' and then typing `n' and `p' repeatedly only >> moves between items in the first column of the *Completions* buffer. >> What the OP wanted, and my patch provides, is movement column-wise >> between all items. I don't see how `{next,previous}-line-completion' >> can do this as currently implemented. If misunderstood your proposal, >> please clarify it. > > Do I understand correctly that you mean such behavior: > when `next-line-completion' reaches the bottom of the column > it should wrap to the top of the next column? Yes. > If you will improve `next-line-completion', this will provide > symmetry between `next-completion' and `next-line-completion'. Ok, I've tried to do that in the attached patch. This also required changes in `last-completion', which did not DTRT in vertical format. I think this patch improves on my previous patch, in terms of both the code (which nevertheless remains rather convoluted) and the coverage (my previous patch did not work right in vertical format when all columns of completions have the same number of lines). I've tested the patch with -Q and all combinations of values of `completions-format' and `completion-auto-wrap', and the resulting behavior seems sensible in each case. > Or wrapping to the next column should be optional? > Then maybe in your `next-completion-switch', > `(next-line-completion n)' should be called with a new argument e.g. > `(next-line-completion n 'next-column)'? I decided not to implement this, because it doesn't seem very useful to me: the user can just stop hitting `n', `p', `down' or `up' to avoid wrapping (and `left' and `right' still move between columns). Steve Berman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: next/previous completions patch Content-Transfer-Encoding: quoted-printable diff --git a/lisp/simple.el b/lisp/simple.el index fa173b26289..d60b6a23e73 100644 =2D-- a/lisp/simple.el +++ b/lisp/simple.el @@ -10041,8 +10041,8 @@ completion-list-mode-map (define-key map [M-down] 'minibuffer-next-completion) (define-key map "\M-\r" 'minibuffer-choose-completion) (define-key map "z" 'kill-current-buffer) - (define-key map "n" 'next-completion) - (define-key map "p" 'previous-completion) + (define-key map "n" 'next-completion-switch) + (define-key map "p" 'previous-completion-switch) (define-key map "\M-g\M-c" 'switch-to-minibuffer) map) "Local map for completion list buffers.") @@ -10124,12 +10124,33 @@ first-completion (defun last-completion () "Move to the last item in the completions buffer." (interactive) + ;; Move to the last item in horizontal or one-column format. (goto-char (previous-single-property-change (point-max) 'mouse-face nil (point-min))) - ;; Move to the start of last one. + ;; Move to the start of the item. (unless (get-text-property (point) 'mouse-face) (when-let* ((pos (previous-single-property-change (point) 'mouse-face= ))) - (goto-char pos)))) + (goto-char pos))) + ;; In vertical format the last item is in the last column even if its + ;; line number is less than that of the last item in earlier columns. + (when (eq completions-format 'vertical) + (let* ((pt (point)) + (col (current-column)) + (last (progn + (first-completion) + (goto-char (pos-eol)) + (goto-char (previous-single-property-change + (point) 'mouse-face)) + (current-column)))) + (when (> last col) + (while (=3D (current-column) last) + (forward-line) + (unless (eobp) + (goto-char (pos-eol)) + (move-to-column last) + (when (=3D (current-column) last) + (setq pt (point)))))) + (goto-char pt)))) =20 (defun previous-completion (n) "Move to the previous item in the completions buffer. @@ -10228,11 +10249,15 @@ previous-line-completion =20 (defun next-line-completion (&optional n) "Move to completion candidate on the next line in the completions buffe= r. -With prefix argument N, move N lines forward (negative N means move backw= ard). +With prefix argument N, move N lines forward (negative N means move +backward). In vertical format (see user option `completions-format') +this command moves column-wise through all items in the completions +buffer, in horizontal format movement is confined to the current column +of completions. =20 Also see the `completion-auto-wrap' variable." (interactive "p") - (let (line column pos found) + (let (line column pos found first) (when (and (bobp) (> n 0) (get-text-property (point) 'mouse-face) @@ -10257,32 +10282,57 @@ next-line-completion ((< n 0) (first-completion))))) =20 (while (> n 0) - (setq found nil pos nil column (current-column) line (line-number-a= t-pos)) + (setq found nil pos (when (eq completions-format 'vertical) (point)= ) + column (current-column) line (line-number-at-pos) + first (save-excursion (first-completion) (point))) (completion--move-to-candidate-end) (while (and (not found) (eq (forward-line 1) 0) (not (eobp)) (move-to-column column)) (when (get-text-property (point) 'mouse-face) - (setq found t))) + (setq found t pos (point)))) (when (not found) - (if (not completion-auto-wrap) + (if (and (not completion-auto-wrap) + (if (eq completions-format 'vertical) + (=3D pos (save-excursion (last-completion) (point))) + t)) (last-completion) - (save-excursion - (goto-char (point-min)) - (when (and (eq (move-to-column column) column) - (get-text-property (point) 'mouse-face)) - (setq pos (point))) - (while (and (not pos) (> line (line-number-at-pos))) - (forward-line 1) - (when (and (eq (move-to-column column) column) - (get-text-property (point) 'mouse-face)) - (setq pos (point))))) - (if pos (goto-char pos)))) + (cond ((eq completions-format 'vertical) + (goto-char pos) + (move-to-column 0) + (let ((cnt (count-lines (point) first))) + (forward-line (- cnt))) + (move-to-column column) + (setq pos (point)) + (when (get-text-property pos 'mouse-face) + (let ((pos1 (next-single-property-change pos 'mouse-fa= ce)) + pos2) + (when pos1 (goto-char pos1)) + (setq pos2 (next-single-property-change + pos1 'mouse-face nil (line-end-position)= )) + (goto-char (if (=3D pos2 pos1) first pos2)) + (when (memq (point) (list first pos2)) + (setq pos (point)))))) + (t + (save-excursion + (goto-char (point-min)) + (when (and (eq (move-to-column column) column) + (get-text-property (point) 'mouse-face)) + (setq pos (point))) + (while (and (not pos) (> line (line-number-at-pos))) + (forward-line 1) + (when (and (eq (move-to-column column) column) + (get-text-property (point) 'mouse-face)) + (setq pos (point))))))) + (when pos (goto-char pos)))) (setq n (1- n))) =20 (while (< n 0) - (setq found nil pos nil column (current-column) line (line-number-a= t-pos)) + (setq found nil pos (point) column (current-column) + line (line-number-at-pos) first (save-excursion + (first-completion) + (point))) (completion--move-to-candidate-start) (while (and (not found) (eq (forward-line -1) 0) @@ -10290,21 +10340,63 @@ next-line-completion (when (get-text-property (point) 'mouse-face) (setq found t))) (when (not found) - (if (not completion-auto-wrap) + (if (and (not completion-auto-wrap) + (if (eq completions-format 'vertical) + (=3D pos first) + t)) (first-completion) - (save-excursion - (goto-char (point-max)) - (when (and (eq (move-to-column column) column) - (get-text-property (point) 'mouse-face)) - (setq pos (point))) - (while (and (not pos) (< line (line-number-at-pos))) - (forward-line -1) - (when (and (eq (move-to-column column) column) - (get-text-property (point) 'mouse-face)) - (setq pos (point))))) + (cond ((eq completions-format 'vertical) + (goto-char pos) + (let* ((wrap (=3D (point) first)) + (pos1 (previous-single-property-change pos 'mouse= -face)) + (pos2 (if pos1 + (progn + (goto-char pos1) + (previous-single-property-change + pos1 'mouse-face nil + (line-beginning-position))) + pos)) + column) + (when pos1 + (goto-char (if (=3D pos2 pos1) first pos2))) + (when (memq (point) (list first pos2)) + (setq pos (point) column (current-column))) + (while (not (eobp)) + (setq pos1 (point)) + (forward-line)) + (if wrap + (last-completion) + (goto-char pos1) + (move-to-column column)) + (setq pos nil))) + (t + (save-excursion + (goto-char (point-max)) + (when (and (eq (move-to-column column) column) + (get-text-property (point) 'mouse-face)) + (setq pos (point))) + (while (and (not pos) (< line (line-number-at-pos))) + (forward-line -1) + (when (and (eq (move-to-column column) column) + (get-text-property (point) 'mouse-face)) + (setq pos (point))))))) (if pos (goto-char pos)))) (setq n (1+ n))))) =20 +(defun next-completion-switch (&optional n) + "Move according to `completions-format' to next completion item." + (interactive "p") + (pcase completions-format + ('vertical (next-line-completion n)) + (_ (next-completion n)))) + +(defun previous-completion-switch (&optional n) + "Move according to `completions-format' to previous completion item." + (interactive "p") + (pcase completions-format + ('vertical (previous-line-completion n)) + (_ (previous-completion n)))) + (defvar choose-completion-deselect-if-after nil "If non-nil, don't choose a completion candidate if point is right afte= r it. =20 --=-=-=--
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 10 Jul 2025 18:52:02 +0000 Resent-Message-ID: <handler.78959.B78959.175217350724631 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175217350724631 (code B ref 78959); Thu, 10 Jul 2025 18:52:02 +0000 Received: (at 78959) by debbugs.gnu.org; 10 Jul 2025 18:51:47 +0000 Received: from localhost ([127.0.0.1]:59655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uZwMz-0006Ov-GF for submit <at> debbugs.gnu.org; Thu, 10 Jul 2025 14:51:47 -0400 Received: from mout-y-209.mailbox.org ([2001:67c:2050:103:465::209]:48604) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uZwMu-0006N0-Nj for 78959 <at> debbugs.gnu.org; Thu, 10 Jul 2025 14:51:43 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-209.mailbox.org (Postfix) with ESMTPS id 4bdP835xyXzB0Fm; Thu, 10 Jul 2025 20:51:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1752173491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KZDQAkMymA8UZE9lOIbytCbJzou6RBO4W7Z4LZkY89c=; b=14Dl5oItLxRgAoGusHkBDpmVWU/mTY2MeouB32Wrww/O324Ezf3ims7qD1BpQykhtQ+2Wl gQ1HkCIiT+KDQsg+KemQw6PA+LW7ODu1iQUHZvZn4yl8kX/2JTsInygfvv/3dazHjJR4ju XmDi0zAvHEi4/GZ69zYYbUlDCLHzgfl1lHmG4MLt5p5E1LagKM98I6ZdRY2SMeSewxfQI5 ktlBTZ/J09r06tV14CB1Ti8XvJlA5Ts49unra4IGDImsHClljGhHf2j5e03/IpJKSOrUpB lJ1sLg924k5L7HcxKVV3wPsVrOaKwJMRFQm5Ojwn+xTiEal/N647MfcVHq4c+A== From: Juri Linkov <juri@HIDDEN> In-Reply-To: <87a55cc9q9.fsf@HIDDEN> Organization: LINKOV.NET References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> Date: Thu, 10 Jul 2025 21:48:49 +0300 Message-ID: <87tt3jg9v2.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >> Do I understand correctly that you mean such behavior: >> when `next-line-completion' reaches the bottom of the column >> it should wrap to the top of the next column? > > Yes. > >> If you will improve `next-line-completion', this will provide >> symmetry between `next-completion' and `next-line-completion'. > > Ok, I've tried to do that in the attached patch. This also required > changes in `last-completion', which did not DTRT in vertical format. I > think this patch improves on my previous patch, in terms of both the > code (which nevertheless remains rather convoluted) and the coverage (my > previous patch did not work right in vertical format when all columns of > completions have the same number of lines). I've tested the patch with > -Q and all combinations of values of `completions-format' and > `completion-auto-wrap', and the resulting behavior seems sensible in > each case. I expected that the patch would be much simpler: after wrapping to the top of the current column would it be enough just to call `next-completion' to go to the next column on the same first row? And for `previous-line-completion' would it be simpler to call `previous-completion' to go to the previous column, and afterwards wrap to the bottom of the same column? Then for `last-completion' is it possible to call `first-completion', then `previous-completion' will go to the last column, then `previous-line-completion' could wrap to its bottom? >> Or wrapping to the next column should be optional? >> Then maybe in your `next-completion-switch', >> `(next-line-completion n)' should be called with a new argument e.g. >> `(next-line-completion n 'next-column)'? > > I decided not to implement this, because it doesn't seem very useful to > me: the user can just stop hitting `n', `p', `down' or `up' to avoid > wrapping (and `left' and `right' still move between columns). So to achieve the previous behavior it is easy to type `left' or `right' after wrapping to go back to the original column?
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Stephen Berman <stephen.berman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 11 Jul 2025 11:25:02 +0000 Resent-Message-ID: <handler.78959.B78959.175223308626774 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov <juri@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175223308626774 (code B ref 78959); Fri, 11 Jul 2025 11:25:02 +0000 Received: (at 78959) by debbugs.gnu.org; 11 Jul 2025 11:24:46 +0000 Received: from localhost ([127.0.0.1]:35496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uaBrx-0006xl-Oi for submit <at> debbugs.gnu.org; Fri, 11 Jul 2025 07:24:46 -0400 Received: from mout.gmx.net ([212.227.17.22]:38325) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>) id 1uaBrt-0006x7-3y for 78959 <at> debbugs.gnu.org; Fri, 11 Jul 2025 07:24:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1752233073; x=1752837873; i=stephen.berman@HIDDEN; bh=4vXwDi7Z3txOdIUaCjIv8BhofCwPNI8fOA5ZdQabbYI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=BoqE1+bFGx0ygLgFMn5ao44xFlOBCEPQ6Fh1vYa9eEoPIzmP00cnH/rA5x2fQ8P2 3NiXb/N4Oe4FqV5+bl0cD7bJPKH0kJOGIHueVfYMC2BihuanKx4FQnE3ieFGFDdW8 Jowuen7dWLyjT+/Wn8VVmqCQVS9raVpe7ew1RKjJAj75L5jrigGBp6DrQ5aZ9Z9P3 qo8THgFiC75qmWYtkYpfnu0NoasS5gAbcwjyhhGaKTDgdPFWpMbnA4oIMA5gSm1gi LmESaexd/iOYw8s0Iqhk5l/Kh/B/s+HU0fgOj6v7QTZQzJdWA9XaB6A2kJ+m4bBdc 4qmKKUb0+4vTuXm0lA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([88.130.49.197]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N2Dx8-1umbbr1Zl8-00tcuu; Fri, 11 Jul 2025 13:24:33 +0200 From: Stephen Berman <stephen.berman@HIDDEN> In-Reply-To: <87tt3jg9v2.fsf@HIDDEN> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> Date: Fri, 11 Jul 2025 13:24:32 +0200 Message-ID: <8734b3otqn.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:uih5Do0MHg06T8TwjQn7ov6eSSPv0HJ4sDYsOi5SyQctvhwNQKi EppCSv/Ji7S76SWVktIzHg1Nxu94oOBVtIKNkTdxZxlS7aEZstZIkJRDSKrzDcsrheDfBtK 9p7KjtoloP2H+DNPKR/0PqEdwbu60UxTsMqr08ExUOxxtddFP1GI4DnQnxDW4M/CsZBI4Qk ml99xnvVDCTSrNDGhV9JQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:niSZ3M1fsaE=;a8UstMTSElKktQJ3FEHqx+atU4F a1lL+KZb7n7JoFNw/UgyKPlu6a5DEtMS3d9HPWG5GcDfbDVN+v1iLshx6XiumoIhv21369kIm IWkEKCD66+fXvpdg9tRMppfFuGiYLRuI3svNT2HYMRJNfMEiy+KdSdj0U/m68Bd1bzEDAmoIF D5mBixHQNSR8sOMnxgM1lBL5X2YlFEXVtpvr/XPjUZc3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54dzsIvzaa0Yy/J44smVe7QYRypHxTtytdCMXSX acwxK/4+MKTcD2sTaoBqHpaDwc0k3pFPzwBQCPUJTDVenTkf3A0dDaKaSaTnaFNBBIVOiLWUH uukkPxBL3mai//sgy33O4kZNytb5OHNnBzt+I8Jha/D6+p8hE8YzVqIHJ6qSJbCNAExWDyw0O Cr6iK8h1W1hKAo4U4gBRT7J1NvolSmuO6UB+8D0jG0ph2S59hawQgleToDzjA/XR1aT6u9Ioi x1vWkHGjeIfnj5eacgDeXo3NEuw7vbz6geI6g5XNWC+ZVm48o6PyvTtiw== X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Thu, 10 Jul 2025 21:48:49 +0300 Juri Linkov wrote: >>> Do I understand correctly that you mean such behavior: >>> when `next-line-completion' reaches the bottom of the column >>> it should wrap to the top of the next column? >> >> Yes. >> >>> If you w [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [88.130.49.197 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.227.17.22 listed in sa-trusted.bondedsender.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stephen.berman[at]gmx.net) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.227.17.22 listed in bl.score.senderscore.com] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [212.227.17.22 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Thu, 10 Jul 2025 21:48:49 +0300 Juri Linkov wrote: >>> Do I understand correctly that you mean such behavior: >>> when `next-line-completion' reaches the bottom of the column >>> it should wrap to the top of the next column? >> >> Yes. >> >>> If you w [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.227.17.22 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [212.227.17.22 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [88.130.49.197 listed in zen.spamhaus.org] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.227.17.22 listed in bl.score.senderscore.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stephen.berman[at]gmx.net) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.22 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain On Thu, 10 Jul 2025 21:48:49 +0300 Juri Linkov <juri@HIDDEN> wrote: >>> Do I understand correctly that you mean such behavior: >>> when `next-line-completion' reaches the bottom of the column >>> it should wrap to the top of the next column? >> >> Yes. >> >>> If you will improve `next-line-completion', this will provide >>> symmetry between `next-completion' and `next-line-completion'. >> >> Ok, I've tried to do that in the attached patch. This also required >> changes in `last-completion', which did not DTRT in vertical format. I >> think this patch improves on my previous patch, in terms of both the >> code (which nevertheless remains rather convoluted) and the coverage (my >> previous patch did not work right in vertical format when all columns of >> completions have the same number of lines). I've tested the patch with >> -Q and all combinations of values of `completions-format' and >> `completion-auto-wrap', and the resulting behavior seems sensible in >> each case. > > I expected that the patch would be much simpler: > after wrapping to the top of the current column > would it be enough just to call `next-completion' > to go to the next column on the same first row? > > And for `previous-line-completion' would it be simpler > to call `previous-completion' to go to the previous column, > and afterwards wrap to the bottom of the same column? Thanks for pointing this out; I wonder why it hadn't occurred to me.... I've done this now in the attached patch; I did have to add some special handling for (non-)wrapping according to the value of `completion-auto-wrap', but the overall code changes are much simpler than before, except... > Then for `last-completion' is it possible to call > `first-completion', then `previous-completion' > will go to the last column, then `previous-line-completion' > could wrap to its bottom? ...this doesn't work, because calling `(previous-completion 1)' with point on the first completion item moves point to the last item of the second column, not of last column. I haven't found a simpler way to get the right behavior for `last-completion' in vertical format than what I implemented in the previous patch, so I've kept that in the current patch. >>> Or wrapping to the next column should be optional? >>> Then maybe in your `next-completion-switch', >>> `(next-line-completion n)' should be called with a new argument e.g. >>> `(next-line-completion n 'next-column)'? >> >> I decided not to implement this, because it doesn't seem very useful to >> me: the user can just stop hitting `n', `p', `down' or `up' to avoid >> wrapping (and `left' and `right' still move between columns). > > So to achieve the previous behavior it is easy > to type `left' or `right' after wrapping to go > back to the original column? That only works when the *Completions* buffer contains just two equally long columns of completions. With three columns, or when the final column is shorter than the other(s), simply typing `left' and `right' doesn't always yield the previous behavior. I haven't debugged this yet and, unless there's an easy fix, I'm not sure it's worth the effort, since with at most just a few more keystrokes you can move point to the desired position. (And even in the current code, moving between columns is not always line-preserving when the last column is shorter.) Steve Berman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: next/previous completions patch Content-Transfer-Encoding: quoted-printable diff --git a/lisp/simple.el b/lisp/simple.el index fa173b26289..e20c0ce65a0 100644 =2D-- a/lisp/simple.el +++ b/lisp/simple.el @@ -10041,8 +10041,8 @@ completion-list-mode-map (define-key map [M-down] 'minibuffer-next-completion) (define-key map "\M-\r" 'minibuffer-choose-completion) (define-key map "z" 'kill-current-buffer) - (define-key map "n" 'next-completion) - (define-key map "p" 'previous-completion) + (define-key map "n" 'next-completion-switch) + (define-key map "p" 'previous-completion-switch) (define-key map "\M-g\M-c" 'switch-to-minibuffer) map) "Local map for completion list buffers.") @@ -10124,12 +10124,33 @@ first-completion (defun last-completion () "Move to the last item in the completions buffer." (interactive) + ;; Move to the last item in horizontal or one-column format. (goto-char (previous-single-property-change (point-max) 'mouse-face nil (point-min))) - ;; Move to the start of last one. + ;; Move to the start of the item. (unless (get-text-property (point) 'mouse-face) (when-let* ((pos (previous-single-property-change (point) 'mouse-face= ))) - (goto-char pos)))) + (goto-char pos))) + ;; In vertical format the last item is in the last column even if its + ;; line number is less than that of the last item in earlier columns. + (when (eq completions-format 'vertical) + (let* ((pt (point)) + (col (current-column)) + (last (progn + (first-completion) + (goto-char (pos-eol)) + (goto-char (previous-single-property-change + (point) 'mouse-face)) + (current-column)))) + (when (> last col) + (while (=3D (current-column) last) + (forward-line) + (unless (eobp) + (goto-char (pos-eol)) + (move-to-column last) + (when (=3D (current-column) last) + (setq pt (point)))))) + (goto-char pt)))) =20 (defun previous-completion (n) "Move to the previous item in the completions buffer. @@ -10220,7 +10241,11 @@ next-completion =20 (defun previous-line-completion (&optional n) "Move to completion candidate on the previous line in the completions b= uffer. -With prefix argument N, move back N lines (negative N means move forward)= . +With prefix argument N, move back N lines (negative N means move +forward). In vertical format (see user option `completions-format') +this command moves column-wise through all items in the completions +buffer, in horizontal format movement is confined to the current column +of completions. =20 Also see the `completion-auto-wrap' variable." (interactive "p") @@ -10228,11 +10253,15 @@ previous-line-completion =20 (defun next-line-completion (&optional n) "Move to completion candidate on the next line in the completions buffe= r. -With prefix argument N, move N lines forward (negative N means move backw= ard). +With prefix argument N, move N lines forward (negative N means move +backward). In vertical format (see user option `completions-format') +this command moves column-wise through all items in the completions +buffer, in horizontal format movement is confined to the current column +of completions. =20 Also see the `completion-auto-wrap' variable." (interactive "p") - (let (line column pos found) + (let (line column pos found last first) (when (and (bobp) (> n 0) (get-text-property (point) 'mouse-face) @@ -10257,54 +10286,90 @@ next-line-completion ((< n 0) (first-completion))))) =20 (while (> n 0) - (setq found nil pos nil column (current-column) line (line-number-a= t-pos)) - (completion--move-to-candidate-end) - (while (and (not found) - (eq (forward-line 1) 0) - (not (eobp)) - (move-to-column column)) - (when (get-text-property (point) 'mouse-face) - (setq found t))) - (when (not found) - (if (not completion-auto-wrap) - (last-completion) - (save-excursion - (goto-char (point-min)) - (when (and (eq (move-to-column column) column) - (get-text-property (point) 'mouse-face)) - (setq pos (point))) - (while (and (not pos) (> line (line-number-at-pos))) - (forward-line 1) + (setq found nil pos nil column (current-column) line (line-number-a= t-pos) + last (=3D (point) (save-excursion (last-completion) (point)))= ) + (if (and (eq completions-format 'vertical) + completion-auto-wrap last) + (first-completion) ; Wrap from last to first item. + (completion--move-to-candidate-end) + (while (and (not found) + (eq (forward-line 1) 0) + (not (eobp)) + (move-to-column column)) + (when (get-text-property (point) 'mouse-face) + (setq found t))) + (when (not found) + (if (and (not completion-auto-wrap) + (when (eq completions-format 'vertical) last)) + (last-completion) + (save-excursion + (goto-char (point-min)) (when (and (eq (move-to-column column) column) (get-text-property (point) 'mouse-face)) - (setq pos (point))))) - (if pos (goto-char pos)))) + (setq pos (point))) + (while (and (not pos) (> line (line-number-at-pos))) + (forward-line 1) + (when (and (eq (move-to-column column) column) + (get-text-property (point) 'mouse-face)) + (setq pos (point))))) + (if pos (goto-char pos)) + (when (eq completions-format 'vertical) + (next-completion 1))))) ; Move to next column. (setq n (1- n))) =20 (while (< n 0) - (setq found nil pos nil column (current-column) line (line-number-a= t-pos)) - (completion--move-to-candidate-start) - (while (and (not found) - (eq (forward-line -1) 0) - (move-to-column column)) - (when (get-text-property (point) 'mouse-face) - (setq found t))) - (when (not found) - (if (not completion-auto-wrap) - (first-completion) - (save-excursion - (goto-char (point-max)) - (when (and (eq (move-to-column column) column) - (get-text-property (point) 'mouse-face)) - (setq pos (point))) - (while (and (not pos) (< line (line-number-at-pos))) - (forward-line -1) + (setq found nil pos nil column (current-column) line (line-number-a= t-pos) + first (=3D (point) (save-excursion (first-completion) (point)= ))) + (if (and (eq completions-format 'vertical) + completion-auto-wrap first) + (last-completion) ; Wrap from first to last item. + (completion--move-to-candidate-start) + (while (and (not found) + (eq (forward-line -1) 0) + (move-to-column column)) + (when (get-text-property (point) 'mouse-face) + (setq found t))) + (when (not found) + (if (and (not completion-auto-wrap) + (when (eq completions-format 'vertical) first)) + (first-completion) + (save-excursion + (goto-char (point-max)) (when (and (eq (move-to-column column) column) (get-text-property (point) 'mouse-face)) - (setq pos (point))))) - (if pos (goto-char pos)))) + (setq pos (point))) + (while (and (not pos) (< line (line-number-at-pos))) + (forward-line -1) + (when (and (eq (move-to-column column) column) + (get-text-property (point) 'mouse-face)) + (setq pos (point))))) + (if pos (goto-char pos)) + (when (eq completions-format 'vertical) + (previous-completion 1) ; Move to previous column. + (setq column (current-column)) + ;; Move to last item in this column (previous column may + ;; have fewer items). + (while (not (eobp)) + (move-to-column column) + (setq pos (point)) + (forward-line)) + (goto-char pos))))) (setq n (1+ n))))) =20 +(defun next-completion-switch (&optional n) + "Move according to `completions-format' to next completion item." + (interactive "p") + (pcase completions-format + ('vertical (next-line-completion n)) + (_ (next-completion n)))) + +(defun previous-completion-switch (&optional n) + "Move according to `completions-format' to previous completion item." + (interactive "p") + (pcase completions-format + ('vertical (previous-line-completion n)) + (_ (previous-completion n)))) + (defvar choose-completion-deselect-if-after nil "If non-nil, don't choose a completion candidate if point is right afte= r it. =20 --=-=-=--
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 11 Jul 2025 16:14:02 +0000 Resent-Message-ID: <handler.78959.B78959.175225043330061 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175225043330061 (code B ref 78959); Fri, 11 Jul 2025 16:14:02 +0000 Received: (at 78959) by debbugs.gnu.org; 11 Jul 2025 16:13:53 +0000 Received: from localhost ([127.0.0.1]:38840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uaGNk-0007oh-Di for submit <at> debbugs.gnu.org; Fri, 11 Jul 2025 12:13:52 -0400 Received: from mout-y-209.mailbox.org ([91.198.250.237]:47426) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uaGNh-0007nr-8O for 78959 <at> debbugs.gnu.org; Fri, 11 Jul 2025 12:13:50 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-209.mailbox.org (Postfix) with ESMTPS id 4bdxbQ5xzkzB0bb; Fri, 11 Jul 2025 18:13:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1752250418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=o5J08Ry0B2/F6+dHxt8EeDFrBDs5lbF35DeYSO/xjsw=; b=v8ZFQXEhv+FkdO21z3f1MhGMX49/yHArCd84nVhP7tAxxME+/Cpsm6xojI+EOJI9pf+v+r NUkdNoHI4rds9XRD4W3uAMVOeSeZAuGqnVI1iKCaqqqswF5LDrFdj5hg+GBB6tCuSeyZL4 HfAZ276JeQoRNDljy1pPCAzblNPqedazAc10n8WHf+JrMKoVu7vnj1fwQk4cFkwviyr7FK iGpYfDqzOWznz9cgCnjQAq6HcKN+DDAo6b9bN5iTyoYf2WmaEva+7uk4/VHa82KGuuukGn DquNGEqL3QvCTmUmVx2gY9ATb5SdQs9f+W3vWrl8mR3KAMAu88E+ghY1IakL7A== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=juri@HIDDEN From: Juri Linkov <juri@HIDDEN> In-Reply-To: <8734b3otqn.fsf@HIDDEN> Organization: LINKOV.NET References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> Date: Fri, 11 Jul 2025 19:03:33 +0300 Message-ID: <87ikjyeqqi.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4bdxbQ5xzkzB0bb X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >> Then for `last-completion' is it possible to call >> `first-completion', then `previous-completion' >> will go to the last column, then `previous-line-completion' >> could wrap to its bottom? > > ...this doesn't work, because calling `(previous-completion 1)' with > point on the first completion item moves point to the last item of the > second column, not of last column. I haven't found a simpler way to get > the right behavior for `last-completion' in vertical format than what I > implemented in the previous patch, so I've kept that in the current > patch. This is an interesting case: instead of going to the last column of the last row, for vertical format we need to go to the last row of the last column. There is no simple way because `previous-completion' doesn't keep the same row when wrapping (and shouldn't). > - (define-key map "n" 'next-completion) > - (define-key map "p" 'previous-completion) > + (define-key map "n" 'next-completion-switch) > + (define-key map "p" 'previous-completion-switch) Before installing the final version of the patch could we find a better names for these commands? Given that 'next-completion' moves column-wise, and 'next-line-completion' moves line-wise, what word would describe the behavior of the new commands that choose the motion direction based on whether the completion list is formatted horizontally or vertically? Maybe 'next-completion-adaptive'? Or something that makes a reference to "logical order"?
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Stephen Berman <stephen.berman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 11 Jul 2025 17:03:01 +0000 Resent-Message-ID: <handler.78959.B78959.175225336413656 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov <juri@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175225336413656 (code B ref 78959); Fri, 11 Jul 2025 17:03:01 +0000 Received: (at 78959) by debbugs.gnu.org; 11 Jul 2025 17:02:44 +0000 Received: from localhost ([127.0.0.1]:39168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uaH91-0003YB-U0 for submit <at> debbugs.gnu.org; Fri, 11 Jul 2025 13:02:44 -0400 Received: from mout.gmx.net ([212.227.17.20]:47401) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>) id 1uaH8y-0003Xh-Nd for 78959 <at> debbugs.gnu.org; Fri, 11 Jul 2025 13:02:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1752253354; x=1752858154; i=stephen.berman@HIDDEN; bh=4G8FrKuHC1Tww+dPksGjusFXzXVdWLRabuI4bcMdGuo=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=I0Y/mTcWJNbXeTN98M55drQ8USciQUKs6WZG+NAJ+De0p6yzZa5JwroHUiUmJ/mj XN2mShVwSBuOEJvEh/9DYzseFfCMyyxzvj0BtT9jQy66YCXeUQN0LgaPFmm81nmBE b94z/5xgaT5FMlIRw1tNgYWFtxTVrz+7Meg3FmW9szwAP2UXB9IfjV/P/hPSYJAmo fWmHNZzhOR+VnCw8NtfQySIl5mGCgyIIliL1yeF5l24sYAhb5NoKuOEF9xohRgkfU qifCDUAFbBfTSKR1iM9qLdIO7cx1VESnaqahotNC2pEE/mYz4+2KQi61F4qIKbkBK 3qfZk7saDCh5dn0KZg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([88.130.49.197]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MhU9j-1v5V1u3xNj-00oNV5; Fri, 11 Jul 2025 19:02:34 +0200 From: Stephen Berman <stephen.berman@HIDDEN> In-Reply-To: <87ikjyeqqi.fsf@HIDDEN> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> Date: Fri, 11 Jul 2025 19:02:33 +0200 Message-ID: <87tt3ioe3a.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:esi4rcCUUKzdETdWqpJCuMBWrwUE81TSLnSYooXR7UVGdgFPm3v 1ubt3v3dvTapYK9IZqsdufmaJr/C/yIm+b4GeorQ317sXIG2y5750F3dt4q6614wKhu25hF E6FjzwB8ErH6Yf3j7p8rmsZQJJk/7FTdOeYa7q1ebXaP2D78vbrbNmheFE/05w+kCy2cSAR TWdiq8pCYNjL63wMJu2Ig== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:7HsJXDi51RI=;iLY/ZtXiw81UAPM2OptxC/lZWvW K4p4fn/s3USirnDtyqT0s4LeCxBYVYIuj2fk20Y911DD4ba+FvM2wOrOAoAGfj24WKFDNIY8o Saw2M/h5D2tbUo+b7sQemu0iU9Loj2FrFlSQG4uJaA0c8/dfnz/zh6tYqZms9ayjjFxOsDPg7 8Kgu7/jccAvOX7n3qlwvc/RFXpq1DA7fNkBpLskZ2NKaozG7irZIHOxJcPdU5eBG5ylHuFW1v 3IsWV6/GI5QZHIsrg4znBoe9lvlWn6GZkWQ+AWFPRNBRgsQ7JT3nY63ou/mxIZGqIT5Hzs/Qn CVFDXuFvifk7dQJojZippjBR5bux5S9Q+yD03cNcQ+zo0MBIWBBcT1qjmhYaM3w9cqvDEBQnQ IeMtjCxzE7tX9PAPFAsYTtLxU34bO9qpj5OVSml4LJKv5VMZ0Yas6ZZta/PGGZG1EXSjGBmp0 Q77Id5oMbRU/BKG2xaeWgpYrd07pDgfC+TJG8LgNlShGpKERKIg/Ql6tRVDzjJrmSyxiHWEST TibLkikkKXFNz9IriDEE/DsMsv53uhLK4y6DF+kVoqs6hAyd3tMqWiUyeWYD9mhRqvbmEJ1+l fQCqWk3vQiQHlnPH0X7Q0o9PR0fj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C1by0vGqZ1NaN02uajwi UZdzUvAAzdfH7OmFO/SkUtxK6gJgSQG+gDoGVZuwPkrsUjDsg07kYvN1vESz4fEbGqeLwftOI NXjauoNrUJo6GCdJ4uZQdKuJbBQ9X+8/lQE+7ML+Eodc0mvDHaKNgRozWCKB3jjBpQODqXr4X vc6A3ebPucSAmUPqrxXJXWr7kRIeNICcqXwgUME8WvS7eyUpeiYDgcHPA9MJKoYwPJZrCOXQF /wz6S8HlZrzwvlerbq6y1f/tHYme88U/AO2c03mrLTPy0KOfAeasYLRdCFGW9k4NWC2Kxh96w peHJVHXiBV0AMCANAxPNhv2cjKpzKk5UHAGpppX903LumnkJZiN17n+dH7zlFxbDS8FJa5oM/ iSwCpH2UIB4fOu7iQqxxoSFwIG0ddV5Uq1KOTF55oad19l5WAL6c4oV0bGSQ/NbcSZFt/iqh6 j4j8WKbfsoPegkQIIbdVPbulcIQMviTy14eInKyFSx87Y/7iLErWKSPjQ+m2R4AOfdTG4/wa/ f3dhEQRIyE+soCX4pv16EZ4vdNDwN7vJ/2UQPwotXHwVAxV1DYnZ9a4qqr3Lx8jWRv2lv2RWl VKrNyjkkU9JuxzbHg0UAn64IfXPYdqrdpZovRSge9WBoJPdE4G++4MRryjTUB+iiN39gJMJqF l5dDjx2D0SkmbZwbC+b8LFWP+6rgb3uwvNxrSAjJ1o4FRVR/X+0HsbEAVrr9lxYG4dybI8Tko /XJjZvclAExHDDexYQVAcTKoymlJvlYRYOs/iKiK6RR+avzDcf4hy//H3pzpgprCNqxu64WpX 8gDoXkPxFgUVFCQfkxf0+Wxc9rcbUih66UzWh9PsuG+D X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Fri, 11 Jul 2025 19:03:33 +0300 Juri Linkov wrote: >>> Then for `last-completion' is it possible to call >>> `first-completion', then `previous-completion' >>> will go to the last column, then `previous-line-completion' >>> could wrap to its bottom? > [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stephen.berman[at]gmx.net) 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.227.17.20 listed in sa-trusted.bondedsender.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [212.227.17.20 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [88.130.49.197 listed in zen.spamhaus.org] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.227.17.20 listed in bl.score.senderscore.com] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.20 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Fri, 11 Jul 2025 19:03:33 +0300 Juri Linkov wrote: >>> Then for `last-completion' is it possible to call >>> `first-completion', then `previous-completion' >>> will go to the last column, then `previous-line-completion' >>> could wrap to its bottom? > [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [212.227.17.20 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.20 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.227.17.20 listed in bl.score.senderscore.com] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.227.17.20 listed in sa-trusted.bondedsender.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [88.130.49.197 listed in zen.spamhaus.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stephen.berman[at]gmx.net) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager On Fri, 11 Jul 2025 19:03:33 +0300 Juri Linkov <juri@HIDDEN> wrote: >>> Then for `last-completion' is it possible to call >>> `first-completion', then `previous-completion' >>> will go to the last column, then `previous-line-completion' >>> could wrap to its bottom? >> >> ...this doesn't work, because calling `(previous-completion 1)' with >> point on the first completion item moves point to the last item of the >> second column, not of last column. I haven't found a simpler way to get >> the right behavior for `last-completion' in vertical format than what I >> implemented in the previous patch, so I've kept that in the current >> patch. > > This is an interesting case: instead of going to the last column of > the last row, for vertical format we need to go to the last row of > the last column. There is no simple way because `previous-completion' > doesn't keep the same row when wrapping (and shouldn't). That's basically my conclusion as well. >> - (define-key map "n" 'next-completion) >> - (define-key map "p" 'previous-completion) >> + (define-key map "n" 'next-completion-switch) >> + (define-key map "p" 'previous-completion-switch) > > Before installing the final version of the patch > could we find a better names for these commands? Hopefully; these were just placeholders, because I couldn't think of anything better. > Given that 'next-completion' moves column-wise, and > 'next-line-completion' moves line-wise, what word > would describe the behavior of the new commands > that choose the motion direction based on whether > the completion list is formatted horizontally or vertically? > Maybe 'next-completion-adaptive'? Or something that > makes a reference to "logical order"? It's too bad `next-completion' wasn't called `next-column-completion' (and likewise for `previous-completion'), but I guess we can't change that now. "-adaptive" and "-logical" seem too vague or unspecific. Perhaps "-direction" or "-bearing" or "-orientation"? Though they all sound rather clumsy. Or "-axis"? Should I ask for suggestions on emacs-devel? Steve Berman
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 13 Jul 2025 06:56:02 +0000 Resent-Message-ID: <handler.78959.B78959.175238970911341 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175238970911341 (code B ref 78959); Sun, 13 Jul 2025 06:56:02 +0000 Received: (at 78959) by debbugs.gnu.org; 13 Jul 2025 06:55:09 +0000 Received: from localhost ([127.0.0.1]:50675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uaqc8-0002wi-VF for submit <at> debbugs.gnu.org; Sun, 13 Jul 2025 02:55:09 -0400 Received: from mout-y-209.mailbox.org ([91.198.250.237]:55162) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uaqc3-0002sV-M6 for 78959 <at> debbugs.gnu.org; Sun, 13 Jul 2025 02:55:06 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-209.mailbox.org (Postfix) with ESMTPS id 4bfx5q3hdtzB0FV; Sun, 13 Jul 2025 08:54:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1752389695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/ZxBTj0NYIkK7TWRgR/ZdVUJ2ceAcN8mpApmaUgvB1A=; b=LR8V2QTUfNTK83h98PJPEXppPPVsIQpNcQrIHyxUgL4y8/t8dF1StL9MnICnUYgN3wrIDH BMkx7nISSTYbBFUTcH8Vn/XCcDi2eIeUkql7gvspTvUlmeHxJpYMfrJsVchSo4Vvl9vUb+ qyQZ72/VJcSqKPbg7L8RJRkr75460Fdb9YkLRvq2EXK9U1RQ2ELz3giSQGY48LF/zwXY7D BJfpXtYDd43Sk4Mh01NfaaSmuKcHTBCj1V48v5YCMqGul3nVMLrtk+jmXw9a8pvb0qAHxd 6PCXpgZveOQGOYV1b+rB1NHr0BPXSxUXDNdGKf0M1JENoPaDgF6x7ry7bY4JtQ== From: Juri Linkov <juri@HIDDEN> In-Reply-To: <87tt3ioe3a.fsf@HIDDEN> Organization: LINKOV.NET References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> <87tt3ioe3a.fsf@HIDDEN> Date: Sun, 13 Jul 2025 09:50:47 +0300 Message-ID: <875xfwbo14.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >> Given that 'next-completion' moves column-wise, and >> 'next-line-completion' moves line-wise, what word >> would describe the behavior of the new commands >> that choose the motion direction based on whether >> the completion list is formatted horizontally or vertically? >> Maybe 'next-completion-adaptive'? Or something that >> makes a reference to "logical order"? > > It's too bad `next-completion' wasn't called `next-column-completion' > (and likewise for `previous-completion'), but I guess we can't change > that now. "-adaptive" and "-logical" seem too vague or unspecific. `next-column-completion' would be perfect. And it looks safe since it requires changing only 2 keybindings [left] and [right]: (define-key map [up] 'previous-line-completion) (define-key map [down] 'next-line-completion) (define-key map [left] 'previous-column-completion) (define-key map [right] 'next-column-completion) (define-key map [?\t] 'next-completion) (define-key map [backtab] 'previous-completion) (define-key map "n" 'next-completion) (define-key map "p" 'previous-completion) All other keybindings "n", "p", TAB, S-TAB will be directional depending on 'completions-format'. > Perhaps "-direction" or "-bearing" or "-orientation"? Though they all > sound rather clumsy. Or "-axis"? Should I ask for suggestions on > emacs-devel? Probably emacs-devel should be notified on addition of `next-column-completion'.
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Stephen Berman <stephen.berman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 14 Jul 2025 22:38:02 +0000 Resent-Message-ID: <handler.78959.B78959.175253265825703 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov <juri@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175253265825703 (code B ref 78959); Mon, 14 Jul 2025 22:38:02 +0000 Received: (at 78959) by debbugs.gnu.org; 14 Jul 2025 22:37:38 +0000 Received: from localhost ([127.0.0.1]:37267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ubRnl-0006gR-15 for submit <at> debbugs.gnu.org; Mon, 14 Jul 2025 18:37:38 -0400 Received: from mout.gmx.net ([212.227.17.22]:45055) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>) id 1ubRnh-0006fv-5h for 78959 <at> debbugs.gnu.org; Mon, 14 Jul 2025 18:37:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1752532634; x=1753137434; i=stephen.berman@HIDDEN; bh=StYi6eAtUNS/Pm7yiLwtYtE1MDUGYG9r2FNK+Y7z1+M=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=MGih8xSRvHn6kh13cUXIG6GiLohUS/UCufh+kI4ciHvbk5kXspk08rj3sk3N9sOr AdjUnAkmwMT/UsNYINSHkpxsW4M0gutiG+0rvn8cRpCEgyEBSzSq5JOHWV46OCyMH tWzowdndE5pCDKnVExB2l4m0Wr8QwoTCCVyTjmNUMxhHJkU3Ej3CiD62RhFQ7WiYP 0zRa4Uv2k6SEeQKvbnMzUZlK+tPtaEaUTfRcg3LT3jlXjA8jq52a6pRrq3MAUD/Hf LlymOmpsosf7qdpejus3pzhF9GSmRxYxMmVdm0HIq9S32vjyzqafO8aozq6BO3Skr o7aH0GaA3DJKo+G35A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([88.130.48.173]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MiJVG-1v5ZHT3qvG-00n0IN; Tue, 15 Jul 2025 00:37:14 +0200 From: Stephen Berman <stephen.berman@HIDDEN> In-Reply-To: <875xfwbo14.fsf@HIDDEN> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> <87tt3ioe3a.fsf@HIDDEN> <875xfwbo14.fsf@HIDDEN> Date: Tue, 15 Jul 2025 00:37:13 +0200 Message-ID: <87v7nu4cx2.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:JeVH6Iqq0SrEAzdog6KUYWQdkG77tb43ZSkcNlrP+ToL67Rzava WZjoEza9+i5HCXn80ozVeRI5HlAMFl1+SyNAyrNPw99JVDM6cSIoSAHFsdA0HrjaS18e05t hlzHz641wzw0/D02p+nBZ0X+7q88XjqDqhhS/o+OKyjfrC4aisA3Us30vnuUUB8ONgh2Zzw 5kKv1v7KpIJQDD1ryY8VQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:4857CZC8uI8=;cigXEjBTH6xAkOPh5Xn5I+K0Ns/ djue+t9btefhY8ZQA0qTViBEXXi86WE+nBYPkEZNyt+ezpVrO5thVKeQOUXfQumijmqgufO9K AdkfTqk3Bkn1g2/hzD7om1+ma9PIzaCJh9/1VTxSlhybUD2Qq6q3DwTUMlDmYg2dA8+50Dx6/ N3kcYO5vSDqkyMozbltv3/QN1wMDNSwnsmaEwvUts/P0Cando18e0p7A6Dfy8XXhkr284GM9F CcCs0V6cRRH+sqVzLAog01+Zgn5q7y3sT7K9nL9h19T/JkoQtTCYBuOOxVenSODZuXHNZmRvs DrnMH0FYfNzmyc63XVNz1wOgUcKaD5BIiDugEghLQyttJOruJGfDPmOeGYZj9/QCsqDlw621+ sJaqXhWMUDXeZckYc+L344vULhreV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ETfcmbKq1/P0zdVqSuDcimwWWp RlHZ3BAeWR9+qHUKTt2Y2H7ZrV4RDAiavyqq+Fb+1TPa+8Vd+pOUHQqnQ== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain On Sun, 13 Jul 2025 09:50:47 +0300 Juri Linkov <juri@HIDDEN> wrote: >>> Given that 'next-completion' moves column-wise, and >>> 'next-line-completion' moves line-wise, what word >>> would describe the behavior of the new commands >>> that choose the motion direction based on whether >>> the completion list is formatted horizontally or vertically? >>> Maybe 'next-completion-adaptive'? Or something that >>> makes a reference to "logical order"? >> >> It's too bad `next-completion' wasn't called `next-column-completion' >> (and likewise for `previous-completion'), but I guess we can't change >> that now. "-adaptive" and "-logical" seem too vague or unspecific. > > `next-column-completion' would be perfect. And it looks safe > since it requires changing only 2 keybindings [left] and [right]: > > (define-key map [up] 'previous-line-completion) > (define-key map [down] 'next-line-completion) > (define-key map [left] 'previous-column-completion) > (define-key map [right] 'next-column-completion) > (define-key map [?\t] 'next-completion) > (define-key map [backtab] 'previous-completion) > (define-key map "n" 'next-completion) > (define-key map "p" 'previous-completion) > > All other keybindings "n", "p", TAB, S-TAB will be directional > depending on 'completions-format'. I've done this in the attached patch; however, this changes the public API backward incompatibly, so getting the Emacs maintainers to accept it may be a very hard sell. There's only one use of `next-completion' in the Emacs tree (besides `previous-completion', which is part of the same API change): `minibuffer-next-completion', so we can (and must) adjust that accordingly, which the attached patch does (the patch contains other changes to minibuffer.el needed to make navigation of the *Completions* buffer in the vertical format work as intended from the minibuffer, as described in the NEWS announcement in the patch; those changes are independent of the question of repurposing `{next,previous}-completion'). But any external code that uses the original implementation of these commands would be broken by the change. The patch contains a second NEWS entry under incompatible Lisp changes calling this out, and the needed adjustment is simple, as the minibuffer.el patch illustrates, so maybe such breakage is acceptable. If not, then we may have no choice but to find an acceptable name for the command that calls the navigation commands based on the value of `completions-format'. (Some changes to the "Completion" node of the Emacs manual may also be needed, but I've refrained from doing that until the issue of the command names is settled.) Steve Berman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: next/previous completions patch Content-Transfer-Encoding: quoted-printable diff --git a/etc/NEWS b/etc/NEWS index 0653ce74287..afc8b025a19 100644 =2D-- a/etc/NEWS +++ b/etc/NEWS @@ -192,6 +192,23 @@ different values for completion-affecting variables l= ike applies for the styles configuration in 'completion-category-overrides' and 'completion-category-defaults'. =20 +--- +*** Navigating "*Completions*" now takes completions format into account. +When 'completions-format' is set to 'vertical', typing 'n' or 'p' in the +"*Completions*" buffer now moves point to the item in the next or +previous line in the current column, and wraps to the next or previous +column when typed on the last or first item, respectively, of the +current column. Likewise when typing 'M-<down>' or 'M-<up>' (or, when +'minibuffer-visible-completions' is non-nil, simply '<down>' or '<up>') +in the minibuffer. Previously, typing 'n' or 'p' in "*Completions*", or +'M-<down>' or 'M-<up>' in the minibuffer, ignored the vertical format, +i.e., moved point only to the item in the same line of next or previous +column, respectively, in accordance with the default horizontal format. +(With 'minibuffer-visible-completions' is non-nil, typing '<down>' or +'<up>' previously moved point only within the current column, i.e., did +not wrap to the next or previous column; now it does, but you can, as +before, still use '<left>' and '<right>' to navigate between columns.) + --- *** Selected completion candidate is preserved across "*Completions*" upd= ates. When point is on a completion candidate in the "*Completions*" buffer @@ -2469,6 +2486,17 @@ instead, which gives the time offset as +/-hh or +/= -hh:mm. A designator formats, like "2025-06-04 13:21:00 EDT", without the ISO 8601 "T" separator, are also supported. =20 +** 'next-completion' and 'previous-completion' now use 'completions-forma= t'. +Previously, these commands only took horizontal format into account; +now, they delegate to '{next,previous}-line-completion' or to +'{next,previous}-column-completion' depending on the value of +'completions-format'. The latter two commands are merely new names for +the previous implementations of '{next,previous}-completion', which +better reflect that they only take the (default) horizontal completions +format into account. Because of this repurposing of +'{next,previous}-completion', any external code using these functions +based on the previous implementations must be ajusted accordingly. + =0C * Lisp Changes in Emacs 31.1 =20 diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 122459be062..3ff749dbaf1 100644 =2D-- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -3306,8 +3306,8 @@ minibuffer-visible-completions--bind =20 (defvar-keymap minibuffer-visible-completions-map :doc "Local keymap for minibuffer input with visible completions." - "<left>" (minibuffer-visible-completions--bind #'minibuffer-previous-c= ompletion) - "<right>" (minibuffer-visible-completions--bind #'minibuffer-next-compl= etion) + "<left>" (minibuffer-visible-completions--bind #'minibuffer-previous-c= olumn-completion) + "<right>" (minibuffer-visible-completions--bind #'minibuffer-next-colum= n-completion) "<up>" (minibuffer-visible-completions--bind #'minibuffer-previous-l= ine-completion) "<down>" (minibuffer-visible-completions--bind #'minibuffer-next-line-= completion) "RET" (minibuffer-visible-completions--bind #'minibuffer-choose-com= pletion-or-exit) @@ -5084,15 +5084,15 @@ minibuffer-next-completion "Move to the next item in its completions window from the minibuffer. When the optional argument VERTICAL is non-nil, move vertically to the next item on the next line using `next-line-completion'. -Otherwise, move to the next item horizontally using `next-completion'. +Otherwise, move to the next item horizontally using `next-column-completi= on'. When `minibuffer-completion-auto-choose' is non-nil, then also insert the selected completion candidate to the minibuffer." (interactive "p") (let ((auto-choose minibuffer-completion-auto-choose)) (with-minibuffer-completions-window - (if vertical + (if (or vertical (eq completions-format 'vertical)) (next-line-completion (or n 1)) - (next-completion (or n 1))) + (next-column-completion (or n 1))) (when auto-choose (let ((completion-auto-deselect nil)) (choose-completion nil t t)))))) @@ -5122,6 +5122,26 @@ minibuffer-previous-line-completion (interactive "p") (minibuffer-next-completion (- (or n 1)) t)) =20 +(defun minibuffer-next-column-completion (&optional n) + "Move to the next completion column from the minibuffer. +This means to move to the completion candidate in the next column +in the *Completions* buffer while point stays in the minibuffer. +When `minibuffer-completion-auto-choose' is non-nil, then also +insert the selected completion candidate to the minibuffer." + (interactive "p") + (with-minibuffer-completions-window + (next-column-completion (or n 1)))) + +(defun minibuffer-previous-column-completion (&optional n) + "Move to the previous completion column from the minibuffer. +This means to move to the completion candidate on the previous column +in the *Completions* buffer while point stays in the minibuffer. +When `minibuffer-completion-auto-choose' is non-nil, then also +insert the selected completion candidate to the minibuffer." + (interactive "p") + (with-minibuffer-completions-window + (next-column-completion (- (or n 1))))) + (defun minibuffer-choose-completion (&optional no-exit no-quit) "Run `choose-completion' from the minibuffer in its completions window. With prefix argument NO-EXIT, insert the completion candidate at point to diff --git a/lisp/simple.el b/lisp/simple.el index f2a66bbfba2..0a94d8051f2 100644 =2D-- a/lisp/simple.el +++ b/lisp/simple.el @@ -10064,8 +10064,8 @@ completion-list-mode-map (define-key map [remap keyboard-quit] #'delete-completion-window) (define-key map [up] 'previous-line-completion) (define-key map [down] 'next-line-completion) - (define-key map [left] 'previous-completion) - (define-key map [right] 'next-completion) + (define-key map [left] 'previous-column-completion) + (define-key map [right] 'next-column-completion) (define-key map [?\t] 'next-completion) (define-key map [backtab] 'previous-completion) (define-key map [M-up] 'minibuffer-previous-completion) @@ -10155,21 +10155,42 @@ first-completion (defun last-completion () "Move to the last item in the completions buffer." (interactive) + ;; Move to the last item in horizontal or one-column format. (goto-char (previous-single-property-change (point-max) 'mouse-face nil (point-min))) - ;; Move to the start of last one. + ;; Move to the start of the item. (unless (get-text-property (point) 'mouse-face) (when-let* ((pos (previous-single-property-change (point) 'mouse-face= ))) - (goto-char pos)))) - -(defun previous-completion (n) - "Move to the previous item in the completions buffer. -With prefix argument N, move back N items (negative N means move + (goto-char pos))) + ;; In vertical format the last item is in the last column even if its + ;; line number is less than that of the last item in earlier columns. + (when (eq completions-format 'vertical) + (let* ((pt (point)) + (col (current-column)) + (last (progn + (first-completion) + (goto-char (pos-eol)) + (goto-char (previous-single-property-change + (point) 'mouse-face)) + (current-column)))) + (when (> last col) + (while (=3D (current-column) last) + (forward-line) + (unless (eobp) + (goto-char (pos-eol)) + (move-to-column last) + (when (=3D (current-column) last) + (setq pt (point)))))) + (goto-char pt)))) + +(defun previous-column-completion (n) + "Move to the item in the previous column of the completions buffer. +With prefix argument N, move back N columns (negative N means move forward). =20 Also see the `completion-auto-wrap' variable." (interactive "p") - (next-completion (- n))) + (next-column-completion (- n))) =20 (defun completion--move-to-candidate-start () "If in a completion candidate, move point to its start." @@ -10185,9 +10206,9 @@ completion--move-to-candidate-end (get-text-property (1+ (point)) 'mouse-face)) (goto-char (or (next-single-property-change (point) 'mouse-face) (poi= nt-max))))) =20 -(defun next-completion (n) - "Move to the next item in the completions buffer. -With prefix argument N, move N items (negative N means move +(defun next-column-completion (n) + "Move to the item in the next column of the completions buffer. +With prefix argument N, move N columns (negative N means move backward). =20 Also see the `completion-auto-wrap' variable." @@ -10251,7 +10272,11 @@ next-completion =20 (defun previous-line-completion (&optional n) "Move to completion candidate on the previous line in the completions b= uffer. -With prefix argument N, move back N lines (negative N means move forward)= . +With prefix argument N, move back N lines (negative N means move +forward). In vertical format (see user option `completions-format') +this command moves line-wise through all columns in the completions +buffer, in horizontal format movement is confined to the current column +of completions. =20 Also see the `completion-auto-wrap' variable." (interactive "p") @@ -10259,11 +10284,15 @@ previous-line-completion =20 (defun next-line-completion (&optional n) "Move to completion candidate on the next line in the completions buffe= r. -With prefix argument N, move N lines forward (negative N means move backw= ard). +With prefix argument N, move N lines forward (negative N means move +backward). In vertical format (see user option `completions-format') +this command moves line-wise through all columns in the completions +buffer, in horizontal format movement is confined to the current column +of completions. =20 Also see the `completion-auto-wrap' variable." (interactive "p") - (let (line column pos found) + (let (line column pos found last first) (when (and (bobp) (> n 0) (get-text-property (point) 'mouse-face) @@ -10288,54 +10317,98 @@ next-line-completion ((< n 0) (first-completion))))) =20 (while (> n 0) - (setq found nil pos nil column (current-column) line (line-number-a= t-pos)) - (completion--move-to-candidate-end) - (while (and (not found) - (eq (forward-line 1) 0) - (not (eobp)) - (move-to-column column)) - (when (get-text-property (point) 'mouse-face) - (setq found t))) - (when (not found) - (if (not completion-auto-wrap) - (last-completion) - (save-excursion - (goto-char (point-min)) - (when (and (eq (move-to-column column) column) - (get-text-property (point) 'mouse-face)) - (setq pos (point))) - (while (and (not pos) (> line (line-number-at-pos))) - (forward-line 1) + (setq found nil pos nil column (current-column) line (line-number-a= t-pos) + last (=3D (point) (save-excursion (last-completion) (point)))= ) + (if (and (eq completions-format 'vertical) + completion-auto-wrap last) + (first-completion) ; Wrap from last to first item. + (completion--move-to-candidate-end) + (while (and (not found) + (eq (forward-line 1) 0) + (not (eobp)) + (move-to-column column)) + (when (get-text-property (point) 'mouse-face) + (setq found t))) + (when (not found) + (if (and (not completion-auto-wrap) + (when (eq completions-format 'vertical) last)) + (last-completion) + (save-excursion + (goto-char (point-min)) (when (and (eq (move-to-column column) column) (get-text-property (point) 'mouse-face)) - (setq pos (point))))) - (if pos (goto-char pos)))) + (setq pos (point))) + (while (and (not pos) (> line (line-number-at-pos))) + (forward-line 1) + (when (and (eq (move-to-column column) column) + (get-text-property (point) 'mouse-face)) + (setq pos (point))))) + (if pos (goto-char pos)) + (when (eq completions-format 'vertical) + (next-column-completion 1))))) ; Move to next column. (setq n (1- n))) =20 (while (< n 0) - (setq found nil pos nil column (current-column) line (line-number-a= t-pos)) - (completion--move-to-candidate-start) - (while (and (not found) - (eq (forward-line -1) 0) - (move-to-column column)) - (when (get-text-property (point) 'mouse-face) - (setq found t))) - (when (not found) - (if (not completion-auto-wrap) - (first-completion) - (save-excursion - (goto-char (point-max)) - (when (and (eq (move-to-column column) column) - (get-text-property (point) 'mouse-face)) - (setq pos (point))) - (while (and (not pos) (< line (line-number-at-pos))) - (forward-line -1) + (setq found nil pos nil column (current-column) line (line-number-a= t-pos) + first (=3D (point) (save-excursion (first-completion) (point)= ))) + (if (and (eq completions-format 'vertical) + completion-auto-wrap first) + (last-completion) ; Wrap from first to last item. + (completion--move-to-candidate-start) + (while (and (not found) + (eq (forward-line -1) 0) + (move-to-column column)) + (when (get-text-property (point) 'mouse-face) + (setq found t))) + (when (not found) + (if (and (not completion-auto-wrap) + (when (eq completions-format 'vertical) first)) + (first-completion) + (save-excursion + (goto-char (point-max)) (when (and (eq (move-to-column column) column) (get-text-property (point) 'mouse-face)) - (setq pos (point))))) - (if pos (goto-char pos)))) + (setq pos (point))) + (while (and (not pos) (< line (line-number-at-pos))) + (forward-line -1) + (when (and (eq (move-to-column column) column) + (get-text-property (point) 'mouse-face)) + (setq pos (point))))) + (if pos (goto-char pos)) + (when (eq completions-format 'vertical) + (previous-column-completion 1) ; Move to previous column. + (setq column (current-column)) + ;; Move to last item in this column (previous column may + ;; have fewer items). + (while (not (eobp)) + (move-to-column column) + (setq pos (point)) + (forward-line)) + (goto-char pos))))) (setq n (1+ n))))) =20 +(defun next-completion (&optional n) + "Move according to `completions-format' to next completion item. +In horizontal format movement is between columns within the same line, +in vertical format between lines within the same column. With non-nil +`completion-auto-wrap', movement continues to the next line or column, +respectively." + (interactive "p") + (pcase completions-format + ('vertical (next-line-completion n)) + (_ (next-column-completion n)))) + +(defun previous-completion (&optional n) + "Move according to `completions-format' to previous completion item. +In horizontal format movement is between columns within the same line, +in vertical format between lines within the same column. With non-nil +`completion-auto-wrap', movement continues to the next line or column, +respectively." + (interactive "p") + (pcase completions-format + ('vertical (previous-line-completion n)) + (_ (previous-column-completion n)))) + (defvar choose-completion-deselect-if-after nil "If non-nil, don't choose a completion candidate if point is right afte= r it. =20 --=-=-=--
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 15 Jul 2025 11:53:01 +0000 Resent-Message-ID: <handler.78959.B78959.17525803433699 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN, juri@HIDDEN Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.17525803433699 (code B ref 78959); Tue, 15 Jul 2025 11:53:01 +0000 Received: (at 78959) by debbugs.gnu.org; 15 Jul 2025 11:52:23 +0000 Received: from localhost ([127.0.0.1]:40714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ubeCs-0000xa-F2 for submit <at> debbugs.gnu.org; Tue, 15 Jul 2025 07:52:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48498) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ubeCn-0000x6-OA for 78959 <at> debbugs.gnu.org; Tue, 15 Jul 2025 07:52:19 -0400 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 <eliz@HIDDEN>) id 1ubeCf-0004m2-R2; Tue, 15 Jul 2025 07:52:10 -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=8ZeWi1/Gk1G12h0axNsB/Xyg77hNCaV2OefgxGreHK4=; b=fTMl/XAvePxs 3M0z7UP4nj8T9ZmeYw2QB+VId8rqLFXblJFwUEmNpiN3oWi/JLe8AGA2uN1k+jDeKKIu2jt5YmisS vzL+foRZ29u+qF8PkFvQopBHzo0gx1ovQBcPij/cbjPWUw1qkO9F2G6FOtQ6bmx5EBupcpmH6zmH9 1xMFYDSAy7i0UFMqlcOmye3VqfdmwO9YQ9NY0HITii9Z2hxn4nLtVhAL5Srrjr7DAwugolNTapy5L kn2ZZMCR7xh/avI7E3C/M8fQSbQAS8CzW2NOyF0OE5I/c2PKr6Wx9SX/XwM38py7zSRmSp43i1ZLX OhBuBZlCLhsZGYI3zSnUPw==; Date: Tue, 15 Jul 2025 14:52:07 +0300 Message-Id: <86seixk6xk.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <87v7nu4cx2.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN) References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> <87tt3ioe3a.fsf@HIDDEN> <875xfwbo14.fsf@HIDDEN> <87v7nu4cx2.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> > Date: Tue, 15 Jul 2025 00:37:13 +0200 > From: Stephen Berman via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > On Sun, 13 Jul 2025 09:50:47 +0300 Juri Linkov <juri@HIDDEN> wrote: > > >>> Given that 'next-completion' moves column-wise, and > >>> 'next-line-completion' moves line-wise, what word > >>> would describe the behavior of the new commands > >>> that choose the motion direction based on whether > >>> the completion list is formatted horizontally or vertically? > >>> Maybe 'next-completion-adaptive'? Or something that > >>> makes a reference to "logical order"? > >> > >> It's too bad `next-completion' wasn't called `next-column-completion' > >> (and likewise for `previous-completion'), but I guess we can't change > >> that now. "-adaptive" and "-logical" seem too vague or unspecific. > > > > `next-column-completion' would be perfect. And it looks safe > > since it requires changing only 2 keybindings [left] and [right]: > > > > (define-key map [up] 'previous-line-completion) > > (define-key map [down] 'next-line-completion) > > (define-key map [left] 'previous-column-completion) > > (define-key map [right] 'next-column-completion) > > (define-key map [?\t] 'next-completion) > > (define-key map [backtab] 'previous-completion) > > (define-key map "n" 'next-completion) > > (define-key map "p" 'previous-completion) > > > > All other keybindings "n", "p", TAB, S-TAB will be directional > > depending on 'completions-format'. > > I've done this in the attached patch; however, this changes the public > API backward incompatibly, so getting the Emacs maintainers to accept it > may be a very hard sell. There's only one use of `next-completion' in > the Emacs tree (besides `previous-completion', which is part of the same > API change): `minibuffer-next-completion', so we can (and must) adjust > that accordingly, which the attached patch does (the patch contains > other changes to minibuffer.el needed to make navigation of the > *Completions* buffer in the vertical format work as intended from the > minibuffer, as described in the NEWS announcement in the patch; those > changes are independent of the question of repurposing > `{next,previous}-completion'). But any external code that uses the > original implementation of these commands would be broken by the change. Indeed, let's try to find a more backward-compatible change. For example, how about rebinding 'n' and 'p' to other (new) commands in the vertical mode?
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Stephen Berman <stephen.berman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 15 Jul 2025 12:32:01 +0000 Resent-Message-ID: <handler.78959.B78959.175258266312920 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN, juri@HIDDEN Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175258266312920 (code B ref 78959); Tue, 15 Jul 2025 12:32:01 +0000 Received: (at 78959) by debbugs.gnu.org; 15 Jul 2025 12:31:03 +0000 Received: from localhost ([127.0.0.1]:40885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ubeoI-0003MF-Vq for submit <at> debbugs.gnu.org; Tue, 15 Jul 2025 08:31:03 -0400 Received: from mout.gmx.net ([212.227.17.21]:33773) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>) id 1ubeoA-0003LG-2N for 78959 <at> debbugs.gnu.org; Tue, 15 Jul 2025 08:30:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1752582620; x=1753187420; i=stephen.berman@HIDDEN; bh=Vf4g8OxUx4b9MMajR9IaO4ocMfeKb9H2gQnixT0/u1k=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=Q7BBS7L/uXQOWf5kq9WBkVDc7o+rfZTnl39mkwbfjWst7c8W0GmH+Bj5IsInhnBA Cb0iJ9vlpM2fD79M/FKTN+x2jcdFtlmDAJ2FXWmugi8XTPg0u9qVkN9T5QmFy2UbS E/sD0vXkxSlm/RNa2SLrA3/6flh/Wcbr/MxHrebPQRii98GkX/FtRu153NiHGwwPc Xc7wssb9tsw+VhWh35foM4R8Kpflq/QNUQH5tmtukFa23a2W50ct1SPH8AG6ww0jC /HkQ78tzJZK9/oKC8/HBx8YGmbHn+bUTdhAYQjh6DWuBxmmaI3XK5lLgjnLsnEhC5 HjVhGC9WgJ+NUVSzDg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([88.130.48.219]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MhlGq-1v6bpT2UD2-00ZVak; Tue, 15 Jul 2025 14:30:19 +0200 From: Stephen Berman <stephen.berman@HIDDEN> In-Reply-To: <86seixk6xk.fsf@HIDDEN> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> <87tt3ioe3a.fsf@HIDDEN> <875xfwbo14.fsf@HIDDEN> <87v7nu4cx2.fsf@HIDDEN> <86seixk6xk.fsf@HIDDEN> Date: Tue, 15 Jul 2025 14:30:18 +0200 Message-ID: <87h5zdtz51.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:PLauUEL3GqivZBzHl0geKVGTK5Bpp3qXngU4D69wBWZ3EhSwlRQ BDFBXNg+B+j1fTRgpZDm8NlWzIZhd/BltQgTqjXeAb/PZG6mXA8l2MP2eSiC/B/nsv+H/TC qV6R9W8HPgykZuGU5djnJ6GzxU7ZMsGbhlhQv9aYW1F94JdQTqX44/i68iBbgkc7rJytpGX Woe9mw0YCGdbF6weHHJYQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:MJUqM4bL0s4=;mLeSIFkfSqIczF0RjxryCZl8b5F gaSEc1sh4A1iMaAi/Fu7NpyjcZ8xZCEQcGxB1PtN3HNXyfuHa3F17xJ2WLdafh+ZCWaZgXm0+ Kq94S0XiemHHPIimxZR1qbdN/PIz2ympswvOXZguuWEYTSWRRDw+SKS6zkGGKcAhrWw5SS2K6 YWBCiZ3EHYfsBzGVj8mpUvHfNnTS5tptVv48UNyzTCHIMUeMUnvmCurvpcffaCQok6jA5SWTX QT79gSygmycOjTHNT9giVoMlOwuy8mlPw5ysC7tLWMoZ0sEU8hZHUgkyceDSoJ1Lpi7GQ/70P AYAI5A5WPwJJ1fc4jVG+ipGJC1uoOjzRucA/MUMJQFrYM7Z+HqApF4ROsF8LLo3vS9KzhHORE BFy45s0cpT9TfEL9fHEQ/DwfIDne86g1vGOsoz4ioIS4AeTc2WislmNalv5d/AhzKRfE3LaTw dTMl2riMZU/RfLcmivFsDhyUD3OQN+GV69KFHPrdUKSAbCfsRQzy6q74SeLwMw8P3+Yb/4b7K 0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3gif68fKH2d9cRg0Yk4/AoaizQz+8IBSkAL2iL5aHeOpci jNozF6ldjIM7N78ya6dYF0+eh4QjovJHWTvGaAlYnfBB+k15m1GV1uEHJi0JCn1GXAIsDHWnw 2oSJPdYFjRt9K3CH9f/lB26n4SHlFyxbDKA0sboNd+f3SiwPC/Vg3z5pGiXGRK7T5owa4Az12 ho80U0c+ysp4vusOSYDa8XD3znBYRpyKcSgdYZS/kb5m3wPW9TC2H0pW6nUahZQ2UAEvuum9d iiuTGrILJiyarnfsA6AZdjww86Cez6qZ9XdB/cr7vcU5Pn483z2krupyXEaLMYwx/+HWuFM3D jyhdtEJvPUOjYZ/r56/vcTxSk7QYjz0XQ0/RMSVVOhXF0NBRCIPJLUTCPpypR1yXtde6d6lnH YQid3Rfmi5x+wwSo5XRru5GGZZMI74adi+yH9ufG5/pxkib0nQLD01Gt/RIFRGUgPZfk+ezq0 AT2ff7HVaZfcpJqtSMnS9j41vP3V6p8UOcOwV+bgUU43D8EORexHQNV9hY+25kKFCi8CJJKvT VLCrWg9ZuKwbSgdSUKOZHcYU2RwKX//WkGOxNvVg1j6Ro6Er7m6qZkyHYCoz5xUXS2Za4pCRJ p0in80CzMenYaZ2Q1APSEbcpf20QO+7CaWWyNmltArp44Ca2BCQaWj3e7Zp2G40Pldt3vGeou 7qOWsajDNqFvOsKphOcd7/jvNrhTdDk7WRzx7bQOW/taxPFJkkQa6zQmuNztMPEcRaYcMbtJo NN3HDo6IHi93F4daTwjHEDg49MReTZeUNacwJnBXZOQdt5mDzkDuG6iARctN+J5aRIeyW184e klGUH0G+SA7UjIBGgS7kAveEOx3Df4R+kr8RL7kudqBUrWMXUZXoXx15fNbcBaqBFrS7VMiJV 99ZIsr/EiFanqnn0CeK+697kIlBGtjc4rzM9EFPTXLccKBw42RVidJkgsRIQrySm2g== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On Tue, 15 Jul 2025 14:52:07 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: >> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> >> Date: Tue, 15 Jul 2025 00:37:13 +0200 >> From: Stephen Berman via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> >>=20 >> On Sun, 13 Jul 2025 09:50:47 +0300 Juri Linkov <juri@HIDDEN> wrote: >>=20 >> >>> Given that 'next-completion' moves column-wise, and >> >>> 'next-line-completion' moves line-wise, what word >> >>> would describe the behavior of the new commands >> >>> that choose the motion direction based on whether >> >>> the completion list is formatted horizontally or vertically? >> >>> Maybe 'next-completion-adaptive'? Or something that >> >>> makes a reference to "logical order"? >> >> >> >> It's too bad `next-completion' wasn't called `next-column-completion= ' >> >> (and likewise for `previous-completion'), but I guess we can't chang= e >> >> that now. "-adaptive" and "-logical" seem too vague or unspecific. >> > >> > `next-column-completion' would be perfect. And it looks safe >> > since it requires changing only 2 keybindings [left] and [right]: >> > >> > (define-key map [up] 'previous-line-completion) >> > (define-key map [down] 'next-line-completion) >> > (define-key map [left] 'previous-column-completion) >> > (define-key map [right] 'next-column-completion) >> > (define-key map [?\t] 'next-completion) >> > (define-key map [backtab] 'previous-completion) >> > (define-key map "n" 'next-completion) >> > (define-key map "p" 'previous-completion) >> > >> > All other keybindings "n", "p", TAB, S-TAB will be directional >> > depending on 'completions-format'. >>=20 >> I've done this in the attached patch; however, this changes the public >> API backward incompatibly, so getting the Emacs maintainers to accept i= t >> may be a very hard sell. There's only one use of `next-completion' in >> the Emacs tree (besides `previous-completion', which is part of the sam= e >> API change): `minibuffer-next-completion', so we can (and must) adjust >> that accordingly, which the attached patch does (the patch contains >> other changes to minibuffer.el needed to make navigation of the >> *Completions* buffer in the vertical format work as intended from the >> minibuffer, as described in the NEWS announcement in the patch; those >> changes are independent of the question of repurposing >> `{next,previous}-completion'). But any external code that uses the >> original implementation of these commands would be broken by the change= . > > Indeed, let's try to find a more backward-compatible change. For > example, how about rebinding 'n' and 'p' to other (new) commands in > the vertical mode? My previous patch did bind 'n' and 'p' to new commands; however, the problem is finding good names for these commands, see https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-07/msg00542.html Ideally, the best names would be `{next,previous}-completion', but unfortunately those are used by commands with a narrower scope (they do not work as desired/expected in the *Completions* vertical format, which is what prompted this bug report). My first patch in this thread made those commands DTRT in vertical format, but the code was convoluted (and I think incomplete), and Juri pointed out obvious simplifications, which I adopted in my previous patch, and this gave rise the the naming issue. I welcome any suggestions for good names for these commands. Steve Berman
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 15 Jul 2025 12:40:01 +0000 Resent-Message-ID: <handler.78959.B78959.175258314614353 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN, juri@HIDDEN Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175258314614353 (code B ref 78959); Tue, 15 Jul 2025 12:40:01 +0000 Received: (at 78959) by debbugs.gnu.org; 15 Jul 2025 12:39:06 +0000 Received: from localhost ([127.0.0.1]:40916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ubew6-0003jR-7O for submit <at> debbugs.gnu.org; Tue, 15 Jul 2025 08:39:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36620) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ubew1-0003ik-Hk for 78959 <at> debbugs.gnu.org; Tue, 15 Jul 2025 08:39:02 -0400 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 <eliz@HIDDEN>) id 1ubevu-0001sf-S6; Tue, 15 Jul 2025 08:38:54 -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=KuAxNEBH0Xsh1lcSF544QHEE32p6gWYGN3UZeis7WGo=; b=OZ+LznYo4wG3 cWaKskUVGtUURKuFLNLvOymm+3G854roXqmazxZZimtXFL5j0aTciBwqQCWdLz1JP2VyTjavDGiHg V6+YFwfK1ykdUgbbXXA/oQQB9iMrx2u2mEChnjBLPPjkxjVdiF0W3udPjfI4ZZzTjnpUGyg2Z+yDt 5qjXOjJREgDwYYesflew3WvUonW6nJEHKpU7FO0LityU5lTaVvTMmmTADiokqNSJWqec+HqNj9mbr SaLoUQiQH4sxKjoz77pRc731+OHhemEjvNGcLDxho8gTZI97HG3T+HHe+gl48NllfxWEFutd1IbQM kQhmivWaQEVjGHLibp22og==; Date: Tue, 15 Jul 2025 15:38:51 +0300 Message-Id: <86ikjtk4ro.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <87h5zdtz51.fsf@HIDDEN> (message from Stephen Berman on Tue, 15 Jul 2025 14:30:18 +0200) References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> <87tt3ioe3a.fsf@HIDDEN> <875xfwbo14.fsf@HIDDEN> <87v7nu4cx2.fsf@HIDDEN> <86seixk6xk.fsf@HIDDEN> <87h5zdtz51.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Stephen Berman <stephen.berman@HIDDEN> > Cc: juri@HIDDEN, 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN > Date: Tue, 15 Jul 2025 14:30:18 +0200 > > On Tue, 15 Jul 2025 14:52:07 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: > > > Indeed, let's try to find a more backward-compatible change. For > > example, how about rebinding 'n' and 'p' to other (new) commands in > > the vertical mode? > > My previous patch did bind 'n' and 'p' to new commands; however, the > problem is finding good names for these commands, see > https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-07/msg00542.html If the names are the main problem, I don't think we should look for a different solutions. I'm quite sure we will be able to find reasonably useful names. For example, how about next-completion-vertically and previous-completion-vertically?
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Stephen Berman <stephen.berman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 15 Jul 2025 13:04:02 +0000 Resent-Message-ID: <handler.78959.B78959.175258460419889 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN, juri@HIDDEN Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175258460419889 (code B ref 78959); Tue, 15 Jul 2025 13:04:02 +0000 Received: (at 78959) by debbugs.gnu.org; 15 Jul 2025 13:03:24 +0000 Received: from localhost ([127.0.0.1]:40994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ubfJb-0005Aj-SP for submit <at> debbugs.gnu.org; Tue, 15 Jul 2025 09:03:24 -0400 Received: from mout.gmx.net ([212.227.15.19]:42487) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>) id 1ubfJZ-00059l-Bv for 78959 <at> debbugs.gnu.org; Tue, 15 Jul 2025 09:03:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1752584588; x=1753189388; i=stephen.berman@HIDDEN; bh=7LGu7diSrNG86YmetfYj0z/HK29PkjYJ6ntv4E50RDE=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=F5YPVGYCr/gvBUOEzELlAlQe4Cc9fns+vau3tiOKBjHcTc1AWjJmSo7R7tk1QB9Y jpFKnL8PL9pie/dbDX+edK+02oUAd7YAegpZV0tIsbkE2ydDKh2ErVqi7SbDGsB9z 8maghwF8aFJFiKCR0uEE++/vQ3g8awuvcdlEPkUOcIJcZigYn8o8MM6DiXcmq3V75 /BMhyq7UF+Vm21rwyBDoWEcF2n96mZIFRgzANhh9oqDL7S4T6RcFCrl7KkXsFS7c0 QYI2GXASQELUPEf7G+SNXw5BGnnV+z356Ts61tN5CAoj3Hph49ACwa/gwln6apAML k85m8qljx43M5zKynw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([88.130.48.219]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M7sDg-1uWhVG1ctm-009DLo; Tue, 15 Jul 2025 15:03:08 +0200 From: Stephen Berman <stephen.berman@HIDDEN> In-Reply-To: <86ikjtk4ro.fsf@HIDDEN> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> <87tt3ioe3a.fsf@HIDDEN> <875xfwbo14.fsf@HIDDEN> <87v7nu4cx2.fsf@HIDDEN> <86seixk6xk.fsf@HIDDEN> <87h5zdtz51.fsf@HIDDEN> <86ikjtk4ro.fsf@HIDDEN> Date: Tue, 15 Jul 2025 15:03:07 +0200 Message-ID: <87cya1txmc.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:IPpeszKG0BvSU+LPjcQKhZrYbqdV1wmixndju00p8PK8Xdcrow+ Hn2hl1lSrcuWZJnPTQbZJrwxbdjNTUjIb8ABMOObjRSdPtEWGATMS9WIjzcbwTFv/0Zt2WG Gs1XlWSn/BitUL6vGaiH1wk1gj/7CFlI+brZoWC3fwhIU0HQH3jz8Mz0qFTXn/GHyUgab5Z 8OD+OWGcQpYt9b9x4QJ4g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:yIuJwkN0YOg=;K+hYvHBJFf/n/sqgmJGyddi10MG T+WIzoOyHDKUvI9M+HgY3/RTRQFONCkA6a+VBYMeCAT7af4g3PGPKbYfNXcHqzHyoRxym2uIT dIfUrCZT/cJz2Z2/9He6+SYuzJreOJsShSCts2cjaKR8gEL4a+zjCpa4iZusZyRY7g7AtA5u2 VfsrXWRLthLbyO9Bk/LKVJTnp8OkhRnr644gyXQkvgKOoOOCpkuMe6u+tqMSiUKp1gkycV1BM 4eeNNXUEOz2uE5WH/MchQt/LhPBN4RmsPFBDakMNzSynONDDp7oEd77ypKnKOnZnOzC0xCSje q5VGsALdTOxbM9NH+vtCsTuLkimZoR3sQ6cek6scnX2ew9XfE4bFVDRRQf+Fm+RIOcAi8qZMA PY2oah+99I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4 RrkP+/1ZK8TGriKceOMzRWYivJ6Bd2+0qisU8iGTS7Yn Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On Tue, 15 Jul 2025 15:38:51 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: >> From: Stephen Berman <stephen.berman@HIDDEN> >> Cc: juri@HIDDEN, 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN >> Date: Tue, 15 Jul 2025 14:30:18 +0200 >>=20 >> On Tue, 15 Jul 2025 14:52:07 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: >>=20 >> > Indeed, let's try to find a more backward-compatible change. For >> > example, how about rebinding 'n' and 'p' to other (new) commands in >> > the vertical mode? >>=20 >> My previous patch did bind 'n' and 'p' to new commands; however, the >> problem is finding good names for these commands, see >> https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-07/msg00542.html > > If the names are the main problem, I don't think we should look for a > different solutions. I'm quite sure we will be able to find > reasonably useful names. > > For example, how about next-completion-vertically and > previous-completion-vertically? The new functions delegate to existing commands: `{next,previous}-line-completion' when the format is vertical and `{next,previous}-completion' when the format is horizontal (or one-column), so the names should ideally abstract over both these possibilities. In the post mentioned above I offered a few alternatives, e.g. `{next,previous}-completion-direction', but hoped for something better. Steve Berman
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 15 Jul 2025 13:34:04 +0000 Resent-Message-ID: <handler.78959.B78959.17525864322323 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN, juri@HIDDEN Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.17525864322323 (code B ref 78959); Tue, 15 Jul 2025 13:34:04 +0000 Received: (at 78959) by debbugs.gnu.org; 15 Jul 2025 13:33:52 +0000 Received: from localhost ([127.0.0.1]:41255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ubfn4-0000bH-Gk for submit <at> debbugs.gnu.org; Tue, 15 Jul 2025 09:33:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51200) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ubfmz-0000Zg-1t for 78959 <at> debbugs.gnu.org; Tue, 15 Jul 2025 09:33:46 -0400 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 <eliz@HIDDEN>) id 1ubfms-0004BD-4U; Tue, 15 Jul 2025 09:33:38 -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=awi844hr0pPjCb+DhT4gZGuQnesL4+Z+GVkScrOGqp8=; b=ftqUDROfeozk Ev2UNRtLpIS6U6x6lrP5Kjdsjh7MwW3nWX1zqj2L8iZpEvse/u7s7clnHE5HqHpmFBXUkoQsZGOvE w1zThBD0AezS6t0DWmQ4jCYiwMDgWav33OhAXdVH0viBV7fxe/O8ozoNFcPqzlNaRIGLZeQVHHXHV YGCN4AWgvA28BQ2OgJySdnZJEoDwvoZu1zmuOditj0e+9nFMOTqTRQXZy+bjU0OUft4bUqIoUg+Fc XNRe+yxpranxdSc1W3+ElyYEBQYSR+X125ndkBTwt7XJCyasNY9Q9jXL5t6k12xYD07TlbOFTc3lQ gIhLmUsDOUFNjQn+BiGJFw==; Date: Tue, 15 Jul 2025 16:33:32 +0300 Message-Id: <86ecuhk28j.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <87cya1txmc.fsf@HIDDEN> (message from Stephen Berman on Tue, 15 Jul 2025 15:03:07 +0200) References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> <87tt3ioe3a.fsf@HIDDEN> <875xfwbo14.fsf@HIDDEN> <87v7nu4cx2.fsf@HIDDEN> <86seixk6xk.fsf@HIDDEN> <87h5zdtz51.fsf@HIDDEN> <86ikjtk4ro.fsf@HIDDEN> <87cya1txmc.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Stephen Berman <stephen.berman@HIDDEN> > Cc: juri@HIDDEN, 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN > Date: Tue, 15 Jul 2025 15:03:07 +0200 > > On Tue, 15 Jul 2025 15:38:51 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: > > >> From: Stephen Berman <stephen.berman@HIDDEN> > >> Cc: juri@HIDDEN, 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN > >> Date: Tue, 15 Jul 2025 14:30:18 +0200 > >> > >> On Tue, 15 Jul 2025 14:52:07 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: > >> > >> > Indeed, let's try to find a more backward-compatible change. For > >> > example, how about rebinding 'n' and 'p' to other (new) commands in > >> > the vertical mode? > >> > >> My previous patch did bind 'n' and 'p' to new commands; however, the > >> problem is finding good names for these commands, see > >> https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-07/msg00542.html > > > > If the names are the main problem, I don't think we should look for a > > different solutions. I'm quite sure we will be able to find > > reasonably useful names. > > > > For example, how about next-completion-vertically and > > previous-completion-vertically? > > The new functions delegate to existing commands: > `{next,previous}-line-completion' when the format is vertical and > `{next,previous}-completion' when the format is horizontal (or > one-column), so the names should ideally abstract over both these > possibilities. In the post mentioned above I offered a few > alternatives, e.g. `{next,previous}-completion-direction', but hoped for > something better. It sounds like we are talking about 2 different solutions, because I don't see how delegation enters this picture. The current bindings of 'n' and 'p' do their job when completions are arranged horizontally, so why do you need to delegate in that case?
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Stephen Berman <stephen.berman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 15 Jul 2025 14:14:02 +0000 Resent-Message-ID: <handler.78959.B78959.175258882016776 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN, juri@HIDDEN Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175258882016776 (code B ref 78959); Tue, 15 Jul 2025 14:14:02 +0000 Received: (at 78959) by debbugs.gnu.org; 15 Jul 2025 14:13:40 +0000 Received: from localhost ([127.0.0.1]:42802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ubgPb-0004MM-Ne for submit <at> debbugs.gnu.org; Tue, 15 Jul 2025 10:13:40 -0400 Received: from mout.gmx.net ([212.227.15.19]:59701) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>) id 1ubgPY-0004LN-Aj for 78959 <at> debbugs.gnu.org; Tue, 15 Jul 2025 10:13:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1752588809; x=1753193609; i=stephen.berman@HIDDEN; bh=XA5vqsnIb3BQuVA4v/vbNH70NbP3CmfzTtGx2ho/ry0=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=Z/6kUBNsrHnwK91wUR14auYb54vqJfkga0yxJ4gFrar47uFKt1AHQ9V5TfY7Qwpo X8C25bpwAOIxQwj9L5vnLnAReUzZl1PwNqm5zP/cFrOpyj8qn0Ycncy9gcSc7TbWJ /Rismw01ekH0ygmopCFBBtqWNXhZuF+F6K+s5YLwx6QPs7x/ufuLS5P7DCywKJ/Ov uUAe9voCIqIk2ssljNzgq5I49jUEdT5WS4FGXo0kL7/Ora6M3N06qLCeNGs3lmT+C 8A34BLaoOq3Dr3i2UMfuXx9Eq65beg23x+QUbEHq3yUk6AEvT3WyJWSKnc9H0qzSZ 7FV6Rmp7ijk+wnxVaA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([88.130.48.219]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MNKm0-1uHI0o46Dy-00M28P; Tue, 15 Jul 2025 16:13:29 +0200 From: Stephen Berman <stephen.berman@HIDDEN> In-Reply-To: <86ecuhk28j.fsf@HIDDEN> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> <87tt3ioe3a.fsf@HIDDEN> <875xfwbo14.fsf@HIDDEN> <87v7nu4cx2.fsf@HIDDEN> <86seixk6xk.fsf@HIDDEN> <87h5zdtz51.fsf@HIDDEN> <86ikjtk4ro.fsf@HIDDEN> <87cya1txmc.fsf@HIDDEN> <86ecuhk28j.fsf@HIDDEN> Date: Tue, 15 Jul 2025 16:13:28 +0200 Message-ID: <874ivdtud3.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:p69FSe9lIC/1m/XH8EjFxewpJlzuJnV1oj0NweKdfg4OBbYlVy4 3ccenRoBAhYC2NT65CAUcGbPhUs/4aFEuegrh077nI7LsQpX9BkV70QB0sqxBRxYZ+GdkR6 ytginuPvm0ypiXyycn202HhtK7fV9TRrITb8sTP0qrnPJ1kmBXVsdcj4QIkkhIf7q3t3OLb /5pRO8ecWldmDRLVU7fag== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:Uri2kE8B9bM=;ok7xTmmRF2fjpLmxCKvl+Pl1ed5 OAnqWRhafRTnxvKfzanfJyAksrSiKR4zZ7QQq/KBROaclA02J4FG2Ofefcnwuw98yBb/vzNJe dE2JO4AmJ9x/KYCqkO2lbU8XOF9gM9J4LRs9tnFVcxEgOcOdxEgvGMLapvBFB6ruLJdOOhPIN n3kvDG2GLs6lvB4NihNa0HZCpleoinNsR3TPTU8cY9qyB7f3U1CFHK3IdybkUSIAcnojJxWjF KatPtzGClzo1vBmThF3AbfnoN2dpVjt0JFlz2n0CVrdAvgvGNdTrCftj4m5kwI1Swiod2Gvao Sb+9oqyPdIKXHORc7Lg5P2qowCyS2pzET8jhqJ5PI92P1t7Z5imNzT8cN9Pv/67CfMR2a/aJy 9C4vjOwX2k9qTTDckzecO8YE8iBaM1SfvSr0A15/5NV/8stJ4m019/HKauZZ74eU7Lg8G54LV UoR/DWlZoo4IkM5ESaTenc2fQ6OOzlViun7bJdQDIyXUgU4Oe+2tEmpWFoxHKYXvfwfkrisM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TRukPDbVqtRRIO7xqFdvr9DnTDaTobFhgxgLk/DU GVKXtGDLmhfe0kxH0gSG9DuxHeJG0yuQG5U9fYy6yvFd0/2sdWdA4UprafJem/hYlV3B+Rfu1 PN/tooiKS1NXKJ1iYEgIp957wBr3rhFbHULTtdASocC3ev7baX7SNN9YRYj3IBBVkodnBdnr5 khlh8PP7oXA6Al9YG6NqXECf2j3eSg8FnboZOHwCvYR1UGT8EzwZs/3FyvTDP066B3HT4eW1x CPYDp5hv+b3YML74Xri48hfsmMe8bBo4UfIB7TX0alVyoEi8nBP5PGBM4SoxgHPUAFhw0JuAw 91fJ6BcE/Fz1JBaXHgwS80c+jgRp2l68H9orDBXwcaSi4C0XOxhyfcCPDiNrG9aptaj08MZUS leXNDu0UvARIWnNYHLmydPucGM4/AW8cteEy+aSknyp4isGbSbW/U5tR4ucBvoiaMxH8wyr7M cKryDBmQ7QM3TYItYUJ3YPgnJVXx5bs3TaZySDOazX8v4iefpIHrfz3wkbtpLYTDTgSMNNz3B HBqJDWz2C3U83T5e7AFDKidcQoyCq0V/ytr3jsgZDczIfCqyIwM2CgCZYVgddluKI7wvlUf+c iGwQZqjUGqMvDJgfAYaYeTTNaWNGtHY31OpLwuVbZVifztjUqIgufw5fD6u/pTq9UEmZAtvAn F1cwoCxQR9y+tz4JoqHcxUwxh/q4K1BlCzKm6qZjLR9+pS3tbMYc6FmR9NvpYMPF538DZ3E3J I4YZ7oebMjgIGrRi7rwcHhm7dgVgHVUofgkuZlj6nsS2ZyIsm1XjAJeV8rLdqPGE5wKjln5wa jU9DMiLlNSeYoFE3uLt+VISwRB6aCQy8pV0lcjeUeSj9ZAFf7oYo9U3CtXN//ioSHlHtRDY+f EA== Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On Tue, 15 Jul 2025 16:33:32 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: >> From: Stephen Berman <stephen.berman@HIDDEN> >> Cc: juri@HIDDEN, 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN >> Date: Tue, 15 Jul 2025 15:03:07 +0200 >>=20 >> On Tue, 15 Jul 2025 15:38:51 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: >>=20 >> >> From: Stephen Berman <stephen.berman@HIDDEN> >> >> Cc: juri@HIDDEN, 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN >> >> Date: Tue, 15 Jul 2025 14:30:18 +0200 >> >>=20 >> >> On Tue, 15 Jul 2025 14:52:07 +0300 Eli Zaretskii <eliz@HIDDEN> wrot= e: >> >>=20 >> >> > Indeed, let's try to find a more backward-compatible change. For >> >> > example, how about rebinding 'n' and 'p' to other (new) commands i= n >> >> > the vertical mode? >> >>=20 >> >> My previous patch did bind 'n' and 'p' to new commands; however, the >> >> problem is finding good names for these commands, see >> >> https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-07/msg00542.ht= ml >> > >> > If the names are the main problem, I don't think we should look for a >> > different solutions. I'm quite sure we will be able to find >> > reasonably useful names. >> > >> > For example, how about next-completion-vertically and >> > previous-completion-vertically? >>=20 >> The new functions delegate to existing commands: >> `{next,previous}-line-completion' when the format is vertical and >> `{next,previous}-completion' when the format is horizontal (or >> one-column), so the names should ideally abstract over both these >> possibilities. In the post mentioned above I offered a few >> alternatives, e.g. `{next,previous}-completion-direction', but hoped fo= r >> something better. > > It sounds like we are talking about 2 different solutions, because I > don't see how delegation enters this picture. The current bindings of > 'n' and 'p' do their job when completions are arranged horizontally, > so why do you need to delegate in that case? The issue of this bug report is that 'n' and 'p' (and 'M-<down>' and 'M-<up>') should move point through all completions in the sorted order regardless of the completions format, i.e. horizontally (column-wise) for horizontal format (which the current code does do) and vertically (line-wise) for vertical format, which the current code does not do. My first patch changed `{next,previous}-completion' to DTRT in vertical format but at the cost of convoluted code; Juri pointed out that a much simpler implementation using the existing navigation commands was possible, but to use the same bindings for navigation in both formats, it was easiest to introduce new commands that delegated to the existing ones based on the completions format, and that's what my last two patches do (though some changes to the line-wise commands were still necessary). Steve Berman
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 15 Jul 2025 15:37:01 +0000 Resent-Message-ID: <handler.78959.B78959.17525937777150 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN, juri@HIDDEN Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.17525937777150 (code B ref 78959); Tue, 15 Jul 2025 15:37:01 +0000 Received: (at 78959) by debbugs.gnu.org; 15 Jul 2025 15:36:17 +0000 Received: from localhost ([127.0.0.1]:43197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ubhhY-0001rA-3d for submit <at> debbugs.gnu.org; Tue, 15 Jul 2025 11:36:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58474) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ubhhU-0001qh-KZ for 78959 <at> debbugs.gnu.org; Tue, 15 Jul 2025 11:36:13 -0400 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 <eliz@HIDDEN>) id 1ubhhO-0001ho-OO; Tue, 15 Jul 2025 11:36:06 -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=fQL0+C1lB2+2if4wHPPK82P919xpQGbnkIA5wwdrfQk=; b=FA+VBg7lowDm 5OJnKtCIVi6W0eFT7CJZUj2CQMNJhg+7qUDema9Ix5aoPkhkWm+gbHjQiQ5AJNvcHcnh9Xc2JL1VO wyMNYrNYVQNkAF5EpcGEZxWM8wqZPYh3+9IIcSvVTMqwBayGuojpmdBTugmakePaAF7QWkVPf/ZL5 RpnM8A8btSLmm6nK5OskjOSC78vfTrwINuYTKRWhvqwl4yNCUQGhls1PMgvbWpjpO5/3/bGpsrl8b ZAFpJyxw/SFp4RbifU3BsoXJrEsJ15I+YYQXTxuECkAVthcnojHvT7leLK63FV3+0d7RAA7zpuSfQ 4JLqGfw2023ed0+JyYTbBA==; Date: Tue, 15 Jul 2025 18:36:04 +0300 Message-Id: <868qkpjwkb.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <874ivdtud3.fsf@HIDDEN> (message from Stephen Berman on Tue, 15 Jul 2025 16:13:28 +0200) References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> <87tt3ioe3a.fsf@HIDDEN> <875xfwbo14.fsf@HIDDEN> <87v7nu4cx2.fsf@HIDDEN> <86seixk6xk.fsf@HIDDEN> <87h5zdtz51.fsf@HIDDEN> <86ikjtk4ro.fsf@HIDDEN> <87cya1txmc.fsf@HIDDEN> <86ecuhk28j.fsf@HIDDEN> <874ivdtud3.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Stephen Berman <stephen.berman@HIDDEN> > Cc: juri@HIDDEN, 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN > Date: Tue, 15 Jul 2025 16:13:28 +0200 > > On Tue, 15 Jul 2025 16:33:32 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: > > >> From: Stephen Berman <stephen.berman@HIDDEN> > >> Cc: juri@HIDDEN, 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN > >> Date: Tue, 15 Jul 2025 15:03:07 +0200 > >> > >> On Tue, 15 Jul 2025 15:38:51 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: > >> > >> >> From: Stephen Berman <stephen.berman@HIDDEN> > >> >> Cc: juri@HIDDEN, 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN > >> >> Date: Tue, 15 Jul 2025 14:30:18 +0200 > >> >> > >> >> On Tue, 15 Jul 2025 14:52:07 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: > >> >> > >> >> > Indeed, let's try to find a more backward-compatible change. For > >> >> > example, how about rebinding 'n' and 'p' to other (new) commands in > >> >> > the vertical mode? > >> >> > >> >> My previous patch did bind 'n' and 'p' to new commands; however, the > >> >> problem is finding good names for these commands, see > >> >> https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-07/msg00542.html > >> > > >> > If the names are the main problem, I don't think we should look for a > >> > different solutions. I'm quite sure we will be able to find > >> > reasonably useful names. > >> > > >> > For example, how about next-completion-vertically and > >> > previous-completion-vertically? > >> > >> The new functions delegate to existing commands: > >> `{next,previous}-line-completion' when the format is vertical and > >> `{next,previous}-completion' when the format is horizontal (or > >> one-column), so the names should ideally abstract over both these > >> possibilities. In the post mentioned above I offered a few > >> alternatives, e.g. `{next,previous}-completion-direction', but hoped for > >> something better. > > > > It sounds like we are talking about 2 different solutions, because I > > don't see how delegation enters this picture. The current bindings of > > 'n' and 'p' do their job when completions are arranged horizontally, > > so why do you need to delegate in that case? > > The issue of this bug report is that 'n' and 'p' (and 'M-<down>' and > 'M-<up>') should move point through all completions in the sorted order > regardless of the completions format, i.e. horizontally (column-wise) > for horizontal format (which the current code does do) and vertically > (line-wise) for vertical format, which the current code does not do. My > first patch changed `{next,previous}-completion' to DTRT in vertical > format but at the cost of convoluted code; Juri pointed out that a much > simpler implementation using the existing navigation commands was > possible, but to use the same bindings for navigation in both formats, > it was easiest to introduce new commands that delegated to the existing > ones based on the completions format, and that's what my last two > patches do (though some changes to the line-wise commands were still > necessary). Why not the other way around: have the existing commands delegate to new functions when the format is vertical? AFAIU, that would avoid the need to rebind the keys to new commands and having the new commands delegate to old. As a nice bonus, it also frees us from the need to consider the old names, and we are free to introduce new commands with -vertically in their names. Or what am I missing?
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Stephen Berman <stephen.berman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 15 Jul 2025 16:53:02 +0000 Resent-Message-ID: <handler.78959.B78959.175259836326038 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN, juri@HIDDEN Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175259836326038 (code B ref 78959); Tue, 15 Jul 2025 16:53:02 +0000 Received: (at 78959) by debbugs.gnu.org; 15 Jul 2025 16:52:43 +0000 Received: from localhost ([127.0.0.1]:43454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ubitX-0006lt-1i for submit <at> debbugs.gnu.org; Tue, 15 Jul 2025 12:52:43 -0400 Received: from mout.gmx.net ([212.227.15.18]:47821) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>) id 1ubitS-0006lB-Il for 78959 <at> debbugs.gnu.org; Tue, 15 Jul 2025 12:52:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1752598352; x=1753203152; i=stephen.berman@HIDDEN; bh=iABFVsZo+6t6Z1z3b/3uqn2VxUYeWl+0Y5wzmW2Kygo=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=UnXQwyAqhqVWBwdgwqAwikc6MqzLXuAjZYUk1bdq3qLthzFxVcveQ144MLcBAP/w +L8wr8mWAZjAGdSaRX/uidV1OguPhWHCHRbf5BHfL1wQ+CUQfxQCcQgSp1pdiOvBy QZbwJMxXRrMv9dU+cPTYpoVd/WwG20mCD+2Hl7ZO0pr6+3G7KPPefkjFPtVCHAQPt HPSNZbNLxutSLhiCvR9v9Yf8UFN+yrzveRVRSdCFZSqsfAkV60lZ/stXSZn+ZXmr3 b7xTrp1J+CZuUUlJQ+qJdBuPMDRayA7skRvDfE47RremS1KWTqyhqxlL0Fm6Yln+2 kVIT0pFZfbGhFECfgA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([88.130.48.219]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N0XCw-1unlbF30GC-00zDls; Tue, 15 Jul 2025 18:52:29 +0200 From: Stephen Berman <stephen.berman@HIDDEN> In-Reply-To: <868qkpjwkb.fsf@HIDDEN> References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> <87tt3ioe3a.fsf@HIDDEN> <875xfwbo14.fsf@HIDDEN> <87v7nu4cx2.fsf@HIDDEN> <86seixk6xk.fsf@HIDDEN> <87h5zdtz51.fsf@HIDDEN> <86ikjtk4ro.fsf@HIDDEN> <87cya1txmc.fsf@HIDDEN> <86ecuhk28j.fsf@HIDDEN> <874ivdtud3.fsf@HIDDEN> <868qkpjwkb.fsf@HIDDEN> Date: Tue, 15 Jul 2025 18:52:28 +0200 Message-ID: <87zfd5s8fn.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:lEGuHuOhMYqr5fKsuSe9+MRVaHy2p2g2sZ0yu+mGoYbTAIS8D0W DQPkRwiywqNUp8Sip4+p88bl41ep1ceIAmB5hDO4nm0T+xZRIgeXZII1hgiXnRk00uTZLCB ANFZMghYlJencLN0zHPdOh9H6vdYVuQNqKDieIyLC0t2CPeh6/kAsV+7xrG50JeWbv1veSU gquH+4iYHkVFYPWEUqS4A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:F0CgPmPID/c=;9CDAQ2ys0mZD8cRcH8zSzPWyPPj O9zuBcySSjKT+Zn2XPx2xsdolRKYW+0W/9VtHmrzJTieXX6J8iKN9xwKZQpHZ3zoe7T5gjgm2 pZqVnYCPA/p6PtLoesP25wX3plDdBgoQnN79sU6/xF1+908Ad5sLW+eoIPw6a1giiliWq3ANJ ODBEV0ceeGkvxEbess4Hp398NSN8tTsaZFEhcgHc/H/TWoTBsBaYLNuWIrvdxi3PfB6dBvKOa fRg7akQHc6Cm/KMO1oUvnsvm0CDvzxjoxIzhuk+13Fl3VojAn28Il2JV85SrEXCCSrI7+hJo5 96M4n9YZY+MRSIq+3lLgPWW44WA5wU5tbNhaJVDoSUBI+pxAILRFzbhQFerc8L2o7iIrYunRB vrOEUNAoYiVJhqOFk3UIrCLDvhbvCov19GIMWkjN9z7RI4jdOZjTtIdAB9QVLXRbhFiOKfNOg gCJMJt3ybQgUIi3pZ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WTthN1aKjpToA= Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On Tue, 15 Jul 2025 18:36:04 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: >> From: Stephen Berman <stephen.berman@HIDDEN> >> Cc: juri@HIDDEN, 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN >> Date: Tue, 15 Jul 2025 16:13:28 +0200 [...]=20 >> The issue of this bug report is that 'n' and 'p' (and 'M-<down>' and >> 'M-<up>') should move point through all completions in the sorted order >> regardless of the completions format, i.e. horizontally (column-wise) >> for horizontal format (which the current code does do) and vertically >> (line-wise) for vertical format, which the current code does not do. M= y >> first patch changed `{next,previous}-completion' to DTRT in vertical >> format but at the cost of convoluted code; Juri pointed out that a much >> simpler implementation using the existing navigation commands was >> possible, but to use the same bindings for navigation in both formats, >> it was easiest to introduce new commands that delegated to the existing >> ones based on the completions format, and that's what my last two >> patches do (though some changes to the line-wise commands were still >> necessary). > > Why not the other way around: have the existing commands delegate to > new functions when the format is vertical? AFAIU, that would avoid > the need to rebind the keys to new commands and having the new > commands delegate to old. As a nice bonus, it also frees us from the > need to consider the old names, and we are free to introduce new > commands with -vertically in their names. > > Or what am I missing? There is no need for new commands for navigating vertical format: `{next,previous}-line-completion' already do that (but in the current (unpatched) code they navigate only within a single column, not through all completions, like `{next,previous}-completion' do for horizontal format). In the current (unpatched) code, the latter commands are bound in `completion-list-mode-map' to both {right,left} and {n,p}, while the former are only bound to {down,up}. According to the OP, it's a bug that typing 'n' or 'p' in vertical format navigates horizontally instead of vertically; I agree, and that's what my patches have dealt with. As previously noted, my first patch modified only `next-completion' (I wasn't even aware of `next-line-completion' when I did that) and required no rebinding or new commands, so it was conceptually simple, though the code itself was convoluted and ugly (and did not handle some cases I only become aware of later). But Juri convinced me that it was simpler and cleaner to get the desired effect by using a vertical (line) command for movement within a column followed by a horizontal command to go the the next or previous column, and that's what my subsequent patches have done. However, the only way I could think of to use 'n' and 'p' appropriately for both formats was to introduce a new command that delegates to the appropriate horizontal or vertical command according to the value of `completions-format'. If you or anyone knows how to do that without such a delegating or dispatching command, please spell it out for me, because I don't see it from what you've written so far. Steve Berman
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 16 Jul 2025 06:25:02 +0000 Resent-Message-ID: <handler.78959.B78959.175264704913625 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@HIDDEN> Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175264704913625 (code B ref 78959); Wed, 16 Jul 2025 06:25:02 +0000 Received: (at 78959) by debbugs.gnu.org; 16 Jul 2025 06:24:09 +0000 Received: from localhost ([127.0.0.1]:47493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ubvYk-0003XP-W9 for submit <at> debbugs.gnu.org; Wed, 16 Jul 2025 02:24:08 -0400 Received: from mout-y-111.mailbox.org ([2001:67c:2050:103:465::111]:39574) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1ubvYh-0003WW-VH for 78959 <at> debbugs.gnu.org; Wed, 16 Jul 2025 02:24:05 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-111.mailbox.org (Postfix) with ESMTPS id 4bhmGd56Ffz9y0F; Wed, 16 Jul 2025 08:23:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1752647033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GClnw4I9+AoIGv7GgzDXM92COsvutdyJymu5NOTjuM8=; b=HX9XVIzt3ADthb9h5UsuOWfC4P+N/uAcJ4dGCywt+bqm7PfVPknex0qmCMT2a/eQv41TwM AqqVJn07pOIBh3MrrO+jpZlHjAVpichQOoBoZhbZEmWztBK34m26j99JweI79rURPzqF2w E8nxphsn6q1d2pTSZmY3NGk6Ioz+T5hlzeyd7rHkq0r7qGLk9bREnY2dxtCtguUTBXEtJL yi56PjodfReHc9omCum5qPt3CVc+mX4+LeUiqm6mn9ofc1lzShRiVTEsQRw5q2VJFq6Afv dxAKZhifZb4mM/hv8wXgPXI67qoXrWFPL/O80gHiz72dzq/oJuCK5vAoqxwPgA== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=juri@HIDDEN From: Juri Linkov <juri@HIDDEN> In-Reply-To: <87v7nu4cx2.fsf@HIDDEN> Organization: LINKOV.NET References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> <87tt3ioe3a.fsf@HIDDEN> <875xfwbo14.fsf@HIDDEN> <87v7nu4cx2.fsf@HIDDEN> Date: Wed, 16 Jul 2025 09:17:18 +0300 Message-ID: <87y0so8z6h.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4bhmGd56Ffz9y0F X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >> All other keybindings "n", "p", TAB, S-TAB will be directional >> depending on 'completions-format'. > > I've done this in the attached patch; however, this changes the public > API backward incompatibly, so getting the Emacs maintainers to accept it > may be a very hard sell. There's only one use of `next-completion' in > the Emacs tree (besides `previous-completion', which is part of the same > API change): `minibuffer-next-completion', so we can (and must) adjust > that accordingly, which the attached patch does (the patch contains > other changes to minibuffer.el needed to make navigation of the > *Completions* buffer in the vertical format work as intended from the > minibuffer, as described in the NEWS announcement in the patch; those > changes are independent of the question of repurposing > `{next,previous}-completion'). But any external code that uses the > original implementation of these commands would be broken by the change. > The patch contains a second NEWS entry under incompatible Lisp changes > calling this out, and the needed adjustment is simple, as the > minibuffer.el patch illustrates, so maybe such breakage is acceptable. > If not, then we may have no choice but to find an acceptable name for > the command that calls the navigation commands based on the value of > `completions-format'. (Some changes to the "Completion" node of the > Emacs manual may also be needed, but I've refrained from doing that > until the issue of the command names is settled.) Thanks, everything in your patch is correct. The breaking change comes not from adding `next-column-completion', but from fixing the problem reported in this bug report where the direction of "n", "p", TAB, S-TAB will depend on 'completions-format'.
X-Loop: help-debbugs@HIDDEN Subject: bug#78959: 31.0.50; *Completions* buffer navigation with 'n' and 'p' Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 16 Jul 2025 11:24:02 +0000 Resent-Message-ID: <handler.78959.B78959.175266499432345 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman <stephen.berman@HIDDEN> Cc: 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN, juri@HIDDEN Received: via spool by 78959-submit <at> debbugs.gnu.org id=B78959.175266499432345 (code B ref 78959); Wed, 16 Jul 2025 11:24:02 +0000 Received: (at 78959) by debbugs.gnu.org; 16 Jul 2025 11:23:14 +0000 Received: from localhost ([127.0.0.1]:48488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uc0ED-0008Pc-Ij for submit <at> debbugs.gnu.org; Wed, 16 Jul 2025 07:23:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43428) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1uc0EA-0008PA-FK for 78959 <at> debbugs.gnu.org; Wed, 16 Jul 2025 07:23:11 -0400 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 <eliz@HIDDEN>) id 1uc0E4-0001IW-Bv; Wed, 16 Jul 2025 07:23:04 -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=DewgeRMCiIojbTLxYcQysWijCvv//7gcm+GJjsbBJXY=; b=ctjiNvzbpCvF aN76BeqSV1q8vDWMjfISpYpCg3lQwt9K41xD7qMU+RpRqzm8/Rg9nQKtI+lgh2EUkmsciV1an/R/F R15B4twfgDN0AaMhASJ9AUNMCO1YzpN++rOkNqobEYfG63KLnufbhYx+oelcaS/55/6Pwu2tS74c6 lgbdWTAW8e6CQF+TC3e3UmdzwKLtWHoenQLETXXA0l5sIRkFcCzpMpZeDromX2MJIuX/J2/IOBtbK 3APqiuSmToGY9MqBs2q9DqMAXUPwjBvOymc2RV93aHzALb07SHcjCkFe2w92mf8nO4zSoDzAVRAJT Js5fIRmQyJiQUsdttfhTJA==; Date: Wed, 16 Jul 2025 14:22:47 +0300 Message-Id: <861pqgjs6w.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <87zfd5s8fn.fsf@HIDDEN> (message from Stephen Berman on Tue, 15 Jul 2025 18:52:28 +0200) References: <CAH8Pv0hAOUwCxyHP_gJdWuuP16U+LYWWpAhopwbPVSDHukAURg@HIDDEN> <87ecuuwj7j.fsf@HIDDEN> <87o6tw4hbo.fsf@HIDDEN> <874ivo77vt.fsf@HIDDEN> <87wm8k2cjm.fsf@HIDDEN> <87ldozyt8r.fsf@HIDDEN> <875xg1sxxc.fsf@HIDDEN> <87a55cc9q9.fsf@HIDDEN> <87tt3jg9v2.fsf@HIDDEN> <8734b3otqn.fsf@HIDDEN> <87ikjyeqqi.fsf@HIDDEN> <87tt3ioe3a.fsf@HIDDEN> <875xfwbo14.fsf@HIDDEN> <87v7nu4cx2.fsf@HIDDEN> <86seixk6xk.fsf@HIDDEN> <87h5zdtz51.fsf@HIDDEN> <86ikjtk4ro.fsf@HIDDEN> <87cya1txmc.fsf@HIDDEN> <86ecuhk28j.fsf@HIDDEN> <874ivdtud3.fsf@HIDDEN> <868qkpjwkb.fsf@HIDDEN> <87zfd5s8fn.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Stephen Berman <stephen.berman@HIDDEN> > Cc: juri@HIDDEN, 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN > Date: Tue, 15 Jul 2025 18:52:28 +0200 > > On Tue, 15 Jul 2025 18:36:04 +0300 Eli Zaretskii <eliz@HIDDEN> wrote: > > >> From: Stephen Berman <stephen.berman@HIDDEN> > >> Cc: juri@HIDDEN, 78959 <at> debbugs.gnu.org, dmoncayo@HIDDEN > >> Date: Tue, 15 Jul 2025 16:13:28 +0200 > [...] > >> The issue of this bug report is that 'n' and 'p' (and 'M-<down>' and > >> 'M-<up>') should move point through all completions in the sorted order > >> regardless of the completions format, i.e. horizontally (column-wise) > >> for horizontal format (which the current code does do) and vertically > >> (line-wise) for vertical format, which the current code does not do. My > >> first patch changed `{next,previous}-completion' to DTRT in vertical > >> format but at the cost of convoluted code; Juri pointed out that a much > >> simpler implementation using the existing navigation commands was > >> possible, but to use the same bindings for navigation in both formats, > >> it was easiest to introduce new commands that delegated to the existing > >> ones based on the completions format, and that's what my last two > >> patches do (though some changes to the line-wise commands were still > >> necessary). > > > > Why not the other way around: have the existing commands delegate to > > new functions when the format is vertical? AFAIU, that would avoid > > the need to rebind the keys to new commands and having the new > > commands delegate to old. As a nice bonus, it also frees us from the > > need to consider the old names, and we are free to introduce new > > commands with -vertically in their names. > > > > Or what am I missing? > > There is no need for new commands for navigating vertical format: > `{next,previous}-line-completion' already do that (but in the current > (unpatched) code they navigate only within a single column, not through > all completions, like `{next,previous}-completion' do for horizontal > format). In the current (unpatched) code, the latter commands are bound > in `completion-list-mode-map' to both {right,left} and {n,p}, while the > former are only bound to {down,up}. According to the OP, it's a bug > that typing 'n' or 'p' in vertical format navigates horizontally instead > of vertically; I agree, and that's what my patches have dealt with. As > previously noted, my first patch modified only `next-completion' (I > wasn't even aware of `next-line-completion' when I did that) and > required no rebinding or new commands, so it was conceptually simple, > though the code itself was convoluted and ugly (and did not handle some > cases I only become aware of later). But Juri convinced me that it was > simpler and cleaner to get the desired effect by using a vertical (line) > command for movement within a column followed by a horizontal command to > go the the next or previous column, and that's what my subsequent > patches have done. However, the only way I could think of to use 'n' > and 'p' appropriately for both formats was to introduce a new command > that delegates to the appropriate horizontal or vertical command > according to the value of `completions-format'. If you or anyone knows > how to do that without such a delegating or dispatching command, please > spell it out for me, because I don't see it from what you've written so > far. Sorry, I don't see a problem you allude to. But I evidently fail to make my point across, so I will bow out of this discussion and let you do what you think is best. (I'll still be sad if the result of the changes as installed will be that 'n' and 'p' will become bound to different commands in the horizontal case.)
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.