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: xref-query-replace-in-results error message after xref-find-definitions, was: Re: bug#58158: 29.0.50; [overlay] Interval tree iteration considered harmful Date: Tue, 11 Oct 2022 14:36:11 +0300 Message-ID: <237a3e26-03b8-a2a9-90bd-d50c3670a131@yandex.ru> References: <83h70qhez0.fsf@gnu.org> <83edvuhaby.fsf@gnu.org> <831qruh67o.fsf@gnu.org> <83y1u2foli.fsf@gnu.org> <83zgehe6iq.fsf@gnu.org> <95113379-99d8-eba4-f980-a7fca11430d5@yandex.ru> <834jwfmn5a.fsf@gnu.org> <838rlohzeo.fsf@gnu.org> <83mta2g91p.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22165"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cc: emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 11 15:23:48 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 1oiFEa-0005bq-4l for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Oct 2022 15:23:48 +0200 Original-Received: from localhost ([::1]:50774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiFEY-0006yZ-HS for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Oct 2022 09:23:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiDYq-0006Al-6y for emacs-devel@gnu.org; Tue, 11 Oct 2022 07:36:46 -0400 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:55959) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiDYm-0004pi-Ox; Tue, 11 Oct 2022 07:36:35 -0400 Original-Received: by mail-wm1-x32d.google.com with SMTP id t4so8407766wmj.5; Tue, 11 Oct 2022 04:36:14 -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:subject:date:message-id:reply-to; bh=Vi+Ky3QzGgLT+gl0T797yCx+RsCeEbkjUTtOmZ+UcJ4=; b=Nt/ghhk0tjPRq9+/dhPFwLVQU+5WySHg2bI5lIHcVcR4+FbNkbNSKnAvSIrFEpjXQg 20jCEqELXwlvIc7lsHhyCzkCFkdTozM2xOUKh6zhW6Vsj9USbMu4tNqDuaR8CkddHtbX HEiugWCqgtYAnMFTb4Pg3XXFbsRifcd09gbZLY7PhYfdZxj5+7qMwpIcnrBcKk3wgF3I MgcsWVY46vS4qHiIHD/patUH035jaPIa3DjZvSGbigyAv1SKWW2j2uVoChDfi52z/KnP QRsXTx0xLCbGGhmkL7K/I6ceJPHKbIgK3gEQLZU8CGrqfJbnWZKoLkubPXWxF5VE0y08 6EmA== 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:subject:date:message-id :reply-to; bh=Vi+Ky3QzGgLT+gl0T797yCx+RsCeEbkjUTtOmZ+UcJ4=; b=H2leYkobD68VlRyPSs9bxWSjYQ5BP01iaDYqzwza2lC4gNerc40mzNN9rpaLHAxSkM MN2jT8N9hCubHaHbVJfE8BUmwMTgwN+XJbS8v+EWs0hiTsV2G7rHtEXmEUN5ndl4zldr S9dQOUHoC0WxFRKaxFvMmsW2CPc2f6IdClegS0XuAEZQ+a77ZjykFJfowmpqcvuB8hAI ZeoB00ju1ssaIv/D8d49286Gh8IoFWNbjZ3mx4wxD7WngdReFPDnW3IXX7J2IU855Jr0 opm7iHzphaqYr5kgPwrWBSmd4ye3IiZLb2oJIVz3n0wp6FUofng0j+nmWXj7M5gVBoW1 E2JA== X-Gm-Message-State: ACrzQf1UHxwWAZaHOsbtZSgn8/8ZaULOqk9QzvD/qZiCIaIT73VT3Z0k gu3iWN1xEtGRlCewQs+ZqpzPlF4uVjU= X-Google-Smtp-Source: AMsMyM66Dy6eXaYO0P7i+6oXrGeXX72iuQXljrUkPv8p/U8IlkusteMfBGaVKxgg5wHCgHVLowN2CA== X-Received: by 2002:a1c:7315:0:b0:3b4:e1b8:47b2 with SMTP id d21-20020a1c7315000000b003b4e1b847b2mr15945501wmb.165.1665488173416; Tue, 11 Oct 2022 04:36:13 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id z5-20020a056000110500b0022b11a27e39sm10993549wrw.1.2022.10.11.04.36.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Oct 2022 04:36:13 -0700 (PDT) Content-Language: en-US In-Reply-To: <83mta2g91p.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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.25, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:297476 Archived-At: Moving from Debbugs here. On 11.10.2022 09:37, Eli Zaretskii wrote: >> Date: Tue, 11 Oct 2022 05:12:11 +0300 >> Cc: gerd.moellmann@gmail.com, 58158@debbugs.gnu.org, monnier@iro.umontreal.ca >> From: Dmitry Gutov >> >> What is a "subset of matches"? > > Feel free to suggest a less vague description. The idea is that the > list in Xref buffer doesn't show all the references to the identifier, > making renaming infeasible. How about: Cannot perform replacements in this search's results >> Perhaps we should make the error very specific, like "you can't replace >> inside xref-find-definitions results". Since that is going to be the >> exception in like 99.9% of the cases. > > That'd be my preference, but what are those 0.1% of cases where the > Xref buffer produced by other commands could fit? I suppose they will be covered by the above message, while in the manual you can explain it in more simple terms, since you don't need to worry about third-party code as much. > More generally, what exactly does xref.el test to produce the error > message, and how to describe that in user-level terms? It tests whether the method xref-match-length returns non-nil for any search results. When they do, it would identify them as "match xrefs" (mentioned in the Commentary). But I suppose that clashes with the terminology you prefer to use. >> It's possible for other backend commands (such as find-references) to >> return unsuitable xref values in third-party backends, or for other code >> to use xref-show-xrefs with such, but those will be really very rare, if >> happen at all. > > You are saying that 'r' is only useful after M-?, is that right? The > manual says so, but the manual doesn't have to say "the whole truth". > The doc string should. It works after dired-do-find-regexp and project-find-regexp as well.