[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67527: 30.0.50; FR: Add an option to disable ispell completion in te
From: |
Eason Huang |
Subject: |
bug#67527: 30.0.50; FR: Add an option to disable ispell completion in text-mode |
Date: |
Thu, 30 Nov 2023 15:46:20 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eshel Yaron <me@eshelyaron.com> writes:
> Eason Huang <aqua0210@foxmail.com> writes:
>
>> Eshel Yaron <me@eshelyaron.com> writes:
>>
>>> Eason Huang, IIUC, you've globally set up your completion selection UI
>>> to pop up automatically. Before this commit, there were no completion
>>> sources for text modes OOTB, so your global setting was equivalent in
>>> practice to something that only affects non-text mode buffers, and that
>>> was fine. Is that correct?
>> No. It's correct on the text file (.txt), but not in org-mode
>> files. Because org-mode also derived from text-mode.
>> ...
>>
>>> If so, my suggestion would be to change your global autocomplete setting
>>> such that it doesn't apply for text buffers, seeing as you don't seem to
>>> want such automatic behavior in these buffers, instead of disabling the
>>> completion source.
>>>
>>> So I'm not sure another user option is due here. I think your
>>> workaround is fine, if that works for you, of course. But you could
>>> just as well say `(setq-local corfu-auto nil)` in that hook, no?
>>
>> No. I need (setq-local corfu-auto t) on org-buffer
>
> Sure, and you can do that. Again, whatever solution works best for
> you. I just highlighted that the behavior that you want to avoid
> seems to be a consequence of a global setting that you don't in fact
> want to apply it in all buffers. Makes sense?
>
Maybe I don't make myself clear!
1. I do confirm that I need to enable corfu-auto in org-mode, and it is
useful in code block such as the belwo code in org buffer:
#+begin_src emacs-lisp
;; input some code here will get auto completion
(message "Hello")
#+end_src
2. It's not a good idear to add `ispell-completion-at-point` to
`completion-at-point-functions` by default.
3. Anyway, I can use the below code to rollback to the behavior before
the commit.
```
(add-hook 'text-mode-hook
(lambda ()
(remove-hook 'completion-at-point-functions
'ispell-completion-at-point t)))
```
If you decide that no need to add an option to prevent adding
`ispell-completion-at-point` to completion-at-point-functions by
default, feel free to closed this bug report
(It's not a bug, I just want to provide some advice from a user view).
Best Regards,
Eason Huang