From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: master ce63f91025: Add textsec functions for verifying email addresses Date: Thu, 20 Jan 2022 12:08:35 +0100 Message-ID: <874k5y3brg.fsf@gnus.org> References: <164250841214.433.17670666873471731764@vcs2.savannah.gnu.org> <20220118122012.7A3A4C0DA1B@vcs2.savannah.gnu.org> <87ee555fy8.fsf@yahoo.com> <8335lkvqas.fsf@gnu.org> <871r127pzl.fsf@gnus.org> <83czkmrbha.fsf@gnu.org> <87ee524u0j.fsf@gnus.org> <838rvar9n0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9797"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: luangruo@yahoo.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 20 14:24:30 2022 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 1nAXQU-0002Ln-0O for ged-emacs-devel@m.gmane-mx.org; Thu, 20 Jan 2022 14:24:30 +0100 Original-Received: from localhost ([::1]:55474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAXQS-0003ov-I2 for ged-emacs-devel@m.gmane-mx.org; Thu, 20 Jan 2022 08:24:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAVJ5-0006Ze-Gi for emacs-devel@gnu.org; Thu, 20 Jan 2022 06:08:43 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=37966 helo=quimby.gnus.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAVJ3-0002M0-Td; Thu, 20 Jan 2022 06:08:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nd8CDhlJYGQkFQzy+bEhqpZft87PkaWJ4W/AIodwhL8=; b=QGS4didhKFeXA78iLk5ldY1kd/ F+xHlP/cAdCqXUeElTGan+/9CeHKq0bmTfV2imH5tBFkxYV0GM2unX+RKXQI4wckXYaY9HInVa5qv aeiBBaCa/witfLT5Kk1/WV8dAAIHGEvANtt0fC9qBddLAbJzPP0eStxK+AGkvMTp4dvI=; Original-Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAVIx-0004o2-Ji; Thu, 20 Jan 2022 12:08:38 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEX9MyfsT0qqYIj0 s6j+KhzrKCb/////auvyAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+YBFAoOOrvKyq0AAAGfSURBVDjL dVLBjuMgDDUa945Lcp8y6r2I2buj9d5pJf7/V9aQQCE7a0UQnu33wDbAj3a9/YzDVxgOKAymOX7V jRkZRQT022O+PnUlWldKJudVLjlTIktkElyyL3Z/3bzPV/379HfvIUHOXiF/e/nRQUmpsuSc8p+s NGVJKV0ykDqKphqTi9+6FXFD9n3bLcYYKjzjwCIuHvHjWxEYPyKCUo7hekbBGK2cwqU4fkdkCpZ7 sKK1HO7BRAvD4FBTJvcgKzPPbjFYEZmE6wNd0CzhNxWysvGHo5o2vUDPW7SNccjQA3UlHkWM3Vt4 wmHrNCcR0688xZdyFmtVGDXKRDTrtarl2GkOT3fwW5kLbS8IyGgG7FzClrIt9F9HlUeU3pPyPDR4 OKYsli1g6E9BKGlY+m4Cbo95emqdtVns4GxiojbL9bHi1noKS8Hf47OvW+m54vIPjUJ8xovqUnGG cdg1POhdW/zzej9UXaFBjgfPNftU8KLKusU2tgSvdFx+wuGZn+qoNBMOT7/qWmgajrvjQmurrhni p/GJy/Fj+zD9Bbo5dAwFOT7kAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTAxLTIwVDEwOjE0OjU4 KzAwOjAwD3dhIgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wMS0yMFQxMDoxNDo1OCswMDowMH4q 2Z4AAAAASUVORK5CYII= X-Now-Playing: African Magic Combo's _Special Club: Hiver 81-82_: "Si J'avance Toi Tu Recules Comment Veux-Tu..." In-Reply-To: <838rvar9n0.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 20 Jan 2022 12:20:35 +0200") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:4f9:2b:f0f::2 (failed) Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 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, RDNS_NONE=0.793, 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:285038 Archived-At: Eli Zaretskii writes: >> Because strings aren't used in isolation. In this case we're checking >> the name part of an email address headers, and: >> >> (insert "Lars Ingebrigtsen\N{RIGHT-TO-LEFT OVERRIDE}" "larsi@gnus.org") >> >> Boom. > > Then you must pass the entire concatenated string to the function. Or > call it on buffer text after inserting the string there. This > function must see the characters affected by the bidi controls, to > tell whether the control do any harm. I see. Perhaps we should have another function in addition -- one that says "does this string (if inserted into a buffer) possibly affect other text"? I.e., "does it have dangling directional modifiers"? I think that's really what we want here (and why the Unicode recommendations are like they are in this area). If we had such a function, then textsec-name-suspicious-p use both the current bidi-find-overridden-directionality and the new predicate as a filter. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no