bug#81395: 32.0.50; diff-apply-hunk should be case-sensitive
Ihor Radchenko <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <87se5191fl.fsf@localhost> |
Stefan Monnier <[email protected]> writes: >>> Indeed the matching is case-insensitive. I remember making this >>> decision consciously. π >>> I'm OK if you make it case-sensitive, tho. >> >> See the attached patch. > > LGTM, feel free to push it. Applied, onto master. https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=e0d2d80a628 > I think we should push this to the UI instead. E.g. in the case you > showed the question should be "already applied, undo instead?" but > something like "Patch applicable but could also be undone elsewhere. > Really apply?" So the users can say `n` and then `C-u C-c C-a` if > they'd rather undo the change. +1 > I can imagine similarly changing the IU in case where the patch can be > applied at several different places, where we'd ask the user where to > apply it. FYI, the common pattern that triggers this bug is repetitive code that is changed. For example, when refactoring function calls after function rename. So, having a good heuristics about the best place to apply the chunk would still be valuable. However, as a minimum, if a chunk can be both applied and reverted, users should be able to choose between two variants. Although, repetitive question like that would be annoying if there are many duplicate changes. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>