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: Mon, 03 Apr 2023 13:51:13 +0000 Message-ID: <87bkk5ujrm.fsf@posteo.de> References: <87sfdnyuxc.fsf@posteo.de> <83sfdl2z26.fsf@gnu.org> <86tty0ydnl.fsf@gnu.org> <83fs9k20tu.fsf@gnu.org> <86edp4yarm.fsf@gnu.org> <83sfdkysph.fsf@gnu.org> <86wn2woxov.fsf@gnu.org> <83mt3syq8h.fsf@gnu.org> <87pm8lxi1n.fsf@web.de> 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="10182"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Arash Esbati , rms@gnu.org, emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 03 16:24:35 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 1pjL6l-0002Ne-Nf for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Apr 2023 16:24:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjL66-0002qf-4T; Mon, 03 Apr 2023 10:23:50 -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 1pjL64-0002q4-J2 for emacs-devel@gnu.org; Mon, 03 Apr 2023 10:23:48 -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 1pjL62-0005Ai-Qh for emacs-devel@gnu.org; Mon, 03 Apr 2023 10:23:48 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D39CB2402F8 for ; Mon, 3 Apr 2023 16:23:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1680531823; bh=afCU99iVtKWFS2TEYkHyGOIuEK/ehjXjccJom2ykG9U=; h=From:To:Cc:Subject:Date:Autocrypt:OpenPGP:From; b=aQTxZO09m67lg+EI4stAAdc19vvP7YYJnpAJtdVxCDRG+TIhnS+l3S8+6dqtaV3Zw 0qbgdCzfvTvDyKTN/k+267LCuf9td3l5Sw9IBkmZoK4OBaqNvqStqA0vadqGLGriy4 l6lZJJEBREXlYBpNyPE2KF5ghh7sGxEcGpp+APOtIMDc+kpiSxoJzhx+DOsIA8vQr5 b1dvAOUh9xR39mc7iO40RsIFNnq2HhiZRQaj3043IgZRzMGEM/U3TXlripE3NL86lm +Guosn6YzRnaM6eND6Oc0Rej0EJkQwNXYHcbMaOPkt/+6SE5Sb2OO62TtVxadUtPD+ BG88KXCStqRvg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PqtRg0kqSz6txx; Mon, 3 Apr 2023 16:23:43 +0200 (CEST) In-reply-to: <87pm8lxi1n.fsf@web.de> 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:305076 Archived-At: --=-=-= Content-Type: text/plain; format=flowed On 2023-04-03 at 14:32 +02, Michael Heerdegen wrote: >> This is again not TeX-specific. Similar issues exist in Texinfo and >> in other markup languages. The annoyance is usually minor: it's >> enough to tell the speller to "accept" a word just once, since the >> number of markup codes is usually very small. But it would be nicer, >> of course, if Emacs could automatically skip markup in each major >> mode. > > Wasn't that the purpose of `flyspell-prog-mode'? Yes, `flyspell-prog-mode' and `flyspell-prog-text-faces' together offer similar functionality to what jinx does by default, only that it allows configuring the faces on per-major-mode basis and has include- and exclude-faces. As I understood the discussion, ideally we could add this to flyspell and ispell in a consistent way. I'm also not sure if the distinction between `flyspell-mode' and `flyspell-prog-mode' is still needed, you can just customize the text-mode to not exclude any faces for instance. It doesn't hurt, we can just enable `flyspell-prog-mode' everywhere. But ispell doesn't have a prog-mode. If we want to have common include/exclude faces for ispell and flyspell and be consistent with those packages, one could think about adding an ispell-prog-mode for consistency, though that seems weird to me. Of course `flyspell-prog-mode' one can achieve very similar functionality to jinx by using per-major-mode hooks and dir-local variables to customize `flyspell-prog-text-faces' for each mode, but it would be nice for that to be simpler. And naming wise, initially I was confused by `flyspell-prog-mode' because I thought this is programming-mode-specific and might need for the mode to inherit from `prog-mode', but we have plenty of modes with font-lock that inherit from text-mode or conf-mode. An example: I noticed that both jinx and flyspell underline "pgpmime" string in the MML signature snippet in my email buffer, which has the major mode `mu4e-compose-mode' inheriting from `message-mode' and in turn from text-mode. In jinx, I can fix the error message by a simple (cl-pushnew 'message-mml (alist-get 'message-mode jinx-exclude-faces)) The cited text is still checked, because for non-prog-modes I didn't specify any jinx-include-faces and thus it checks all non-exclude faces. In flyspell, I could add `flyspell-prog-mode' to `message-mode-hook' and also hook a function that locally sets the `flyspell-prog-text-faces' to the default text-face and the four message-cited-faces, hoping I didn't forget any other faces that text might have in the email compose buffer. So it feels a bit more annoying to configure. Cheers, Michael --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFNBAEBCAA3FiEEVGkIx4I4OtDn2JTsG4+VyBJdzjEFAmQq4W0ZHG0uZWxpYWNo ZXZpdGNoQHBvc3Rlby5kZQAKCRAbj5XIEl3OMXkyCACkXkxyTcZ6H5dMlZmXzeDm Tp6UDFsXpryrJlpxhvuBrsDs179Xfg1Gq7IL07e2htlZ/g0CE9hh8t54pMHLup8R gd03Pewjj4FFHsEzKqIh/KkRxzu9yzULwrsCjOR36r6ZivJ9e+MiwxhFB/ebGOKt Vdw/AqS2Hii1OwP8LxpuZsCvAKInuLb3OqCZIXB2ssjZxlp7DjkgbeCHA6nuUVhv wq6dtvnqWxqtafAo8heli+ubHvOrZ/+nV/HJQseWfi+yi3O3hk7ZM8NfMTNl9v47 GZA3KSb+vehTPGEXVGVscQ27In9YRMjBuk5Xz0kNxlgRDz25hAiFVGHgzAsuGFoN =QkX3 -----END PGP SIGNATURE----- --=-=-=--