[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to edit/modify patches using emacs?
From: |
Miles Bader |
Subject: |
Re: How to edit/modify patches using emacs? |
Date: |
Sun, 08 May 2005 23:45:34 +0900 |
Pascal Bourguignon <pjb@informatimago.com> writes:
> You can force edit it (see the other answers), but I think the best
> way to "edit" a patch, is to duplicate the source directory, apply the
> patch on one copy, edit this copy of the source files, then invoke
> diff to create a new patch.
Note that editing a patch with emacs `diff-mode' active is actually
fairly painless, because diff-mode takes care of keeping details like
the line counts updated, offers convenient functions like hunk-
splitting, makes it super easy to test your changes, etc. I regularly
edit patches directly because of diff-mode.
[A common reason to edit a patch is because it _won't_ apply otherwise:
you basically look at the patch to see why doesn't match the source,
edit the patch to test your guess, and if it then applies cleanly,
you've got a nice record in the edited patch.]
-Miles
--
"Suppose we've chosen the wrong god. Every time we go to church we're
just making him madder and madder." -- Homer Simpson