From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#68688: 30.0.50; next-line-completion doesn't work with multiline completions Date: Thu, 25 Jan 2024 09:48:59 +0200 Organization: LINKOV.NET Message-ID: <86sf2l7t04.fsf@mail.linkov.net> References: <86ttn23ckr.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8395"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 68688@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 25 08:52:28 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rSuXD-0001yE-SM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Jan 2024 08:52:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSuWl-0007Y8-59; Thu, 25 Jan 2024 02:51:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSuWj-0007Xi-MI for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2024 02:51:57 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSuWj-0004Z1-CG for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2024 02:51:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rSuWo-0002EE-Bj for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2024 02:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jan 2024 07:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68688 X-GNU-PR-Package: emacs Original-Received: via spool by 68688-submit@debbugs.gnu.org id=B68688.17061691088524 (code B ref 68688); Thu, 25 Jan 2024 07:52:02 +0000 Original-Received: (at 68688) by debbugs.gnu.org; 25 Jan 2024 07:51:48 +0000 Original-Received: from localhost ([127.0.0.1]:47222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSuWa-0002DP-Au for submit@debbugs.gnu.org; Thu, 25 Jan 2024 02:51:48 -0500 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:55371) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSuWY-0002DB-1Y for 68688@debbugs.gnu.org; Thu, 25 Jan 2024 02:51:47 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 7454A1BF206; Thu, 25 Jan 2024 07:51:33 +0000 (UTC) In-Reply-To: (Spencer Baugh's message of "Wed, 24 Jan 2024 13:27:39 -0500") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:278838 Archived-At: >> Alternatively without a loop maybe simpler would be just to move >> to the end of the current completion before calling forward-line? > > I was unsure whether that would work correctly in all cases. But it > seems to pass tests, so let's just try it. If it does break, the bug > report will give us some new test cases :) It might fail on a multi-column and at the same time multi-line layout. But currently this is just a hypothetical case. I remember there was an idea to use tabulated-list-mode in the completions buffer that could simplify next-completion but at the cost of breaking backward compatibility with existing commands that rely on text properties. >> Completely agreed. We need more helper functions for all 4 functions: >> previous-completion, next-completion, previous-line-completion, >> next-line-completion. > > Cool, I made two helpers in the latest version of my patch. Using only > in next-line-completion for now, but we can use it more in the other > completion function. Using helpers more would be nice. >> BTW, do you think that these parts below are not needed anymore >> since you implemented a hidden placeholder at the top >> in case of no header? > > Yes, I think all the code for 'first-completion can be removed. > > Updated patch for next-line-completion: Thanks for the patch. Now pushed to master.