[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Word completion in text modes
|
From: |
Eli Zaretskii |
|
Subject: |
Re: Word completion in text modes |
|
Date: |
Sat, 18 Nov 2023 15:50:15 +0200 |
> From: Eshel Yaron <me@eshelyaron.com>
> Cc: emacs-devel@gnu.org
> Date: Sat, 18 Nov 2023 14:21:30 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > I don't understand why users of ispell-complete-word would need to
> > rebind the command. ispell-complete-word is by default not bound to
> > any key, so if we still provide ispell-complete-word, the old binding,
> > if there was one, should still work, and the only difference should be
> > the implementation details? Or what did I miss?
>
> It _is_ bound to `C-M-i` in `text-mode`, that's actually even mentioned
> in several places in the Emacs manual, e.g. in "(emacs) Text Mode":
>
> Text mode binds ‘M-<TAB>’ to ‘ispell-complete-word’.
I tried that in mail-mode and didn't see it bound. But that's because
mail-mode binds C-M-i to another command. Which IMO is a sign of a
problem we need to fix: it makes no sense to have a completion command
bound in Text mode but not in _all_ of its descendants. I guess the
developers of mail-mode didn't consider ispell-complete-word an
important enough feature, and the question then becomes: will the new
text-mode completion-at-point feature be significantly better?
In any case, back to the original issue: what you say about rebinding
ispell-complete-word can only be a problem if the new completion is
incompatible with ispell-complete-word. So we should make sure it is
NOT incompatible. Then the problem would not exist.
> > IMNSHO, such a feature would be much more important and useful than
> > the minor changes of UI and reshuffling of the implementation details
> > of the sort that you propose.
>
> My proposal would benefit this aim as well, I think, as we could simply
> add another completion function to `completion-at-point-functions`, say
> `phrase-completion-at-point`, and users would have their word completion
> extended to include such phrase completion with no further setup.
I appreciate the enthusiasm, but very much doubt that minor internal
changes ("minor" from the POV of user-visible changes in behavior)
will eventually bring us important features such as powerful text-mode
completion. Infrastructure that makes extensions easy is a Good
Thing, but it is not enough to actually make those extensions happen,
not by a long shot. Which is why I prefer to make such internal
reshuffling only together with installing the corresponding
extensions, not as separate "cleanups".
> > How would being "attached to the `ispell-complete-word` interface for
> > word completion" get in the way?
>
> See above. My concern here regards users that are used to pressing
> `C-M-i` in `text-mode` and friends, and getting `ispell-complete-word`.
> If we follow my suggestion of removing this binding, `C-M-i` would
> invoke `completion-at-point`, providing similar functionality but with a
> different interface (by default that would be the *Completions* buffer,
> instead of the *Choices* buffer that `ispell-complete-word` provides).
If that is the danger, it follows that we should make the UI of
completion-at-point be able to support the UI of ispell-complete-word.
Btw, reusing the *Completions* buffer might cause problems on its own,
regardless of the ispell-complete-word issue: what if this completion
is invoked while typing at the prompt of a command that already popped
up the *Completions* buffer? Something to think about, I guess, if we
are going to add more and more of these completion-at-point frameworks
and features.
- Word completion in text modes, Eshel Yaron, 2023/11/18
- Re: Word completion in text modes, Eli Zaretskii, 2023/11/18
- Re: Word completion in text modes, Eshel Yaron, 2023/11/18
- Re: Word completion in text modes,
Eli Zaretskii <=
- Re: Word completion in text modes, Eshel Yaron, 2023/11/18
- RE: [External] : Re: Word completion in text modes, Drew Adams, 2023/11/18
- Re: Word completion in text modes, Eli Zaretskii, 2023/11/18
- Re: Word completion in text modes, Eshel Yaron, 2023/11/18
- Re: Word completion in text modes, Eli Zaretskii, 2023/11/18
- Re: Word completion in text modes, Eshel Yaron, 2023/11/21
- Re: Word completion in text modes, Eli Zaretskii, 2023/11/25
- Re: Word completion in text modes, Eshel Yaron, 2023/11/25
- Re: Word completion in text modes, Eli Zaretskii, 2023/11/25
- Re: Word completion in text modes, Eshel Yaron, 2023/11/25