From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pedro Andres Aranda Gutierrez Newsgroups: gmane.emacs.bugs Subject: bug#70321: Can not turn completion-at-point on a per-mode basis on modes derived from text-mode Date: Thu, 11 Apr 2024 09:59:14 +0200 Message-ID: References: <86wmp5uyh1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008c12640615cd898c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28689"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 70321@debbugs.gnu.org To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 11 10:00:28 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rupMB-0007GA-9R for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Apr 2024 10:00:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rupLh-000075-9l; Thu, 11 Apr 2024 03:59:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rupLf-00006q-VU for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2024 03:59:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rupLf-0002T9-Mq for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2024 03:59:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rupLo-0007dI-EI for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2024 04:00:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pedro Andres Aranda Gutierrez Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Apr 2024 08:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70321 X-GNU-PR-Package: emacs Original-Received: via spool by 70321-submit@debbugs.gnu.org id=B70321.171282239829251 (code B ref 70321); Thu, 11 Apr 2024 08:00:04 +0000 Original-Received: (at 70321) by debbugs.gnu.org; 11 Apr 2024 07:59:58 +0000 Original-Received: from localhost ([127.0.0.1]:54870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rupLh-0007bi-Ig for submit@debbugs.gnu.org; Thu, 11 Apr 2024 03:59:58 -0400 Original-Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:44216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rupLf-0007bV-KX for 70321@debbugs.gnu.org; Thu, 11 Apr 2024 03:59:56 -0400 Original-Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-56c404da0ebso11222750a12.0 for <70321@debbugs.gnu.org>; Thu, 11 Apr 2024 00:59:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712822380; x=1713427180; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZUw9E6w7gto92QhZTFFO8MTLFHrpbioEsUGQrfwCc0E=; b=ARZIGEVQd839SSO+OGWhmzZpaBtfyhrskppuDU5r9c4mOdBPJkeZxMIQDLGf5g5sDb SjXe6Q8rcWz02pvXSmraevKO/HD2NeNSAx+JM+ufRSpcg5a8/PryqHI/YPiZeqcaZ5wl fxJRBQbfr4qrlF2ViwKXBTH7pATPK6F6PxK/9MzvYTJXWTraa2YUxrZsvKaTVlz9U7EA jybWbX5oiQc4LV/LZe8jYhz45LMCfX1s4Umd4os+hLwBOs0s8EM+Epu9L4zplknToeuW FOaMoVlPBrui8ToUhWM0+8lFgzNTy7LBy9qpu1HN3d09FuEtW1mZGMWmqZPtZssRLZ1C y+iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712822380; x=1713427180; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZUw9E6w7gto92QhZTFFO8MTLFHrpbioEsUGQrfwCc0E=; b=DkH7erhnm+yN1+I8q49+wXPaPv4xC2KH+7RlM2MeaQgmk9KtjfB9vM8duwnRxxphfw he0/d2xwCcS0QqajX3Cm1LHmjsRdNnTtwJeQcchtzRPsr7gbXJ2qbg6aKCxMlp3co069 A5+fC0CwlDc1QiRU96EZVH5MF1FUSiG2ta7LsNW9yI9byCLx4TKPpfpICGPko0zIfiHV 7p84G88XAm2OgECN2bHMrEx78DIlWD0rQ8MREDdXbCn6ztTQHCPCcaBz6QTzW7DEqUU0 D8VTvuxHmIb9wg/K9JRGlJoMBESd7RO1/FZEBb8t5mlDhJoEO9w77+tKs1/z63M3cl2y E27Q== X-Forwarded-Encrypted: i=1; AJvYcCWhw4e243YxVqODlNqwCLxn95VTEFLioKBgbZRHgPKhsKSD0Jcl6YLJwJsJlOnn0DxQ7dRSfuA4Gc28QORiGGENw8WdKis= X-Gm-Message-State: AOJu0Yyf6a6md7UqenEGxLKcOdiwnDJHJjj7moONAesx2Gtgvd2mfm/u VGInkLtQNg5ijDOZ2smunAEihccPx6XmlBCjEx9NRTdEvZ5Fp89ot/XL5Q35MK/alIhNGhg/ECX nNGlZkwuPWXnJF9qnH51bvv7uVCefxR6w X-Google-Smtp-Source: AGHT+IHbruQ9k7hNZjXEyhpypZTxt4CMPcIaJtCHW3FsM41n2rWcWXARCh6x/iQC4jbYT0JUDJtEsqTKoDY9RmJ+TlQ= X-Received: by 2002:a50:951b:0:b0:56d:c937:7558 with SMTP id u27-20020a50951b000000b0056dc9377558mr3224648eda.9.1712822380398; Thu, 11 Apr 2024 00:59:40 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283085 Archived-At: --0000000000008c12640615cd898c Content-Type: text/plain; charset="UTF-8" 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 wrote: > Hi Eli, Pedro, > > Eli Zaretskii writes: > > >> From: Pedro Andres Aranda Gutierrez > >> 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 --0000000000008c12640615cd898c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Eshel

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

M= y main concern is that they are people out there to whom the additional inf= ormation provided
by ispell-completion-at-point is a burden more = than a help.=C2=A0

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

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

BR,/PA=C2=A0

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

Eli Zaretskii <
eliz@gn= u.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 ()
>>=C2=A0 =C2=A0(message "Trying to turn off ispell completion...= ")
>>=C2=A0 =C2=A0(setopt text-mode-ispell-word-completion nil))
>>
>> (add-hook 'org-mode-hook #'auto-complete-text-off)
>> (add-hook 'org-mode-hook #'(lambda()
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (ispell-change-dictionary "en_G= B")
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (flyspell-mode t)))
>> ---cut here---
>>
>> Open a text file and C-h C-v completion-at-point-functions. You sh= ould 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 se= e
>> ispell-completion-at-point in the list of completion functions, wh= en 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.=C2=A0 If you customize the option to nil, any buf= fer
> 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:
>
>=C2=A0 =C2=A0(defun auto-complete-text-off ()
>=C2=A0 =C2=A0 =C2=A0(message "Trying to turn off ispell completion= ...")
>=C2=A0 =C2=A0 =C2=A0(remove-hook 'completion-at-point-functions #&#= 39;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.=C2=A0 ispell-completion= -at-point
is just a function that can either be in completion-at-point-functions
or not.=C2=A0 The option text-mode-ispell-word-completion controls whether<= br> 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 bea= ntwortet 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 ru= n a leader-deposed hook here, but we can't yet

--0000000000008c12640615cd898c--