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, 21 Jan 2022 05:06:06 +0200 Message-ID: <829a1d78-c07e-4bb8-e3bd-07263271fc30@yandex.ru> References: <83zgo2770l.fsf@gnu.org> <83zgo15dhp.fsf@gnu.org> <83czkw3uvl.fsf@gnu.org> <170a1c89-7767-0930-f726-f7b2551876b2@yandex.ru> <44f72f97-d1d8-0b4c-73a0-7f077fb1ef26@yandex.ru> <0617E8BF-CC43-4D82-8648-064252F644FD@gmail.com> <86pmos3no7.fsf@mail.linkov.net> <86czkr36ll.fsf@mail.linkov.net> <921c0b69-7bac-b78a-54d8-987165331661@yandex.ru> <0b8d87f8-e6db-9902-bd89-d81864d626d6@yandex.ru> <861r16235x.fsf@mail.linkov.net> 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="28920"; 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: Jon Eskin , Eli Zaretskii , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 21 04:12:23 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 1nAkLe-0007M6-JW for ged-emacs-devel@m.gmane-mx.org; Fri, 21 Jan 2022 04:12:22 +0100 Original-Received: from localhost ([::1]:50498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAkLd-0000Nd-Ix for ged-emacs-devel@m.gmane-mx.org; Thu, 20 Jan 2022 22:12:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAkFh-0001Jo-OO for emacs-devel@gnu.org; Thu, 20 Jan 2022 22:06:13 -0500 Original-Received: from [2a00:1450:4864:20::333] (port=42642 helo=mail-wm1-x333.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nAkFe-0003yq-Tz; Thu, 20 Jan 2022 22:06:13 -0500 Original-Received: by mail-wm1-x333.google.com with SMTP id f202-20020a1c1fd3000000b0034dd403f4fbso15614306wmf.1; Thu, 20 Jan 2022 19:06:09 -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=e0NsuguZjyBm5bNmGNnFRhVPNK3MaomptluZhw6SiEE=; b=gtDPmb1Zoj+NjarGptyZjIqZ5GLEX17b1i7r6lrDNxUngAFDeBsXMpkrVihpbwPYrt 3noz76obpq5dVfINi8l4PVM0to0wPUgVeIf4Ot3Hm29A7Jg7zC0qsCroSa+dkw70g9Jm MoaByA3d5XUgZkVwYdoEp2O3Vp1j8aVYqJSaW4XV+kiiul1b++IIdcWDWxQpkZ5v5fAf +GvFxWCZ843O4w8YJEz4/HsimYVZ6ZUbFnRGcGf8HbNQfluySbSdiauvH1OPZSEWXybc wFp+c+PLHgsaNgrjy/Sw3g3ZPsWSPTTanC9H4iF7cHE6Y+XP3nf0Caw6qmQIhrm98u0K LbHg== 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=e0NsuguZjyBm5bNmGNnFRhVPNK3MaomptluZhw6SiEE=; b=aCz3YhMeTLG5KIlQjBcHYWIf1YR+Zmfiq3Vb5QMX1xRjC+Hu6/Ce9hIZ8qM/0+KFFN q0wt3rwO9LqdjamUDuLzwGFJOb+SZLAD/UlVANg5sUiAoyP+DebTPjwzDzl4vuSB7+wS 3anG3wRCdPizsAy68kKKt1tUmxAIiYme1GPOJLWf7HKUWu0ArUgPrTZnns0OnX11CyBf 7SvhKlHvSOzBI7ySfpG8CZagoy+95dUmanGE9La8EVQKyAtjo7MMew/xbUkwFSTGLX3T Ye0kC+v+xopSsfHQn5TNEuNJ9D4OjcZprOCmP2TN/MKD7B9jk4GsycyxUJcvCxCWvHRI BaZA== X-Gm-Message-State: AOAM530K2mvZuJIGw9CTZoBvQ2U0oQZkjMhME5WjdSF22AWNn0A+pFp7 ftcC0uFggwoGM/SsneQdTlQZIZLbqoY= X-Google-Smtp-Source: ABdhPJz4IKsgJKIMQ7Ik6I7BG1N/OEc518+pFEbzxxr9+S/TiZII8bxIIDRzgFfyveoL/gLMiS0yHg== X-Received: by 2002:adf:cc8c:: with SMTP id p12mr1714419wrj.677.1642734368638; Thu, 20 Jan 2022 19:06:08 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id bd20sm4735494wmb.38.2022.01.20.19.06.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Jan 2022 19:06:08 -0800 (PST) In-Reply-To: <861r16235x.fsf@mail.linkov.net> Content-Language: en-US X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::333 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=raaahh@gmail.com; helo=mail-wm1-x333.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.248, NICE_REPLY_A=-0.001, PDS_HP_HELO_NORDNS=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:285082 Archived-At: Hi Juri, On 17.01.2022 10:17, Juri Linkov wrote: >> + (read-string >> + prompt >> + nil nil >> + (if read-regexp-defaults-function >> + (funcall read-regexp-defaults-function) >> + (query-replace-read-from-suggestions)) > Isn't it too strange that read-string uses the read-regexp function? > Maybe better to add a new variable read-string-defaults-function. That sounds fine to me. > Then it could provide an option to use 'car' of > query-replace-read-from-suggestions, and allow a custom function. ...less confident about this one, because read-regexp-defaults-function doesn't do anything like that, right? It might be nice if the options mirrored each other. But if it's too much of a bother right now, I could just add two hand-written prompts with default to xref-find-references-and-replace, without the fancy "arrow". It's not like the replacements history is going to see too much use for this command. In the meantime, I think you should install your latest patch now (without the xref.el part, since it doesn't work yet).