Hi Eshel

thanks for confirming my understanding. So now, my only "request" would be to add Elisp code
to make it easier to manage the c-a-p-f.

My main concern is that they are people out there to whom the additional information provided
by ispell-completion-at-point is a burden more than a help. 

Attention/concentration deficit is something we should really take seriously. Not only in this case,
but overall. I have taught emacs to some people and, just as an example, company, which I use
in all my programming modes in conjunction with eglot (a neat package, right?) was felt as disturbing
by some people, because they felt over-stimulated by all the options it gave to them. 

Therefore I'm "making  noise" now. Sorry I could not be part of the discussion back in January, but priorities
in life didn't include Emacs back then.

BR,/PA 

On Thu, 11 Apr 2024 at 07:52, Eshel Yaron <me@eshelyaron.com> wrote:
Hi Eli, Pedro,

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
>> Date: Wed, 10 Apr 2024 09:08:08 +0200
>>
>> Place the following file as init.el in a directory (e.g. ~/.demacs.d)
>>
>> ---cut here---
>> (setq inhibit-startup-screen t)
>>
>> (defun auto-complete-text-off ()
>>   (message "Trying to turn off ispell completion...")
>>   (setopt text-mode-ispell-word-completion nil))
>>
>> (add-hook 'org-mode-hook #'auto-complete-text-off)
>> (add-hook 'org-mode-hook #'(lambda()
>>                              (ispell-change-dictionary "en_GB")
>>                              (flyspell-mode t)))
>> ---cut here---
>>
>> Open a text file and C-h C-v completion-at-point-functions. You should see
>> ispell-completion-at-point in the list of completion functions
>>
>> Open a .org file and C-h C-v completion-at-point-functions. You see
>> ispell-completion-at-point in the list of completion functions, when the expected behaviour
>> is that ispell-completion-at-point is *not* in the list.
>
> You cannot set this option in a mode hook, that's not how it is
> supposed to be used.  If you customize the option to nil, any buffer
> under Text mode or its derivative created afterwards will have the
> completion turned off, that's the intended use of the option.
>
> If you want to disable the completion selectively in a mode hook of
> some descendant of Text mode, you need to remove
> ispell-completion-at-point from the appropriate hook explicitly:
>
>   (defun auto-complete-text-off ()
>     (message "Trying to turn off ispell completion...")
>     (remove-hook 'completion-at-point-functions #'ispell-completion-at-point t))
>
> I see no bug here, just a misunderstanding.
>
> Eshel, am I missing something here?

I don't think you're missing anything here.  ispell-completion-at-point
is just a function that can either be in completion-at-point-functions
or not.  The option text-mode-ispell-word-completion controls whether
text-mode adds ispell-completion-at-point to c-a-p-f initially, but
users can also always rely on add/remove-hook to manage it directly.


Best,

Eshel


--
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet