GNU bug report logs - #67527
30.0.50; FR: Add an option to disable ispell completion in text-mode

Previous Next

Package: emacs;

Reported by: Eason Huang <aqua0210 <at> foxmail.com>

Date: Wed, 29 Nov 2023 10:33:02 UTC

Severity: wishlist

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 67527 <at> debbugs.gnu.org, Eason Huang <aqua0210 <at> foxmail.com>, Eshel Yaron <me <at> eshelyaron.com>, simon <at> ecksd.com
Subject: bug#67527: 30.0.50; FR: Add an option to disable ispell completion in text-mode
Date: Sat, 20 Jan 2024 10:46:00 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Eason Huang <aqua0210 <at> foxmail.com>
>> Cc: 67527 <at> debbugs.gnu.org,  simon <at> ecksd.com
>> Date: Sat, 13 Jan 2024 17:03:28 +0800
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> > I guess I'm confused.  In your original report, which started this
>> > discussion, you said:
>> >
>> >   Because when I enable the autocomplete by corfu or company, it will
>> >   always popup the candidate when I input English characters.
>> >   I don't want to diable the autocomplete of corfu or company, because I
>> >   need it in org code block.
>> >
>> > I was asking about that part in your report -- how did the new support
>> > for completion-at-point in text mode and its descendants change the
>> > behavior when you enable autocomplete by corfu or company, and why
>> > were you talking about disabling autocomplete of corfu and company?
>> >
>> 
>> I have `cape-elisp-block` capf backend in org-buffer, and it only
>> works in code block, that's why I need the autocomplete.
>> 
>> I also need the `flyspell-mode` in org-mode, the `flyspell-mode` will add
>> ispell-completion-at-point to capf, but when I input characters in
>> org-buffer, I don't need the ispell-completion-at-point backend.
>> 
>> Anyway, the below workaround works for me:
>> 
>> ```
>> (add-hook 'text-mode-hook
>>           (lambda ()
>>             (remove-hook 'completion-at-point-functions 'ispell-completion-at-point t)))
>> ```
>
> Thanks.
>
> Eshel, given this feedback, I think it would make sense to add a new
> defcustom that would make text-mode avoid adding
> ispell-completion-at-point to completion-at-point-functions.  Would
> you please submit such a change and the documentation changes to go
> with it?  TIA.

Maybe the existing defcustom `text-mode-meta-tab-ispell-complete-word'
could be renamed and reused, taking three values? This way we avoid
introducing multiple defcustoms for tweaking the same feature.

- `command': Bind `ispell-complete-word' to TAB.
- `capf': Add `ispell-completion-at-point' to the
  `completion-at-point-functions'.
- `nil': None of the above.

Daniel




This bug report was last modified 1 year and 114 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.