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: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 16:19 bug#39015: `isearch-complete1' should use `completion-at-point' or `completion-in-region' Alexander Shukaev
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
2020-01-20 0:27 ` bug#39015: " 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
* 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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.