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#45767: bug#45768: icomplete-mode does not provide in region completion for dabbrev-completion Date: Thu, 19 May 2022 19:58:40 +0300 Organization: LINKOV.NET Message-ID: <86fsl5sblr.fsf@mail.linkov.net> References: <255598638.117929.1610282275124@office.mailbox.org> <87k0ayh499.fsf@gnus.org> <86h75zkid4.fsf@mail.linkov.net> <871qx3ca18.fsf@gnus.org> <8635hi1rcm.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="9159"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 45768@debbugs.gnu.org, Lars Ingebrigtsen , simon254@mailbox.org, 45767@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 19 19:04:13 2022 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 1nrjZN-0002Eq-4P for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 19:04:13 +0200 Original-Received: from localhost ([::1]:52734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrjZM-0003Y6-5G for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 13:04:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrjZC-0003Xq-DW for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 13:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrjZB-0004W2-TO for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 13:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrjZB-0007Kh-Np for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 13:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 May 2022 17:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45767 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 45767-submit@debbugs.gnu.org id=B45767.165297983628168 (code B ref 45767); Thu, 19 May 2022 17:04:01 +0000 Original-Received: (at 45767) by debbugs.gnu.org; 19 May 2022 17:03:56 +0000 Original-Received: from localhost ([127.0.0.1]:36522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrjZ5-0007KF-Jc for submit@debbugs.gnu.org; Thu, 19 May 2022 13:03:55 -0400 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:43979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrjZ2-0007Jv-QK; Thu, 19 May 2022 13:03:53 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 0CD2C100002; Thu, 19 May 2022 17:03:43 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Mon, 09 May 2022 17:23:00 -0400") 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" Xref: news.gmane.io gmane.emacs.bugs:232657 Archived-At: > Try the recipe given in the bug report. You should see now that after > M-C-/ the possible completions get listed (in icomplete-mode style) on > the same line (via an overlay). Sorry, I temporarily removed these lines from `completion-at-point`: (completion-in-region-mode-predicate (lambda () ;; We're still in the same completion field. (let ((newstart (car-safe (funcall hookfun)))) (and newstart (= newstart start))))) to be able to use the new `minibuffer-next-completion` (this puzzle is still unsolved). > The `icomplete-in-buffer` functionality is very rough around the edges. > I only implemented it as a kind of "proof of concept". I think things > like `corfu-mode` work much better (because they don't displace > existing text in the buffer, they are just drawn on top of it). Now `C-,` (icomplete-backward-completions) and `C-.` (icomplete-forward-completions) work fine inline after `M-C-/`. But typing `C-j` (icomplete-force-complete-and-exit) erases the current buffer and replaces its contents with the selected completion. Then it signals an error while trying to call `exit-minibuffer`. It seems inline completions need more work to be as smooth as in the minibuffer. > [ To be honest, in my memory (from when I wrote the code), the list was > shown in the echo area rather than "inline". ] Maybe as an option inline completion could just activate the minibuffer with initial input as a string under point from the original buffer. This will allow to use normal completion in the minibuffer. Then exiting the minibuffer will replace the initial string with the string returned from the minibuffer.