all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eason Huang <aqua0210@foxmail.com>
To: Eshel Yaron <me@eshelyaron.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 67527@debbugs.gnu.org
Subject: bug#67527: 30.0.50; FR: Add an option to disable ispell completion in text-mode
Date: Wed, 29 Nov 2023 22:03:32 +0800	[thread overview]
Message-ID: <tencent_860238DF1ADE66BE9CE44B52891952D00606@qq.com> (raw)
In-Reply-To: <m11qc87jwi.fsf@sp-byods-145-109-16-172.wireless.uva.nl> (Eshel Yaron's message of "Wed, 29 Nov 2023 14:45:33 +0100")

Eshel Yaron <me@eshelyaron.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Eason Huang <aqua0210@foxmail.com>
>>>
>>> In the below commit, Emacs support ispell-completion-at-point in
>>> text-mode.
>>>
>>> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=47e313e9805c527e590df4270062a9185ee9db78
>>>
>>> But it would be nice to add an option to disable this feature.
>>>
>>> Because when I enable the autocomplete by corfu or company, it will
>>> always popup the candidate when I input English charectors.
>>> I don't want to diable the autocomplete of corfu or company, because I
>>> need it in org code block.
>>>
>>>
>>> Workaroud:
>>>
>>> Recently, I have to add this code snippet to disable it.
>>>
>>> ```
>>> (with-eval-after-load 'org
>>>   (add-hook 'text-mode-hook
>>>             (lambda ()
>>>               (remove-hook 'completion-at-point-functions 'ispell-completion-at-point t))))
>>> ```
>>
>> Adding Eshel to this discussion.
>
> Thanks for pinging me.
>
> 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.

In my test.org file, I have emacs-lisp code block and so on. in the code
block I do need the UI to pop up automatically.

`C-h, v completion-at-point-functions` on org-mode buffer will get:
```
(cape-elisp-block cape-file tags-completion-at-point-function)
```


> 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



-- 
Eason Huang






  reply	other threads:[~2023-11-29 14:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 10:31 bug#67527: 30.0.50; FR: Add an option to disable ispell completion in text-mode Eason Huang
2023-11-29 13:18 ` Eli Zaretskii
2023-11-29 13:45   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-29 14:03     ` Eason Huang [this message]
2023-11-29 14:32       ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-30  7:46         ` Eason Huang
2023-11-30  9:01           ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-16  8:37             ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-16  9:34               ` Daniel Mendler
2023-12-16 12:23                 ` Dmitry Gutov
     [not found] <m2jzq0j1f4.fsf@foxmail.com>
2024-01-08 17:55 ` Simon Manning
2024-01-09 13:33   ` Eli Zaretskii
2024-01-12 12:46     ` Eason Huang
2024-01-12 14:09       ` Eli Zaretskii
2024-01-13  9:03         ` Eason Huang
2024-01-20  9:19           ` Eli Zaretskii
2024-01-20  9:46             ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-20 10:28               ` Eli Zaretskii
2024-01-20 10:33                 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-20 10:56                   ` Eli Zaretskii
2024-01-20 11:33                     ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-27  9:56                       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_860238DF1ADE66BE9CE44B52891952D00606@qq.com \
    --to=aqua0210@foxmail.com \
    --cc=67527@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=me@eshelyaron.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.