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.bugs Subject: bug#65854: Multi-file replacement diff Date: Sun, 24 Sep 2023 14:09:11 +0300 Message-ID: References: <86sf7mgd54.fsf@mail.linkov.net> <0f06a505-a441-133f-00a1-50dd55d18b33@gutov.dev> <86zg1cvx8l.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="8314"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: 65854@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 24 13:10:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qkN0E-0001w0-5n for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Sep 2023 13:10:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkMzn-0007Qe-UF; Sun, 24 Sep 2023 07:09:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkMzn-0007QW-37 for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 07:09:51 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qkMzm-0007fC-RG for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 07:09:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkMzy-0003ch-IA for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 07:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Sep 2023 11:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65854 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65854-submit@debbugs.gnu.org id=B65854.169555377713889 (code B ref 65854); Sun, 24 Sep 2023 11:10:02 +0000 Original-Received: (at 65854) by debbugs.gnu.org; 24 Sep 2023 11:09:37 +0000 Original-Received: from localhost ([127.0.0.1]:41168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkMzY-0003bw-Lh for submit@debbugs.gnu.org; Sun, 24 Sep 2023 07:09:37 -0400 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:35943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkMzV-0003bV-TX for 65854@debbugs.gnu.org; Sun, 24 Sep 2023 07:09:35 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id BE33B3200981; Sun, 24 Sep 2023 07:09:15 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 24 Sep 2023 07:09:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1695553754; x=1695640154; bh=4jsmR+VFuCH+3xNK9jbt/CqBpWQlP0AWMk/ bO1gmsdA=; b=3D0RBnl+i7IT2yShp9Z0gwIbgQJWxfxzDF1FajWz9v42YFFQnOt y1KkGiIX/XsImKW9O3sqMWbaraEbLLcOqNjtHqSh4WNrn2QDgDSDJePbwbv4XEhy OcAtl9npTrGu/VhHqCDAETbrqwMHz2OPjDxld+xuugOy4ZDalXJYgn5rlvq8VAZZ lx9lUPt+DJ1piTZwAghXnbSHkbXAv3QONtFGyxus6idwvOgMf8QVb8XQtu0hJtSi AItjqO7ltXVKlrCsQTVxRs1D8g59FIOvYSogcoMEEvyiRcwDz41oPX4zL3FU7qHT /znH5+xjasulyzDo31XSt4evfj8vyW7TFIg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1695553754; x=1695640154; bh=4jsmR+VFuCH+3xNK9jbt/CqBpWQlP0AWMk/ bO1gmsdA=; b=XdQNpm9LK7wAwAv2fFw3eB/IijzNxgokmN6PtIkhPiu03RQ0ayi z4z1kR5KSV/gVCPttTFKkIItTrjx7TNnu/sLJZ1yeUfJsCpo/teuoNiKz67Z4+jO ImQuFwjrxhNkx2rS0RsQTMz2aKThOAk0IPySpoxOUbZL5EzjrdMXi+myt8B8+b0g VFxnecypf6WrhLBMLrJOb03EcOP3kZn4lpXw5oWNB5zQw5GkyfZMJ8POcsBLFptV SYu/+ohIenOr1ivpom1VWFhK7ld8l4vkTIUzfQTaOwN58zG4BBito9kfE6Aecfx1 OIRXQm7VDFPYXAeFGp8P1EDauOYaG0DNmgQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudelvddgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 24 Sep 2023 07:09:13 -0400 (EDT) Content-Language: en-US In-Reply-To: <86zg1cvx8l.fsf@mail.linkov.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271233 Archived-At: On 24/09/2023 10:36, Juri Linkov wrote: >>> As discussed on emacs-devel, here is the patch that implements >>> a standalone command that reads a list of files and replacement strings, >>> then shows a diff to review before applying replacements. >>> Also provided the Dired integration to show the replacement diff >>> on marked files. Later the same function could be used >>> to show replacement diffs from the xref buffer and maybe >>> from other packages as well. >> Here's a counter-proposal: we were talking about a "refactoring" packages >> on emacs-devel, maybe a week ago. And I suggested a function that would >> take a list of changes (as some data) and present them using some >> customizable logic: the current Eglot's solution uses a diff, and I'll add >> an implementation that shows a tree-like buffer with checkmarks, probably. >> >> I'll be starting on this any day now ;-( >> >> So... provided this won't take too long, I would suggest your code here >> just focuses on creating a list of changes (those shouldn't require buffers >> to visit files), and then you'd be able to pass them on to >> 'refact-show-changes' (name under construction), which would then use the >> interface that the user prefers. >> >> This was we'll also consolidate the diff-generating code for features of >> this sort. > I'm not sure this complication is necessary. The proposed patch > does its job already. So more generalizations could be added later. If you are sure. I just wouldn't want to keep unnecessary defcustoms around.