|
From: | Dmitry Gutov |
Subject: | Re: feature proposal diff-mode: kill various hunks or mark then and invert the mark |
Date: | Mon, 29 Aug 2022 04:15:18 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 |
On 16.08.2022 17:41, Uwe Brauer wrote:
Hi When using diff mode, I sometimes have say 10 hunks but only want to select one[1] and ignore the other. In the current implementation I have to kill all 9 I don't want, and that is a bit cumbersome. If I could select them all, un-select one and then kill the marked one, that would be great.
Note that the difficulty depends on how complex you want the behavior to be. If it's always to keep one or several adjacent hunks - it's one thing. To be able to mark multiple disjoint hunks, however, that would require a different marking UI.
Footnotes: [1] the reason is that I use commit-patch-buffer.el, that allows me to commit via the external commit-patch command only certains hunks of a diff buffer (hg commit -i is not supported by magit or vc-hg.el)
JFYI, Juri just pushed an implementation of this for the Git VC backend to master (a commit-patch replacement).
Hopefully someone will add Hg support as well, but the implementation seems less trivial, given that it doesn't have staging area.
[Prev in Thread] | Current Thread | [Next in Thread] |