From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jon Eskin Newsgroups: gmane.emacs.devel Subject: Re: [Patch] Add project.el command to replace symbol at point throughout project Date: Mon, 17 Jan 2022 01:36:39 -0500 Message-ID: <90A4DFFA-1D8B-44BF-9308-2704DA7CA4DE@gmail.com> 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> Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2910"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org, Juri Linkov To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 17 07:53:29 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 1n9LtR-0000Zv-4l for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Jan 2022 07:53:29 +0100 Original-Received: from localhost ([::1]:59128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9LtP-0002hr-Fc for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Jan 2022 01:53:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9LdE-0000iK-6a for emacs-devel@gnu.org; Mon, 17 Jan 2022 01:36:44 -0500 Original-Received: from [2607:f8b0:4864:20::72d] (port=34500 helo=mail-qk1-x72d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9LdC-0002WC-Ol; Mon, 17 Jan 2022 01:36:43 -0500 Original-Received: by mail-qk1-x72d.google.com with SMTP id u3so8580041qku.1; Sun, 16 Jan 2022 22:36:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=9NVuYpdE3xAGvYZglo30vdID6mdf4uBDjM/O54b5J8M=; b=e2AhxHPxQ3syaiW+KPuEg+cMWgFBJ74yONodbn5qI6h7qAjsV43vemks5W8fc6iY1N NbeFOUZ+N2JPhR4WsSkYklMX7FUGVebhTs7MBaXAgImeTinkN0MSn/9M6xdabhP/AefP lMjXzW1XsgY0aUDtVA3LdIlAQw3wMLVFqTlRa7mIe6nL7GIOLk0pkgy0Q5z90kwfi1bV Ro695oARHBrUts6AxAulz0/EYQoqlFmVLRNKGBNZutexqiABYo2EZPrhjcqUZ77UZdwX /9k2KHXSF2FowyqWvBwtyr+Cc+N9V/s4332gJueTA0rjvRAt7hGmHykgelFlJSYxoyJv 0VNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=9NVuYpdE3xAGvYZglo30vdID6mdf4uBDjM/O54b5J8M=; b=Rp+puGSTWMCmEbOseYefRL5bsKNyQYTxBLsvAfPZH47Y9e/F8Gx6F7SysfN6HEWQTB SJG1u6J9gshhKt3iGewSeCVR+9/ZNhNSddGHqYEP7idD3ERt2DZyBLUyHdguFYJfO+c9 mG0KYhJf4LoovMR9Y2c+oHT51QguGBxzZzZoeRwZP3Xs/NOtrDtY59ATrFUvOpq/McPS 8rvX0OuWxJcr7Mv3f/cwM335cMogIKB5y8Ee/hIlzm2KXMYPZX74YnwJDlwO0XNzu3Z+ Rf8YiLwZMfc2AxrhEr6m8uY6QXmmx+IJpFMSco3VxQF13HvzSdqEYzQzBvOVtbyIkcTE JXTw== X-Gm-Message-State: AOAM530GgSCbeD7FtdPVtno1fnhq0Tm6LfOTSP3nUk/bTWbnqVSsJ8h+ L1SPjin0vpWRMp5jyKwiQnE= X-Google-Smtp-Source: ABdhPJwiu6kARFhrXWHOjpqKLRUMANTTFrU28m2E/lrk8fc+1KxbsyI14+k208R6FTsXSdffVXZ+zw== X-Received: by 2002:a37:9c8:: with SMTP id 191mr13388973qkj.358.1642401400953; Sun, 16 Jan 2022 22:36:40 -0800 (PST) Original-Received: from smtpclient.apple (pool-108-31-85-19.washdc.fios.verizon.net. [108.31.85.19]) by smtp.gmail.com with ESMTPSA id 6sm6284220qkh.82.2022.01.16.22.36.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Jan 2022 22:36:40 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3693.40.0.1.81) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::72d (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=eskinjp@gmail.com; helo=mail-qk1-x72d.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=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:284862 Archived-At: No problem! Thank you for helping walk me through this along the way, I = really appreciate it and learned a lot. > On Jan 16, 2022, at 8:41 PM, Dmitry Gutov wrote: >=20 > Jon, >=20 > Thanks for taking a stab at this, by the way. >=20 > To clarify why your patch was not enough: >=20 > On 15.01.2022 11:55, Jon Eskin wrote: >> When I first let-bound `read-regexp-defaults-function` around the = call to `query-replace-read-args`, it didn't work- it looks like = `read-regexp` needs to be passed a symbol for its `DEFAULTS` parameter = or it ignores `read-regexp-default-function`. I passed in the symbol at = point to `DEFAULTS` which works- if I understand correctly the value of = any I pass in doesn't end up making a difference as long as it's a = symbol. I wasn't sure what the reason was for that behavior, but I = didn't want to mess with stuff I didn't understand. >=20 > This change (having query-replace-read-from use symbol-at-point) = affects all its callers, whereas the idea was to delegate the default = detection logic to a piece of code determined by the caller. >=20 > That's why the next step was to determine why binding = 'read-regexp-defaults-function' didn't have the desired effect, rather = than calling 'symbol-at-point' directly.