help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : diff-mode: kill various hunks at once, something like k


From: Uwe Brauer
Subject: Re: [External] : diff-mode: kill various hunks at once, something like kill-region?
Date: Thu, 20 Oct 2022 18:32:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>> "DA" == Drew Adams <drew.adams@oracle.com> writes:

>> Does somebody know about a package that would allow to kill serval hunk
>> in one go or even having something like kill-region in a diff buffer?

> If what you mean is kill/delete several stretches
> of text at once, where you provide the limits of
> each such stretch, then you can do that with an
> iteration.  "At once" here would refer to the
> overall effect, but maybe you have something else
> in mind?
> ___

Workflow and motivation:

I use HG (but for git the workflow is very similar)

    1. I call vc-dir

    2. I select the files I want to commit

    3. I use vc-diff

    4. In the diff file I manipulate hunks

    5. I either use

       1. commit-patch, a perl script that allows to submit
          the edit diff file as patch.

       2. Or the solution implemented by Dmitry which currently dwells
          in Emacs master


Now sometimes if the diff file is huge, I might only want to commit 2
out of say 20 hunks.

So instead of killing 18 hunks, I'd like to mark the hunks I would like
to delete and somehow delete them in one go (kill-region-hunk is not
implemented)

So what you propose, would serve this purpose?

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]