From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Looking at function Date: Wed, 17 Aug 2022 03:23:42 +0300 Message-ID: <875a0e53-6bb6-563b-f21c-492a04781a37@yandex.ru> References: <86edz8k6q1.fsf@mail.linkov.net> <86y1wzv4uv.fsf@mail.linkov.net> <3c642f4d-471b-d6d2-8519-b4707e1193ba@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31315"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: Juri Linkov , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 17 02:24:43 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 1oO6rT-000830-1Q for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Aug 2022 02:24:43 +0200 Original-Received: from localhost ([::1]:44400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oO6rR-0001YW-Am for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Aug 2022 20:24:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oO6qh-0000tM-Pl for emacs-devel@gnu.org; Tue, 16 Aug 2022 20:23:55 -0400 Original-Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:41577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oO6qf-0001Rm-W5 for emacs-devel@gnu.org; Tue, 16 Aug 2022 20:23:55 -0400 Original-Received: by mail-wr1-x429.google.com with SMTP id h24so366153wrb.8 for ; Tue, 16 Aug 2022 17:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc; bh=edjXte3zgqdHqSdF1GZEQlBDnpAqjtethlHcz+pz1Jg=; b=bj1iyxRJtANcDtEmUy1RKvR1FdmfRJVaftCoJlA7V6R3J3jKfqlOGHunLLo5I5nN2z iG/viqqHl3bMikPOa9YM1oUZ7KEiNj4gqf1DG7k0VyfUD1zaf+lU+/uqRcqzqpeitDPT nBfW51A9aZe5J55vYDwqHrRHn82Tqmh79xReYzoXoUArVgM9adDstmaxLGZE+9pqmJUC 6A299H8SRgKqW9zcikYZzaTycfMHFmuU4essWXPdcfB+kFmerDAc7LTShyi0SEMDoNKs eTvZ9wg7wgzOoIiPBFOqkX0Enzf1yLagZEr9Zk0ypzf6zwc3CFJA/MeY+lui8CyMVc+K Yznw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc; bh=edjXte3zgqdHqSdF1GZEQlBDnpAqjtethlHcz+pz1Jg=; b=v1jW9mogel5MpC52niHHTMJ03zuoSG7ltUVVk1WYPieugQDXfuWhZZCqamtyWjcGuW jg6LNI1IqJQz9H5trh3ZcwXtS6CsKTtIS1NiGNUL4Ab/2lfQcX3BVxADU9WMtlOhMj1W JGHREeKGmwXN5Q6yP+ck+ZnIsZAhM1gt+Hruj4LX4qsyFLKrjGro8c1UC7j5Bz4J23pW YWs2JTsQQmWw8lF/sSOkf/PCeN7tWfVi/+Po7Tn6YuDrYOirHaEQdNP0RsvgNIpCvleD w2uJy6r3LKRtpJ8ls9fKfzk7arocRE8VsgmxFRrm/WRCH/Yr7zrwBGfutiqZpwET52vC 0XxA== X-Gm-Message-State: ACgBeo1WLxKk+RZKYaUMNSYowoao1JvhGSXhUjxvgh08SCrI2ggnlgDh KPsdpNi0fHiXKwIvJFb/OcH6BnDYdEw= X-Google-Smtp-Source: AA6agR762rC8n4UvgS9MtYN/FBw/DvJKweiV1Fzh5HpDUz0fGrE5cU0ds69K/b0bvF/pZ32eBInzMw== X-Received: by 2002:a05:6000:18a2:b0:221:7d99:5d22 with SMTP id b2-20020a05600018a200b002217d995d22mr12452015wri.248.1660695824247; Tue, 16 Aug 2022 17:23:44 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id i20-20020a1c5414000000b003a327f19bf9sm368787wmb.14.2022.08.16.17.23.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Aug 2022 17:23:44 -0700 (PDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=raaahh@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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:293521 Archived-At: On 12.07.2022 03:29, Stefan Monnier wrote: > Dmitry Gutov [2022-07-12 03:19:42] wrote: >> On 11.07.2022 22:14, Juri Linkov wrote: >>>>> 1. Replace ‘looking-at’ with a call to the search function, >>>>> but keep it at point by prepending ‘\\=’ to the regexp. >>>>> Can it break a complex regexp? >>>> I suppose it can. Even a simple one (that has \\| inside without >>>> a grouping). >>> This is what the fix for xref successfully uses in bug#53758 >>> with changes in perform-replace from bug#14013. (However, >>> none of these variants is suitable for replacing another call >>> of looking-at in isearch-search-and-update.) >> Right. Because xref basically uses literal matching, no alternations. >> But it will break more complex cases. > I can't see why "\\=\\(?:...\\)" would break anything, personally. Right. But I suppose this approach could be problematic when isearch-regexp-function or isearch-search-fun-function have non-default and some distinctly weird values/specialized behaviors.