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 04:43:00 +0300 Message-ID: <0f06a505-a441-133f-00a1-50dd55d18b33@gutov.dev> References: <86sf7mgd54.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="22758"; 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 To: Juri Linkov , 65854@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 24 03:44:07 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 1qkEAI-0005hj-WF for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Sep 2023 03:44:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkEA4-0001D2-Ts; Sat, 23 Sep 2023 21:43:52 -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 1qkEA3-0001Co-JE for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2023 21:43: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 1qkEA3-0001oO-A6 for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2023 21:43:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkEAE-0004i6-Jy for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2023 21:44: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 01:44: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.169551980318048 (code B ref 65854); Sun, 24 Sep 2023 01:44:02 +0000 Original-Received: (at 65854) by debbugs.gnu.org; 24 Sep 2023 01:43:23 +0000 Original-Received: from localhost ([127.0.0.1]:40781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkE9a-0004h1-Oj for submit@debbugs.gnu.org; Sat, 23 Sep 2023 21:43:23 -0400 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:40705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkE9Y-0004gn-SM for 65854@debbugs.gnu.org; Sat, 23 Sep 2023 21:43:21 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 9E3643200786; Sat, 23 Sep 2023 21:43:03 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 23 Sep 2023 21:43:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=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= 1695519783; x=1695606183; bh=lOAMqT8thDyjY3puQXjVx/8mjQTnlFzEiOQ CSn6dARQ=; b=Kp6Ed2GCs8QqlfEzBoitqXBx5jJWZkrdtmTeO60hwBvxfm90b8w QqpRirN404XKWWzOM0kh7lJShGVzK3lwxv/CbrkQ9nAqogAhHzxkOlkMMV0jrvp9 3Pe2eFrJUwBsi18r7vlDf32Derr031MId3taeECaKngLy97gFU0g9qx8FPQcpgXr fXkQnZwP5A2E8O7IeeNX46c9sI1pgYm3HmVUC+kPqIt6lR3Ur/7TRd4Ewwkui/Jc c51o+0foYOGIT1O2NGvro9HSHryKVnG7RPVFnN6aVCG0m88dFiQFJ6D4GQYQqDsF id9rJGPLXJRDgm5I2HA2MJOVVVKuu5UxI/Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1695519783; x= 1695606183; bh=lOAMqT8thDyjY3puQXjVx/8mjQTnlFzEiOQCSn6dARQ=; b=l Br5blJjaQtz9IOUlyuw2xIdVKXmsz5d3Q2ZEnBspNBxhTu17oaMZG/R2ovZtmiVY FuyILffqa3bVcHt0sK/dvNnIpZEUS3GKmk/SOdtH58eIq1RryuPvuLgY8nTcBxWe sOjXmsM54FmD5KSXY8XWtQykbX8QAEl9P8sGQpU/4Cr40OkBT5orJ4dztUzQtOZP w2EYP4q2dRw/zJU8bFCFfZDwyb7Q+vySogSJFnHoXlO/vX58XBo2TONtIekRb2qo WuF35Bytsswd3SQAot8Xf8fyPAviRDVsrzIUcC6SzfuiJjBbkyICHkA//KTw4mc7 h29TRLfmXmyYGmEAF1oWw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeluddghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeghedthedujeeiteeutddtjeekheejteeukeehffdutdejuedvfeevueeviedu udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 23 Sep 2023 21:43:02 -0400 (EDT) Content-Language: en-US In-Reply-To: <86sf7mgd54.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:271205 Archived-At: Hi! On 10/09/2023 20:18, 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.