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: [Patch] Add project.el command to replace symbol at point throughout project Date: Fri, 14 Jan 2022 04:43:40 +0200 Message-ID: <170a1c89-7767-0930-f726-f7b2551876b2@yandex.ru> References: <83zgo2770l.fsf@gnu.org> <83zgo15dhp.fsf@gnu.org> <83czkw3uvl.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="21213"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii , Jon Eskin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 14 03:46:36 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 1n8Cbs-0005PZ-5c for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jan 2022 03:46:36 +0100 Original-Received: from localhost ([::1]:39464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8Cbq-0001j6-QG for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Jan 2022 21:46:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8Cab-0000w5-5k for emacs-devel@gnu.org; Thu, 13 Jan 2022 21:45:17 -0500 Original-Received: from [2a00:1450:4864:20::42b] (port=35624 helo=mail-wr1-x42b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8CaZ-0007Qg-KQ; Thu, 13 Jan 2022 21:45:16 -0500 Original-Received: by mail-wr1-x42b.google.com with SMTP id e9so13392068wra.2; Thu, 13 Jan 2022 18:45:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=MgLtaqY8U6rWwEIKkcQdyv9+4v8zAxugcOU4ROonONU=; b=XE4KjDM7YJ82oujXY7mMtl1PjFYr6aG7THzdFvFoIJ1ZZ87nqJw5D86vdDUUT+9/r7 XLs344m1Ce1eEHqHu2ykB3OHWlKuhUXL9xh+YfnPGLqd3HgpDn9JHD49XE7Bz9W7FRdn lJmU2YTOu/eomLsRZcx6H8qmvMfljedwiSQplmhSkj3rq2SzB/qMg0St/Uyt3crAml6f kazsueCBTrej6FFL3tL4t7VHfSif5S+zao8oGUUWf+BJ+W9E8tC0wHTcmqJVbl7Pe9OZ yO6qt5WgEIduLOpa4RxsVIGsKCIntqz3k43/x9v3mOF54bVG3U1Kcyw9uNneijDuOlt5 rTrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=MgLtaqY8U6rWwEIKkcQdyv9+4v8zAxugcOU4ROonONU=; b=OjFhu2b3auTX2Ih8F9LjN5GgfwW+1OloNzjPpTxq02Yiu5GkPOwRhecAXFwYsoWV0n /XttzMmaAzDhX1sEmJQ20N5rrOfs2mKMs387OOKMHS16HyI/q8J1ymVqZkvlpo/PkY5u r+0foC5dCiGJsEPclhwyZIYSEfIPFp65iJZD7X58V0OseyoXiG3kRYWoBlJ4owZvD75P UvsC0loCYeT/SXjS6EpGrEuTNCbFhZ2GvZ7HLTl52kLS3nTEJS6mVl17PW4UOYazYLge d7totNfOiPoFk7/FCCDsRVhdEQuxGXfvcV9Q3ffXU9/hejTrRF9oWJkC2ZtH1nNSdSyH eVWQ== X-Gm-Message-State: AOAM530Kcd12Xt3DT3fs3YJXhcBdv9RqB/hadKt8f6Gpzm/gukvPo8cH nrIxjDSB64KMQwbpOnyWfKkui5NvwGg= X-Google-Smtp-Source: ABdhPJySaiyufT/861TG9A0qaB8j/wXPKuU7B87gd+CnUFo8mGfrIGVoP1UXxmstCptMA6Rce2a/pA== X-Received: by 2002:a05:6000:168c:: with SMTP id y12mr6695094wrd.389.1642128314099; Thu, 13 Jan 2022 18:45:14 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id r13sm3927050wrn.101.2022.01.13.18.45.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Jan 2022 18:45:13 -0800 (PST) In-Reply-To: <83czkw3uvl.fsf@gnu.org> Content-Language: en-US X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42b (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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:284729 Archived-At: On 13.01.2022 10:25, Eli Zaretskii wrote: >> Anyway, if you're sure adding xref-find-references-and-replace will >> help, I've got no problem with that. > > I think it will be a good addition to what we already have in that > department. And given that we document it in the user manual, it > should become known to users soon enough. I've added that command now. Though since it also uses query-replace-read-args, it suffers from the same (possibly) drawback as project-search and project-query-replace-regexp: not using the symbol at point by default. So Jon, if you fancy writing a patch in this area, you can try implementing what Juri suggested: let-bind read-regexp-defaults-function around the call of query-replace-read-args, and use a symbol at point as the default. That can apply to both project-query-replace-regexp and xref-find-references-and-replace.