From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Bidirectional text and URLs Date: Mon, 01 Dec 2014 18:49:58 +0100 Message-ID: References: <87a93cngwv.fsf@uwakimon.sk.tsukuba.ac.jp> <837fyfml31.fsf@gnu.org> <874mtio7wh.fsf@uwakimon.sk.tsukuba.ac.jp> <83r3wml8kq.fsf@gnu.org> <83zjb9an0q.fsf@gnu.org> <831toka82r.fsf@gnu.org> <83oaro8km7.fsf@gnu.org> <83iohw824c.fsf@gnu.org> <83y4qr6zhk.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417456258 10166 80.91.229.3 (1 Dec 2014 17:50:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2014 17:50:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 01 18:50:52 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 1XvV7a-0001It-9H for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2014 18:50:50 +0100 Original-Received: from localhost ([::1]:32997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvV7Z-0003DN-QP for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2014 12:50:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvV79-0003CO-Da for emacs-devel@gnu.org; Mon, 01 Dec 2014 12:50:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvV74-00035Q-34 for emacs-devel@gnu.org; Mon, 01 Dec 2014 12:50:23 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:59393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvV73-00032C-OQ; Mon, 01 Dec 2014 12:50:17 -0500 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XvV6k-0000rm-NO; Mon, 01 Dec 2014 18:49:58 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEUAAABRFBkAAAEBAQEC AQUBAQQDAgUAAAISBgkCAQOZbG/o9KD7AAACVUlEQVQ4jWWTy2vbQBCHx1786imyL0WnrYTpdZ1F VtJz0aGnYGcl4lPAeHFyMjFKoCebQjA5qYQWtzfhi/Ff2dmHHqaDwbv7zW9mZ2cEEk2I92AKnTUA A7QuAy5gkoikCWc2WgG0gFLPU37te32ISyI5QFp4sZrAcRiCntnNK7B1nFcYwv+GYADEburpr7bL DSY31hioPNbtEyYMLHgb1K/LoFQ8Hqpzb8Q86BSh+uU5SXfBIrOA8R+VgryKG7NQRBe4f8J1ayIW vAylre0mqoyPu92OtcpK0H6elM5xHfe4SmuCvXvK8O9p+kugFQnxt9+6ecCAesE6FHEl8CX8zX0M xn0YiqgCwwABp1o+XtRAD7LH47V5fhlJWyBARuD67UBiRuvAVAnuAShMcHMrvhaAKZXb7z0oj2ZU T452GpiwzTiWKgizochpY8YEnm81MBt01JUrt0AuATpiVVzgxAg3NalQY/lehMqZUZBhFMFYPTXc 6xLzYuzCZ1mMoFK0c4rbJv7SuCxQWTc3T4NveA4aR9u2Fw1oDRCC/QAvFJijNy2TjFBxA2v6IgQW OJ7oU4L3auScT0kqUg3k3cRD0kP4QV9XaBCV18VLzlDBIFCjIJZw55NLRTIgCHDgE3WeLMvZB85n OSPNVRIjCGIczoKQb5iD+utwHYgWAm5bSNhMAVz4lyEqsuqtvueZalv7Ab/mFOZ/pNZcA3zJN9bp 8wJDybltG9ax0UsK4fkwNKyCYmtlkUPZVX5hPl0u7FCbQWHdvM9+c4YNadanXTXqwjwo52P5D6AX icR/ls3wAAAAAElFTkSuQmCC X-Now-Playing: Steely Dan's _Aja_: "Aja" X-Hashcash: 1:23:141201:emacs-devel@gnu.org::SCZ/vZOZTdF+0MYg:00000000000000000000000000000000000000000017EO X-Hashcash: 1:23:141201:eliz@gnu.org::lUQwCTS3lLC1lB9o:00000TgN6 In-Reply-To: <83y4qr6zhk.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 01 Dec 2014 19:39:35 +0200") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-MailScanner-ID: 1XvV6k-0000rm-NO MailScanner-NULL-Check: 1418060999.05069@TE+HG6naNLfonrx12XLknA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 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:178609 Archived-At: Eli Zaretskii writes: >> > Anyway, if you want this, please show the API of the function -- what >> > it should return and how. >> >> Actually, I'm not sure. :-) Would it make any sense to have a function >> like `(displayed-directionality POSITION)' that returns either >> `right-to-left' or `left-to-right? If so, the URL-finding function >> would query about the start of the URL (which would normally be the HTTP >> part), and if that's `right-to-left', Here There Be Shenanigans. > > How is this different from the previous suggestion? I'm not sure what you are referring to. >> So is your suggestion here to disable all RLO (etc.) characters in mail >> buffers? > > No, only RLOs that affect URLs. > > Specifically, I suggest to look for RLO before a URL on the same > physical line, and PDF or hard newline after it, and if found, cover > it by a display property whose value is e.g. a string " ". Since just > the fact that you find an RLO before doesn't yet mean that it's a > malicious RLO (other bidirectional controls which you don't want to > know about can countermand the RLO before it affects the URL display), > I suggest to augment that by checking that the URL's host and domain > parts consist of LTR characters whose directionality was overridden. > The latter part is to be done by calling a new primitive mentioned > above. > > Given all this evidence, I think it's pretty much certain that we > found our offending RLO. If you think that that's sufficient (that we only need to look for preceding RLOs on the same line), then this sounds like a good solution to me. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no