unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Juri Linkov <juri@linkov.net>
Cc: 65854@debbugs.gnu.org
Subject: bug#65854: Multi-file replacement diff
Date: Wed, 27 Sep 2023 00:39:09 +0300	[thread overview]
Message-ID: <551d5fee-28ab-f642-3ed4-baf0029cdef9@gutov.dev> (raw)
In-Reply-To: <86cyy6yw0s.fsf@mail.linkov.net>

On 25/09/2023 20:58, Juri Linkov wrote:
>> 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.
> Actually my point was that there is already eglot--propose-changes-as-diff.
> And now with addition of multi-file-replace-as-diff you will have two cases
> to generalize that would be simpler to do than with only one case.

Yes, that should help. Even having your patch in the bug tracker to 
refer to already helps (as well as the discussion around it).

I'm just saying that if Eglot has its own existing custom vars, and 
misearch.el has its own, it will take extra effort to unify them (or 
keep extra options inside said packages, I guess, increasing unavoidable 
duplication).





  reply	other threads:[~2023-09-26 21:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-10 17:18 bug#65854: Multi-file replacement diff Juri Linkov
2023-09-10 17:58 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-11  6:33   ` Juri Linkov
2023-09-11  7:23     ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-11  7:38       ` Juri Linkov
2023-09-12  6:49         ` Juri Linkov
2023-09-11 12:35       ` Eli Zaretskii
2023-09-12  6:52         ` Juri Linkov
2023-09-15  6:40           ` Juri Linkov
2023-09-15  7:02             ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-15  7:38             ` Eli Zaretskii
2023-09-22  6:55               ` Juri Linkov
2023-09-22  7:25                 ` Eli Zaretskii
2023-09-22 16:02                   ` Juri Linkov
2023-09-22 16:06                     ` Eli Zaretskii
2023-09-23 17:36                       ` Juri Linkov
2023-09-23 18:56                         ` Eli Zaretskii
2023-09-24  7:37                           ` Juri Linkov
2023-09-24  8:12                             ` Eli Zaretskii
2023-09-25 18:18                               ` Juri Linkov
2023-09-24  1:43 ` Dmitry Gutov
2023-09-24  7:36   ` Juri Linkov
2023-09-24 11:09     ` Dmitry Gutov
2023-09-25 17:58       ` Juri Linkov
2023-09-26 21:39         ` Dmitry Gutov [this message]
2023-09-27 17:21           ` Juri Linkov
2023-09-30 17:42           ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=551d5fee-28ab-f642-3ed4-baf0029cdef9@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=65854@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).