From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: Bidirectional text and URLs Date: Fri, 28 Nov 2014 14:49:59 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <874mtj3y1k.fsf@lifelogs.com> References: <87k32f4loc.fsf@lifelogs.com> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1417204205 19998 80.91.229.3 (28 Nov 2014 19:50:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Nov 2014 19:50:05 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 28 20:49:59 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XuRYE-0008Uz-H8 for ged-emacs-devel@m.gmane.org; Fri, 28 Nov 2014 20:49:58 +0100 Original-Received: from localhost ([::1]:45689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuRYE-0002NA-6J for ged-emacs-devel@m.gmane.org; Fri, 28 Nov 2014 14:49:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuRXu-0002Mt-1I for emacs-devel@gnu.org; Fri, 28 Nov 2014 14:49:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuRXp-0004NR-3D for emacs-devel@gnu.org; Fri, 28 Nov 2014 14:49:37 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:44093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuRXo-0004NM-So for emacs-devel@gnu.org; Fri, 28 Nov 2014 14:49:33 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XuRXm-0008K7-3T for emacs-devel@gnu.org; Fri, 28 Nov 2014 20:49:30 +0100 Original-Received: from c-98-229-61-72.hsd1.ma.comcast.net ([98.229.61.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Nov 2014 20:49:30 +0100 Original-Received: from tzz by c-98-229-61-72.hsd1.ma.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Nov 2014 20:49:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 73 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-98-229-61-72.hsd1.ma.comcast.net X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:NVGpW9p7OSWs9Qn2gG8BSgvgw3A= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178437 Archived-At: On Fri, 28 Nov 2014 14:58:27 +0100 Lars Magne Ingebrigtsen wrote: LMI> Ted Zlatanov writes: >> My uni-confusables package in the GNU ELPA would help detect things like >> б (CYRILLIC SMALL LETTER BE) confused with the number 6. The relevant >> line from confusables.txt is: >> >> 0431 ; 0036 ; SL # ( б → 6 ) CYRILLIC SMALL LETTER BE → DIGIT SIX # >> >> which maps to (1073 "6") in `uni-confusables-char-table-single'. EWW and >> SHR could opportunistically use that table to highlight such characters. LMI> Yes, and perhaps use that to do a "are you sure?" if a user tries to LMI> visit https://𝐩𝐚𝐲𝐩𝐚𝐥.com or https://paypal.com. Right. At least in the SHR/EWW context we can control that experience, and also perhaps in places like `browse-url' or `ffap-url-at-point'. LMI> But then uni-confusables should perhaps be moved from ELPA to Emacs so LMI> that we can use it generally? It would probably improve the use experience, yes. Stefan, WDYT? On Fri, 28 Nov 2014 09:24:21 -0500 Stefan Monnier wrote: >> which maps to (1073 "6") in `uni-confusables-char-table-single'. EWW and >> SHR could opportunistically use that table to highlight such characters. SM> I don't think SHR/EWW can really do that for the buffer's main text, SM> since AFAIK it doesn't know whether what it displays is supposed to be SM> a URL or just plain human text (or rather, to do it well it would have SM> to somehow detect a particular mix of characters). For Gnus users, for instance, the buffer would be using SHR so there's some control over the experience and metadata about the content. You're right that in general this is not clear, which is why interactive functions like `browse-url' and others may need to be advised. SM> OTOH it can&should indeed do something (including a bigfat warning for SM> bidi-ordering codes) when displaying something it knows to be a URL. I'm not sure about the bidi markers, Eli can discuss that side. I'll try to get the confusables in there and maybe write general code that bidi markers and others can hook into. On Fri, 28 Nov 2014 16:57:27 +0200 Eli Zaretskii wrote: >> I could also add RTL markers and other useful things to uni-confusables >> if you think it's the right place EZ> I don't think it's TRT to highlight these controls regardless of what EZ> characters they affect. See my other message for why. OK. >> I'm not sure of the right thing because this feels a little bit like >> core functionality. EZ> What is "core functionality" here? Things that work in Emacs without customization. EZ> For that matter, what functionality are we talking about? The uni-confusables package from the GNU ELPA and glue code to let SHR and EWW know that a URL includes such characters. EZ> We should first decide what we want to do with these cases, and only EZ> then discuss whether that functionality belongs to the core. I think Lars' suggestion is decent, see above. Ted