From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#35802: Broken data loaded from uni-decomposition Date: Thu, 06 Jun 2019 23:41:35 +0300 Organization: LINKOV.NET Message-ID: <87v9xie9a8.fsf@mail.linkov.net> References: <878sv2idc0.fsf@mail.linkov.net> <85k1dybq2y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="106129"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 35802@debbugs.gnu.org To: npostavs@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 06 22:54:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.47]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hYzOw-000RS1-92 for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Jun 2019 22:54:22 +0200 Original-Received: from localhost ([::1]:38156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hYzOu-0002Mr-OS for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Jun 2019 16:54:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46542) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hYzOf-0002MX-Rm for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2019 16:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYzOe-0001pH-0k for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2019 16:54:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37125) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hYzOc-0001lk-Ba for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2019 16:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hYzOc-0000bk-9q for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2019 16:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jun 2019 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35802 X-GNU-PR-Package: emacs Original-Received: via spool by 35802-submit@debbugs.gnu.org id=B35802.15598544312305 (code B ref 35802); Thu, 06 Jun 2019 20:54:02 +0000 Original-Received: (at 35802) by debbugs.gnu.org; 6 Jun 2019 20:53:51 +0000 Original-Received: from localhost ([127.0.0.1]:50666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYzOQ-0000b1-LG for submit@debbugs.gnu.org; Thu, 06 Jun 2019 16:53:50 -0400 Original-Received: from beige.elm.relay.mailchannels.net ([23.83.212.16]:38226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYzOO-0000ar-MI for 35802@debbugs.gnu.org; Thu, 06 Jun 2019 16:53:49 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 71D261A20BB; Thu, 6 Jun 2019 20:53:47 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a51.g.dreamhost.com (100-96-4-95.trex.outbound.svc.cluster.local [100.96.4.95]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id CDBA51A2078; Thu, 6 Jun 2019 20:53:46 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a51.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Thu, 06 Jun 2019 20:53:47 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Army-Battle: 059d3902083b8a74_1559854427247_3946379288 X-MC-Loop-Signature: 1559854427247:2748609386 X-MC-Ingress-Time: 1559854427246 Original-Received: from pdx1-sub0-mail-a51.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a51.g.dreamhost.com (Postfix) with ESMTP id 664DC83610; Thu, 6 Jun 2019 13:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=linkov.net; bh=vL6pIR xx4j3YYLSD8zwaE/G05s4=; b=gFxcDV8T88aand8Kkr3+C4YWTHwWGSXLRDyu+/ /Nf+oJ19WVpBwEbSpW/ESwZt5vm7Sbhs12eT0ZjRI4bYGhQ+f6eF0JHkTdX+9D9c mOrDwQWfURcE273kB/yaVIQmMokWznVUGFPW/n8cRxGxyxA+T71QY9U46lDTg3AY 1gd/s= Original-Received: from mail.jurta.org (m91-129-96-73.cust.tele2.ee [91.129.96.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a51.g.dreamhost.com (Postfix) with ESMTPSA id 95C8B8360A; Thu, 6 Jun 2019 13:53:37 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a51 In-Reply-To: <85k1dybq2y.fsf@gmail.com> (npostavs@gmail.com's message of "Thu, 06 Jun 2019 13:07:01 -0400") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrudeggedgudehiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirdejfeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrjeefpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepnhhpohhsthgrvhhssehgmhgrihhlrdgtohhmnecuvehluhhsthgvrhfuihiivgepud X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:160191 Archived-At: >> But should return `t'. I customized `search-whitespace-regexp' >> (whose value isearch sets to `search-spaces-regexp') to a legitimate >> value, but `unicode-property-table-internal' used in char-fold.el fail= s >> to correctly load "uni-decomposition.el", thus breaking the char-fold = search. > > The problem is that this messes up a search in find-auto-coding: Thanks for finding this. > (if (re-search-forward > "[\r\n]\\([^\r\n]*\\)[ \t]*Local Variables:[ \t]*\\([^\r\n]*= \\)[\r\n]" > tail-end t) > ... > (let* ((prefix (regexp-quote (match-string 1))) > (suffix (regexp-quote (match-string 2))) > > The space between "Local Variables" becomes "\\(\\s-\\|\n\\)+" which is > a problem because it adds a new capturing group, which means suffix get= s > the wrong value. Then we fail to find the ";; End:" line, and don't > apply the "coding: utf-8" setting. When this feature is used in Isearch, the documented way to avoid this pr= oblem is to replace the space with =E2=80=98[ ]=E2=80=99, i.e. to use "Local[ ]Variables:" > So the value you chose isn't entirely legitimate, you should use a shy > group instead: > > (equal (progn (load "international/uni-decomposition.el" t t t t) > (aref (cdr (assq 'decomposition char-code-property-alist)= ) 1024)) > (progn (let ((search-spaces-regexp "\\(?:\\s-\\|\n\\)+")) > (load "international/uni-decomposition.el" t t t t)) > (aref (cdr (assq 'decomposition char-code-property-alist)= ) 1024))) > ;=3D> t Maybe this gotcha should be mentioned in the documentation of search-spaces-regexp and search-whitespace-regexp? > And possibly let-binding search-spaces-regexp in find-auto-coding would > make sense (although, there's probably more places like this that might > break, not sure if we can ever hope to find them all). This is almost the same class of problems as wrapping re-search-forward in save-match-data, so finding all places that affect matching elsewhere will take time.