From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Eliachevitch Newsgroups: gmane.emacs.devel Subject: Re: jinx Date: Wed, 29 Mar 2023 22:46:01 +0000 Message-ID: <87sfdnyuxc.fsf@posteo.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14870"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 30 01:56:27 2023 Return-path: Envelope-to: ged-emacs-devel@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 1phfeV-0003f3-IE for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Mar 2023 01:56:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phfdh-0000oM-95; Wed, 29 Mar 2023 19:55:37 -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 1phfdf-0000nM-B1 for emacs-devel@gnu.org; Wed, 29 Mar 2023 19:55:35 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phfdd-0005Uh-AL for emacs-devel@gnu.org; Wed, 29 Mar 2023 19:55:35 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8318B24019E for ; Thu, 30 Mar 2023 01:55:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1680134129; bh=LmSS1D3G0kdQ5IJF7rwj9K3G2UHTm9ArFbvTzj/vpHo=; h=From:To:Cc:Subject:Date:Autocrypt:OpenPGP:From; b=hvU2x0+8WNtms1tjR5/tfMhwYq7MlLMu7tiWe7ilfiABfXFKrgMPEW+AxMgRb7HgF uuPNlAW+DvKoRd6jZy1T9Wd7XsRJ0dCbkMv6yvJMkKj4PGbQgz8lhcbOkLhrUgHHL8 rv5cJh945aPMMccQprRLYfO+NXWu67t2G8YCByfXbaT/1rMl9j8RstMEOni9flZ7dK yh+bLzheNAlYXUPh6Qx6VM48tk38y1yeZcylPMD/n1Qd4Uu9AmHZMl0Wv2yisLVVZp WK0DnWiKFT2kE8pYgkzG2YXLwWcD7RDyjoQEO0bFtdHilncA4EQzpahGKvSmwLfrgR jkWc3mHbmVKyw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Pn3Mh5DDcz9rxB; Thu, 30 Mar 2023 01:55:28 +0200 (CEST) In-reply-to: Autocrypt: addr=m.eliachevitch@posteo.de; keydata=xsBNBFHFxZABCADAAv2siayhA7Etl85WcwcyMPBD2bt/6Wh3A8a12AURV5J4tprzgbdlxC0w1LofvklG7ls25NERAY931hvQW+f5GEI0pwoNNFXEkKDa8/J4SxhrqXx8CJA85owPq1g4cFeO1ooQJ32BewlRGsnhd+taYExZ76oaMnFtx6jYjf6mPbjDyiLhC+Og3MBpOqAnmX7mhStgJl0uru1ZGEB17tzzVuQ4ljDv/MvUagVFymQBhmlbzvze5eLeDn90Ot0DjWHy3HzCFMEnVqQy8rmEA8N9GOANwyMY79KVymsPakeNwacPRFzYXCZvolC5jtY6I/1ALvVtNc45JyZWty+rMPo3ABEBAAHNGG0uZWxpYWNoZXZpdGNoQHBvc3Rlby5kZcLAlAQTAQgAPhYhBFRpCMeCODrQ59iU7BuPlcgSXc4xBQJgUmWNAhsDBQkSToKgBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEBuPlcgSXc4xqC8H/06lkI7BimgkSobuEzsD9LsIPEyz5uUaQAP77u1nfoO1vB0DEdPxn7f3H3Hs7nyUfPgvgsn+9rTSV+ubHH5f/bzgQZgES2WItbV7iM290j6nWSc/iCTLlTmM2KMNvbMB9xGzV0m+UjMyAa9zUhB/3N+rd5ya/oSiTKw2/UbgfM5fR1knIUgPDENlKjJvO7/71Sxwpc+gKvAR9lHRT8JzQMyFaFO+zbo53Z7FzDTuj7zVyQ4MPIhe+UMI4rtNZeyPDM0QTep0+N39JbDhvUVevOh 15XJTYXl2Zdhl/yunnOibtg3XKtToakc4FjWJGrw8njbges5YqaodeMq OpenPGP: url=https://posteo.de/keys/m.eliachevitch@posteo.de.asc Received-SPF: pass client-ip=185.67.36.65; envelope-from=m.eliachevitch@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304832 Archived-At: --=-=-= Content-Type: text/plain; format=flowed The technical questions where answered by Philip. I tried the package today and can comment from a user perspective: > I saw the announcement about the jinx spelling package. It sounds > very powerful. Could it replace ispell.el? If so, do people think > that would be a good idea? If not, why not? > > Same questions for flyspell.el. These packages are used in different ways and may complement each other. jinx spell-checks the visible text and underlines errors. It's very fast at finding errors due to focusing on the visible text and using the libenchant API instead of subprocess calls. But it currently lacks the ability to check the entire buffer and e.g. jump to the next error or list all errors. In its README, the jinx author writes that flyspell only checks the work under point. However, it doesn't mention that one can run flyspell-buffer (or flycheck-region) to check the entire buffer for errors, so that's not a huge issue. But jinx just feels more snappy in that regard, incorrect are just highlighted immediately without having to do anything except having the mode enabled. But as far as I know it doesn't have yet the ability to check and list the spelling mistakes in the entire buffer. Therefore, I will probably still be using ispell-buffer to iterate through all spelling errors. What I personally enjoy most about jinx are the ergonomics of being able to exclude certain syntactic categories from spell-checking. One convenient way are `jinx-include-faces' and `jinx-exclude-faces', which are alists of major modes to faces to include/ignore. Also there's `jinx-exclude-regexps' which is an alist from major modes to regexes. For example made it easy for me to get rid of false-positives on macros in LaTeX [fn 1]. Some spell-checking programs (aspell, hunspell) have LaTeX-detection built-in, but it doesn't always work reliably and is not as easily configurable. And that functionality doesn't extend to other markup languages. This is also useful for e.g. org-mode or checking comments and docstrings in programming languages. Ergonomic-wise I also enjoyed that `jinx-languages', which configures the language, can be a list of language (locale) strings (or just a single string).. I'll use that for my private notes, which tend to be a mix of German and English. `ispell-dictionary' in comparison can only be a single string. (Though through online search I found that when used with hunspell one can provide a comma-seperated list of locales to ispell-dictionary and hunspell will recognise that). I feel like from a user-perspective, jinx, possibly extended, could replace most use-cases of flyspell. Alternatively, one could also try to add a feature to make flyspell always check the visible text in the buffer, which would need to happen asynchronously I don't know whether technically that would be possible One could also consider trying to port some of its other ideas back to the existing spell-checking packages in emacs, like using mode-alists for the faces-configuration. [fn 1]: While writing the mail I looked into the flyspell documentation and that is has similar features via `flyspell-prog-text-faces' and `flyspell-tex-command-regexp', but those are less flexible. `flyspell-prog-text-faces' doesn't work for modes that do not inherit from prog-mode and I can't configure it on a mode-specific granularity, except by using major-mode-hooks and dir- or file-local variables. -- Michael Eliachevitch Public PGP Key: https://keyoxide.org/hkp/546908c782383ad0e7d894ec1b8f95c8125dce31 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFNBAEBCAA3FiEEVGkIx4I4OtDn2JTsG4+VyBJdzjEFAmQkz+8ZHG0uZWxpYWNo ZXZpdGNoQHBvc3Rlby5kZQAKCRAbj5XIEl3OMVE0CACwjMM6r9naxVha3O29pbDA A4EgyDiwmoN/rLz+pUdD1QsUGRFZMkyg/o67odMd5uiIa21ne8YiBmnkEaURju5L Z1k205CvYwJTT5H6UnyF9zV2uoiW+8yZKyT4rtT3aTu+yUOCi3qqzCchFmBvhYo9 3h85jtb43yAKNX2QxSqEq//LW1cECxNGzrieDkMeMmtwupAed6+RcjUF0qVE5auF gqiwnMpUk4TLiqV04WXfyKN6dk3a4HcolYOu+vCJw4CbMb71RLSYa2uYlgzfNS/G Mr3BsCTJkme9MHmLV1xN4ZYopNWc+9im5ViQUwBs2QVFCwFCIwYfotJP0MPv77AQ =a0gm -----END PGP SIGNATURE----- --=-=-=--