From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#61814: [RFC] Asynchronous, jit-lock-based Flyspell Date: Sat, 4 Mar 2023 14:59:41 -0800 Message-ID: <5734219A-738C-4BA4-97F4-91670B7DAAAF@gmail.com> References: <87a60spwv7.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4714"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eliz@gnu.org, Stefan Monnier , 61814@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 05 00:01:34 2023 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 1pYasg-00016A-Hs for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Mar 2023 00:01:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYasH-0007Hv-2p; Sat, 04 Mar 2023 18:01:09 -0500 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 1pYasA-0007FW-GO for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 18:01:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYasA-0001Gs-7c for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 18:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYasA-0008AP-31 for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 18:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Mar 2023 23:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61814 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 61814-submit@debbugs.gnu.org id=B61814.167797080331186 (code B ref 61814); Sat, 04 Mar 2023 23:01:02 +0000 Original-Received: (at 61814) by debbugs.gnu.org; 4 Mar 2023 23:00:03 +0000 Original-Received: from localhost ([127.0.0.1]:37984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYarC-00086n-0v for submit@debbugs.gnu.org; Sat, 04 Mar 2023 18:00:02 -0500 Original-Received: from mail-pj1-f54.google.com ([209.85.216.54]:36850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYarA-00086B-6P for 61814@debbugs.gnu.org; Sat, 04 Mar 2023 18:00:00 -0500 Original-Received: by mail-pj1-f54.google.com with SMTP id cp7-20020a17090afb8700b0023756229427so9655547pjb.1 for <61814@debbugs.gnu.org>; Sat, 04 Mar 2023 15:00:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677970794; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=X4nu2hiXJ+gDh2sVsi5O3BkJGf7MsC8/IMZpQt6iC14=; b=YWQSLhBQG/dNElJHEWCsUD/EWMYoYGnQYDFH0H5wjG+mY+YpbrWmRN6IQkpQSDcMIZ UDAmAA42qvElfAzNObj/2zEKNWG4p2UKK6GPSP+sJValckUQ504iPzWrcfbDwVbnftLx 1gl06AjIEsKxTIB15xLHxpyLf5uTIVGODFsqZrdMY/+YHpWi8064U9WubwCAALTlbekz 20WGBjs9XNSGILT53bV4il3alfEMbaUdUz8dF7TV0C/f/dK4XSt/+RUlvCvVZdeuJEQF ThTVN6TinH396rZH7zyMObIMYO7clFrPxf7pX4X1QLw1hE9MgpzJhSKh8uxGbaLoZSkk jI8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677970794; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X4nu2hiXJ+gDh2sVsi5O3BkJGf7MsC8/IMZpQt6iC14=; b=4TutGJYnPZPVdhiJdG3yoX4iSMYnqVIA9ZZCdNzMHjQPEvPD6t2YA0tlFMVUbHAqPz /KqX1/h41i8csBbxzM9wiAPUQqbG2AlZAl9v5Q0f/ZFL8nBkrZvMjC22TiU//ZbvXQy8 pb5+sptqhc2S2fAQrGKpRpZwsQBxdunmnAAF119FsS8/j546HFWQKtBemTZd2PBQ7eHp ZPDzbxOzny7kUnP53bl1kzEoeo+jLrufGeKT2XkaDzVIcY/abH/d+6AahBSrA4tqdB2p 5xxDZXa6TCYdmwZKJxIaBTpmMBhVb3c4rlS02Hype9NhfQOi/1+m6DyrpmAQ3bUD3I6G Rwjw== X-Gm-Message-State: AO0yUKXp2zilOh0TqH7Efv6iI6/xZtz6e0GllORnMbeGq2nXL0xlxLbW XWZ8v2TmAWL6SPTOtiKafmQ= X-Google-Smtp-Source: AK7set+rB+n+xjfeb2996VGx3Tzk1/gYTcPz6vP0pf+NckxqCLaZuT4UEBHAJfcfNIp290/IIXYZQQ== X-Received: by 2002:a17:903:1d1:b0:19e:608d:6844 with SMTP id e17-20020a17090301d100b0019e608d6844mr8309535plh.10.1677970794219; Sat, 04 Mar 2023 14:59:54 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id kw3-20020a170902f90300b0019cbb055a95sm3797027plb.94.2023.03.04.14.59.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Mar 2023 14:59:53 -0800 (PST) In-Reply-To: <87a60spwv7.fsf@gmail.com> X-Mailer: Apple Mail (2.3731.400.51.1.1) 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:257320 Archived-At: > On Mar 4, 2023, at 3:41 AM, Augusto Stoffel = wrote: >=20 > 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. >=20 > It also seems best, at least initially, to develop the new package > independently as an ELPA package. >=20 > Stefan, could you add the following to ELPA? I'll then add a README, > fix the headers, and make a release. >=20 > https://github.com/astoff/jit-spell Right, I=E2=80=99ve 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=E2=80=99s 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=E2=80=99s possible or desirable to follow the = flyspell=E2=80=99s 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=