From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66948: [PATCH] Add Completion Preview mode Date: Sun, 05 Nov 2023 20:42:44 +0100 Message-ID: References: <87lebcqcof.fsf@posteo.net> Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15740"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Dmitry Gutov , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , 66948@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 05 20:43:47 2023 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 1qzj2B-0003vA-7g for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Nov 2023 20:43:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzj1u-0004mP-QK; Sun, 05 Nov 2023 14:43:30 -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 1qzj1r-0004mH-L7 for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 14:43:27 -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 1qzj1q-0005PY-53 for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 14:43:26 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qzj2Q-00052L-DD for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 14:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Nov 2023 19:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66948 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66948-submit@debbugs.gnu.org id=B66948.169921340819309 (code B ref 66948); Sun, 05 Nov 2023 19:44:02 +0000 Original-Received: (at 66948) by debbugs.gnu.org; 5 Nov 2023 19:43:28 +0000 Original-Received: from localhost ([127.0.0.1]:38241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzj1r-00051M-ML for submit@debbugs.gnu.org; Sun, 05 Nov 2023 14:43:28 -0500 Original-Received: from mail.eshelyaron.com ([107.175.124.16]:46050 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzj1p-00051D-1S for 66948@debbugs.gnu.org; Sun, 05 Nov 2023 14:43:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1699213366; bh=iS6oyYJjvaoxvca0/JnUiO7QKQQkpaPSXTfMwE+++/o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=cdLrcZAVhRa9+V8V/d6vnu8fX+FKJZ76n+JKo+I/5pqT6F0k8V3ctRQtiH4cUBOuC WRC30N+RycT1JuVnc4EwEwwrUUe5EePjmhA8VfO99NHXySbAIjTsRVb+ndLxLg8NsJ Y7QZOqL7IYxTIMIGWjZPMXoFm1CQtl66ezscMMzQKUNuDCpOLN7NyH9Dmx96WZkBAD gfyA/5pnsjuV4bZfc9u3z75/CCGIaLjpQmiLYl0Q4l3HGk5KuSMcFDdf14IGaw34j+ Q5iLGWZ1FOjQRRYtFUaLMqQmiG1F1FlM1rEHtLdzXkUKwXTKxw2E/+ll2extKVszYP jXhw7pcV2nnBA== In-Reply-To: <87lebcqcof.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 05 Nov 2023 18:26:24 +0000") 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:273842 Archived-At: Philip Kaludercic writes: > Eshel Yaron writes: > >> Tags: patch >> >> Following the recent discussion on emacs-devel[0], I'm attaching a patch >> that adds a new Completion Preview minor mode. > > I didn't follow the discussion in detail, but is this related to the > capf-autosuggest package? `capf-autosuggest` didn't really come up so far. It is related to Completion Preview, but `capf-autosuggest` only deals with `comint`-like buffers, while Completion Preview works in all buffers. I don't know if and how `capf-autosuggest` could be extended to work in arbitrary buffers. > FWIW From a brief test, my main annoyances have been that DEL drops any > completion Thanks for testing. To have DEL not dismiss the completion preview, add `delete-backward-char` to `completion-preview-commands`. Actually, would it make sense to have that behavior by default? > and that there is no option to cycle between inexact completions. That's interesting, can you elaborate about the use case that you have in mind? I thought about adding a command to do that, but I wasn't sure there'd be a good use case for it since you can always dismiss the preview (e.g. with `C-g`) and say `C-M-i` to pick another candidate. >> [0] https://lists.gnu.org/archive/html/emacs-devel/2023-10/msg00693.html >> >> + (pcase (bounds-of-thing-at-point 'symbol) > > [...] > > You can use `pcase-let' here. > Good idea, I'll try it out. Best, Eshel