[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is there a diff-unite-hunks or similar?
From: |
James Thomas |
Subject: |
Re: is there a diff-unite-hunks or similar? |
Date: |
Thu, 26 Jun 2025 18:41:20 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Uwe Brauer writes:
> Hi all
>
> I use vc-diff (or diff-hl, with diff-hl-diff-goto-hunk quite a bit
> I can use diff-split-hunk to split
>
> #+begin_src
> diff --git a/new.org b/new.org
> --- a/new.org
> +++ b/new.org
> @@ -1,1 +1,9 @@
> +* Introduction
> First line
> +
> +* Result
> +Scecond line
> +
> +* Conclusion
> +
> +Third line
>
> #+end_src
>
>
> into
>
> #+begin_src
> diff --git a/new.org b/new.org
> --- a/new.org
> +++ b/new.org
> @@ -1,1 +1,6 @@
> +* Introduction
> First line
> +
> +* Result
> +Scecond line
> +
> @@ -2,0 +7,3 @@
> +* Conclusion
> +
> +Third line
>
> #+end_src
>
> But the inverse functionality to unify two subsequent hunks.
>
> Anybody knows about such a function, or is it planned?
(I hate to be the bearer of good news, but...)
You can easily do that by 'C-x C-q', putting point on the second @@, and
'C-S-DEL'.
--