From: Miles Bader <miles@gnu.org>
Subject: Re: How to edit/modify patches using emacs?
Date: Sun, 08 May 2005 23:45:34 +0900 [thread overview]
Message-ID: <87ekchn5dd.fsf@tc-1-100.kawasaki.gol.ne.jp> (raw)
In-Reply-To: <87u0ldx29s.fsf@thalassa.informatimago.com> (Pascal Bourguignon's message of "Sun, 08 May 2005 15:42:23 +0200")
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
next prev parent reply other threads:[~2005-05-08 14:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-08 11:23 How to edit/modify patches using emacs? Andreas R.
2005-05-08 11:43 ` Peter Dyballa
2005-05-08 12:09 ` Miles Bader
2005-05-08 12:19 ` Reiner Steib
2005-05-08 13:42 ` Pascal Bourguignon
2005-05-08 14:45 ` Miles Bader [this message]
2005-05-08 21:54 ` Micha Feigin
[not found] ` <mailman.4139.1115590433.2819.help-gnu-emacs@gnu.org>
2005-05-08 23:38 ` Miles Bader
2005-05-09 19:52 ` Andreas R.
2005-05-09 20:48 ` Stefan Monnier
2005-05-09 22:38 ` Miles Bader
[not found] ` <mailman.4311.1115678467.2819.help-gnu-emacs@gnu.org>
2005-05-09 22:53 ` Stefan Monnier
2005-05-09 23:41 ` Miles Bader
2005-05-10 19:39 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ekchn5dd.fsf@tc-1-100.kawasaki.gol.ne.jp \
--to=miles@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).