From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#35802: Broken data loaded from uni-decomposition Date: Fri, 21 Jun 2019 07:16:41 -0400 Message-ID: <87muibur1i.fsf@gmail.com> References: <878sv2idc0.fsf@mail.linkov.net> <85k1dybq2y.fsf@gmail.com> <87v9xie9a8.fsf@mail.linkov.net> <854l4wb3y6.fsf@gmail.com> <877e9r3j2i.fsf@mail.linkov.net> <87k1dmxopz.fsf@gmail.com> <877e9lcp3s.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="120653"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: 35802@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 21 13:18:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1heHYc-000VEf-1i for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Jun 2019 13:18:14 +0200 Original-Received: from localhost ([::1]:59450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1heHYa-0001Ke-Ou for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Jun 2019 07:18:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45564) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1heHXh-0000Xr-O5 for bug-gnu-emacs@gnu.org; Fri, 21 Jun 2019 07:17:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1heHXX-0005Um-Sx for bug-gnu-emacs@gnu.org; Fri, 21 Jun 2019 07:17:13 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36259) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1heHXX-0005UU-HZ for bug-gnu-emacs@gnu.org; Fri, 21 Jun 2019 07:17:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1heHXW-00033G-Gm for bug-gnu-emacs@gnu.org; Fri, 21 Jun 2019 07:17:07 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jun 2019 11:17:06 +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.156111581111707 (code B ref 35802); Fri, 21 Jun 2019 11:17:06 +0000 Original-Received: (at 35802) by debbugs.gnu.org; 21 Jun 2019 11:16:51 +0000 Original-Received: from localhost ([127.0.0.1]:49803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1heHXH-00032l-Ha for submit@debbugs.gnu.org; Fri, 21 Jun 2019 07:16:51 -0400 Original-Received: from mail-io1-f42.google.com ([209.85.166.42]:44766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1heHXF-00032X-HS for 35802@debbugs.gnu.org; Fri, 21 Jun 2019 07:16:49 -0400 Original-Received: by mail-io1-f42.google.com with SMTP id s7so2162187iob.11 for <35802@debbugs.gnu.org>; Fri, 21 Jun 2019 04:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=fmXZcLPEQLSqb2fHi38qRTJS7rOB/zpLrfFgzpONris=; b=T2uHkEpeKBaezLPac1hbgaWU+lgjXhOB9430pdioENx7My1dLxYGCMub3PIILlxQK1 5F/Dp2eea6/SWdGMc0oWbAtOUiVS4a1RRCciZqIWctKSwF7uHpnuclAE3vSh0dwEHKXG 2N8qxR5kwsRIMmy+nmats8rMeTU1rxeiOcIjcS6BAbO53MtbFGBHdkNm540QhBgO+VsR SfKw6npN8c1FpzuNbvbAF1gDRrCFpmUHKAtbFQ+WbrA4S3NY/fqVcXy05MA/N65gp8ys F/8QFlDAfLKz/azdp2R+QLoNP7R7z09SdNFaFdm4ww+Cycd4pzkgp7Q0ffVRvCcNFZM3 viMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=fmXZcLPEQLSqb2fHi38qRTJS7rOB/zpLrfFgzpONris=; b=eGxX27lMkqA+6TMEurRRyJn/gvzc1N1C/klFBE555Q2qvQWEcrfYlCkIeriQihXAr/ A+uEk24zSzZHlLBQVskysiIsWXqo0FgnJFfNYewnw3f0JVHHbmE8bieAHpLhKoHBAyGF Bc4GiViDx9sEcS3nyfP4j6RaisNxeFtQo5ZoySpqSFO7YnW4lTUZaiqJA3O7kqyDB6+F dd//Qd/3oEj2EPN+z1xrJgVUBlW0Qi6l9JJq3ZSqp5CE21p/L8dBxUyL3Dn8dzLILFgo oL+treTBJVG4rMaSEMbb3We/plWrEq63jFPthCpRMcz+HOkfaiUbnYt04YKscWXSqtmQ KxMw== X-Gm-Message-State: APjAAAV8wOKkj84B1u8ZV2jRwRDZPFPsnuo5Q3xDSfu9gBZdWAghk0FE mbjCj4FR6RYSIC1kFhPScoQgPLti X-Google-Smtp-Source: APXvYqyLPdo/n1r4ibZFhvz4oG+GHbdcLwlPKvpE3ZHw3s5fai3P5+EuzC2cM5Rn7QzmE0ZnSmG2MQ== X-Received: by 2002:a6b:6107:: with SMTP id v7mr5079956iob.154.1561115803838; Fri, 21 Jun 2019 04:16:43 -0700 (PDT) Original-Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id x13sm2396910ioj.18.2019.06.21.04.16.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Jun 2019 04:16:43 -0700 (PDT) In-Reply-To: <877e9lcp3s.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 16 Jun 2019 22:22:15 +0300") 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:160937 Archived-At: --=-=-= Content-Type: text/plain > --- a/lisp/char-fold.el > +++ b/lisp/char-fold.el > @@ -28,7 +28,6 @@ > (defun char-fold-make-table () > (let* ((equiv (make-char-table 'char-fold-table)) > (equiv-multi (make-char-table 'char-fold-table)) > - (search-spaces-regexp nil) ; workaround for bug#35802 Ah, I guess this part explains why search-spaces-regexp turned up nil in the debugger backtrace. So I think adjusting isearch-search-fun-default should be enough to fix this. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Don-t-bind-search-spaces-regexp-around-possible-auto.patch Content-Description: patch >From 4f643ac01ff133e4ad088606c7faf03d2c6287b6 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Fri, 21 Jun 2019 07:09:44 -0400 Subject: [PATCH] Don't bind search-spaces-regexp around possible autoload (Bug#35802) * lisp/isearch.el (isearch-search-fun-default): Move possible autoload trigger outside let-binding of search-spaces-regexp. * lisp/char-fold.el (char-fold-make-table): Remove no longer needed workaround. --- lisp/char-fold.el | 1 - lisp/isearch.el | 38 ++++++++++++++++++++++---------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/lisp/char-fold.el b/lisp/char-fold.el index 7a79873873..7b0e55bb11 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el @@ -28,7 +28,6 @@ (eval-and-compile (defun char-fold-make-table () (let* ((equiv (make-char-table 'char-fold-table)) (equiv-multi (make-char-table 'char-fold-table)) - (search-spaces-regexp nil) ; workaround for bug#35802 (table (unicode-property-table-internal 'decomposition))) (set-char-table-extra-slot equiv 0 equiv-multi) diff --git a/lisp/isearch.el b/lisp/isearch.el index bb29c2914b..bfd2e776ec 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -3263,25 +3263,31 @@ (defun isearch--lax-regexp-function-p () (defun isearch-search-fun-default () "Return default functions to use for the search." (lambda (string &optional bound noerror count) - ;; Use lax versions to not fail at the end of the word while - ;; the user adds and removes characters in the search string - ;; (or when using nonincremental word isearch) - (let ((search-spaces-regexp (when (cond - (isearch-regexp isearch-regexp-lax-whitespace) - (t isearch-lax-whitespace)) + (let (;; Evaluate this before binding `search-spaces-regexp' which + ;; can break all sorts of regexp searches. In particular, + ;; calling `isearch-regexp-function' can trigger autoloading + ;; (Bug#35802). + (regexp + (cond (isearch-regexp-function + (let ((lax (and (not bound) + (isearch--lax-regexp-function-p)))) + (when lax + (setq isearch-adjusted t)) + (if (functionp isearch-regexp-function) + (funcall isearch-regexp-function string lax) + (word-search-regexp string lax)))) + (isearch-regexp string) + (t (regexp-quote string)))) + ;; Use lax versions to not fail at the end of the word while + ;; the user adds and removes characters in the search string + ;; (or when using nonincremental word isearch) + (search-spaces-regexp (when (if isearch-regexp + isearch-regexp-lax-whitespace + isearch-lax-whitespace) search-whitespace-regexp))) (funcall (if isearch-forward #'re-search-forward #'re-search-backward) - (cond (isearch-regexp-function - (let ((lax (and (not bound) (isearch--lax-regexp-function-p)))) - (when lax - (setq isearch-adjusted t)) - (if (functionp isearch-regexp-function) - (funcall isearch-regexp-function string lax) - (word-search-regexp string lax)))) - (isearch-regexp string) - (t (regexp-quote string))) - bound noerror count)))) + regexp bound noerror count)))) (defun isearch-search-string (string bound noerror) "Search for the first occurrence of STRING or its translation. -- 2.11.0 --=-=-=--