From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Juri Linkov <juri@linkov.net>
Cc: Alexander Shukaev <emacs@Alexander.Shukaev.name>, emacs-devel@gnu.org
Subject: Re: `isearch-complete1' should use `completion-at-point' or `completion-in-region'
Date: Mon, 13 Jan 2020 14:38:12 -0500 [thread overview]
Message-ID: <jwvpnfnw3x3.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8736ckl015.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 13 Jan 2020 01:36:54 +0200")
> But there is one thing I don't understand: how packages prefer to hook
> into auto-completion? Is it enough to convert `isearch-complete1' to
> just `completing-read' in the minibuffer activated by `isearch-edit-string'?
First, there are 2 different cases: `isearch-complete-edit` and `isearch-complete`.
For `isearch-complete-edit` we could indeed use `completing-read`, but
I don't think I like this idea (e.g. I think it'd be odd for Icomplete
to kick in when in `isearch-edit`). So I think the better solution is
to set `completion-at-point-functions` and then turn
`isearch-complete-edit` into an alias for `completion-at-point`.
For `isearch-complete`, it's a bit more tricky because it's a form of
completion that is performed on a text that's kept inside a string
rather than inside a buffer, so I think we'll still need some ad-hoc
code, but it could better use our completion framework.
Stefan
next prev parent reply other threads:[~2020-01-13 19:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7da1738e-1e8a-3c12-31bf-741ee171db5c@Alexander.Shukaev.name>
2020-01-12 23:36 ` `isearch-complete1' should use `completion-at-point' or `completion-in-region' (was: bug#39015) Juri Linkov
2020-01-13 14:35 ` `isearch-complete1' should use `completion-at-point' or `completion-in-region' Alexander Shukaev
2020-01-13 19:38 ` Stefan Monnier [this message]
2020-01-14 23:51 ` Juri Linkov
2020-01-15 13:57 ` Stefan Monnier
2020-01-15 23:24 ` Juri Linkov
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=jwvpnfnw3x3.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=emacs@Alexander.Shukaev.name \
--cc=juri@linkov.net \
/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).