unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Augusto Stoffel <arstoffel@gmail.com>
Cc: eliz@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
	61814@debbugs.gnu.org
Subject: bug#61814: [RFC] Asynchronous, jit-lock-based Flyspell
Date: Sat, 4 Mar 2023 14:59:41 -0800	[thread overview]
Message-ID: <5734219A-738C-4BA4-97F4-91670B7DAAAF@gmail.com> (raw)
In-Reply-To: <87a60spwv7.fsf@gmail.com>



> On Mar 4, 2023, at 3:41 AM, Augusto Stoffel <arstoffel@gmail.com> wrote:
> 
> After using this for some time, I realized that not everybody will
> prefer "JIT spellcheking" of the entire screen over the well-known
> Flyspell behavior.  Given that the Flyspell code is a bit difficult to
> generalize, it seems better to keep the alternative as a separate
> package.
> 
> It also seems best, at least initially, to develop the new package
> independently as an ELPA package.
> 
> Stefan, could you add the following to ELPA?  I'll then add a README,
> fix the headers, and make a release.
> 
>  https://github.com/astoff/jit-spell

Right, I’ve tried wucuo.el before, which spell checks every word currently displayed in the window, so it shows warnings on words far from point. And I found myself preferring flyspell’s behavior of only showing warnings on words I just typed or moved over.

wucuo.el also caused an issue when I opened a buffer with some inline images. The inline image is the raw image data encoded in base64 inserted into the file as a string, plus a display text property over the whole string displaying it as the image. wucuo.el thinks that huge string is visible in the window (because of the display text property), and tries to spell check that huge string, and got stuck.

I wonder if it’s possible or desirable to follow the flyspell’s behavior but make it async? Preferably when some mechanism to discard unnecessary spell checks. For example, I modified my scrolling functions to inhibit flyspell from running in post-command-hook, which speeds up scrolling considerably. Otherwise flyspell would try to spell check every word you scrolled by and cause perceivable slow-down.

Yuan




  reply	other threads:[~2023-03-04 22:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-26 14:56 bug#61814: [RFC] Asynchronous, jit-lock-based Flyspell Augusto Stoffel
2023-02-26 15:11 ` Eli Zaretskii
2023-02-26 15:36   ` Augusto Stoffel
2023-02-26 15:45     ` Eli Zaretskii
2023-02-27  8:31 ` Yuan Fu
2023-02-27  9:58   ` Augusto Stoffel
2023-03-04 11:41   ` Augusto Stoffel
2023-03-04 22:59     ` Yuan Fu [this message]
2023-03-06 10:52       ` Augusto Stoffel
2023-03-06 12:15         ` Eli Zaretskii
2023-03-08  0:45         ` Yuan Fu
2023-03-07 18:25       ` Juri Linkov
2023-03-08  8:50         ` Augusto Stoffel
2023-03-08 13:57           ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=5734219A-738C-4BA4-97F4-91670B7DAAAF@gmail.com \
    --to=casouri@gmail.com \
    --cc=61814@debbugs.gnu.org \
    --cc=arstoffel@gmail.com \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).