unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 45768@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>,
	simon254@mailbox.org, 45767@debbugs.gnu.org
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	[thread overview]
Message-ID: <86fsl5sblr.fsf@mail.linkov.net> (raw)
In-Reply-To: <jwv5ymepfpi.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 09 May 2022 17:23:00 -0400")

> 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.





      reply	other threads:[~2022-05-19 16:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10 12:37 bug#45767: icomplete-in-buffer completion does not work with dabbrev-completion simon254--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-06 19:04 ` bug#45767: bug#45768: icomplete-mode does not provide in region completion for dabbrev-completion Lars Ingebrigtsen
2022-05-06 19:38   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-07 10:16     ` Lars Ingebrigtsen
2022-05-07 14:22       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-07 15:51         ` Lars Ingebrigtsen
2022-05-08 18:08   ` bug#45768: " Juri Linkov
2022-05-09  9:47     ` Lars Ingebrigtsen
2022-05-09 18:41       ` Juri Linkov
2022-05-09 21:23         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19 16:58           ` Juri Linkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86fsl5sblr.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=45767@debbugs.gnu.org \
    --cc=45768@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=simon254@mailbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).