From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Unicode confusables and reordering characters considered harmful, a simple solution Date: Fri, 05 Nov 2021 11:34:12 +0200 Organization: LINKOV.NET Message-ID: <86tugqyisr.fsf@mail.linkov.net> References: <83ilxajyhw.fsf@gnu.org> <83fssejxf8.fsf@gnu.org> <835ytajsv2.fsf@gnu.org> <831r3yjqo9.fsf@gnu.org> <83v91aibe7.fsf@gnu.org> <87o872s0wf.fsf_-_@db48x.net> <83lf25gm1j.fsf@gnu.org> <83ee7xgio2.fsf@gnu.org> <87fssdrp54.fsf@db48x.net> <831r3xgfz3.fsf@gnu.org> <87v918qx37.fsf@db48x.net> <83o870fjqg.fsf@gnu.org> <87k0hnqr1v.fsf@db48x.net> <838ry3dmvo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34764"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: cpitclaudel@gmail.com, stefan@marxist.se, yuri.v.khan@gmail.com, Daniel Brooks , monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 05 11:56:59 2021 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 1miwu2-0008m1-Ik for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Nov 2021 11:56:58 +0100 Original-Received: from localhost ([::1]:57196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miwu0-0003nH-BV for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Nov 2021 06:56:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miwtC-00031Z-4y for emacs-devel@gnu.org; Fri, 05 Nov 2021 06:56:06 -0400 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:53337) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miwt9-0001ZN-4y; Fri, 05 Nov 2021 06:56:05 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 9F8C41C0011; Fri, 5 Nov 2021 10:55:55 +0000 (UTC) In-Reply-To: <838ry3dmvo.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 05 Nov 2021 10:31:39 +0200") Received-SPF: pass client-ip=217.70.183.197; envelope-from=juri@linkov.net; helo=relay5-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, 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" Xref: news.gmane.io gmane.emacs.devel:278757 Archived-At: >> Yours doesn’t even work with `next-error`. > > It wasn't supposed to. It was supposed to be similar to > flyspell-mode, which also "doesn't work" with next-error. Of course, > if we decide that next-error should be able to find such places, we > can always add that (emacs 29 is still very far from a release, and we > have ample time for that), but I doubt it would be a good idea, > because next-error is about messages emitted by compilers, and this is > not a compiler-based feature. markchars.el doesn't support next-error OOTB too, so this is what I use to add next-error support to it: (progn (font-lock-ensure) (text-property-search-forward 'markchars 'confusable)) For suspiciously reordered this should do the same: (progn (highlight-confusing-reorderings (point-min) (point-max)) (text-property-search-forward 'face 'confusingly-reordered))