From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Micha Feigin Newsgroups: gmane.emacs.help Subject: Re: How to edit/modify patches using emacs? Date: Mon, 9 May 2005 00:54:11 +0300 Message-ID: <20050509005411.3071661a@litshi.luna.local> References: <427df645$0$26177$9b622d9e@news.freenet.de> <87u0ldx29s.fsf@thalassa.informatimago.com> <87ekchn5dd.fsf@tc-1-100.kawasaki.gol.ne.jp> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1115590229 32114 80.91.229.2 (8 May 2005 22:10:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 8 May 2005 22:10:29 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 09 00:10:21 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DUtyQ-0003aR-CB for geh-help-gnu-emacs@m.gmane.org; Mon, 09 May 2005 00:10:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DUu6d-0003nK-4q for geh-help-gnu-emacs@m.gmane.org; Sun, 08 May 2005 18:18:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DUtxd-0007mU-DG for help-gnu-emacs@gnu.org; Sun, 08 May 2005 18:09:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DUtxX-0007kC-5c for help-gnu-emacs@gnu.org; Sun, 08 May 2005 18:09:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DUtxU-0007To-QP for help-gnu-emacs@gnu.org; Sun, 08 May 2005 18:09:08 -0400 Original-Received: from [132.66.7.200] (helo=tau.ac.il) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DUtxo-0006fP-8U for help-gnu-emacs@gnu.org; Sun, 08 May 2005 18:09:28 -0400 Original-Received: (PineApp-Mail 32315 invoked by uid 0); 9 May 2005 00:58:04 +0300 Original-Received: from michf@post.tau.ac.il by mx2 with PineApp-Mail-SeCure-2.50.050413; 09/05/2005 00:58:03 X-PineApp-Mail-Mail-From: michf@post.tau.ac.il X-PineApp-Mail-Rcpt-To: help-gnu-emacs@gnu.org X-PineApp-Mail: 2.50.050413 (No viruses found. Processed in 1.229708 secs) Original-Received: from unknown (HELO litshi.luna.local) (michf@85.65.185.8) by mx2 with SMTP; 9 May 2005 00:58:02 +0300 Original-To: Help-gnu-emacs@gnu.org In-Reply-To: <87ekchn5dd.fsf@tc-1-100.kawasaki.gol.ne.jp> X-Mailer: Sylpheed-Claws 1.9.6cvs1 (GTK+ 2.6.4; i386-pc-linux-gnu) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:26438 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26438 On Sun, 08 May 2005 23:45:34 +0900 Miles Bader wrote: > Pascal Bourguignon 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.] In such cases I just prefer to apply the patch and fix the rejects, gives you a better overall view. Editing patches for is useful when I know what I want to fix for sending out a patch and I don't feel like applying it, changing the source and re-diffing (especially useful with large source, such as modifying patches for the X or kernel source trees) > > -Miles > -- > "Suppose we've chosen the wrong god. Every time we go to church we're > just making him madder and madder." -- Homer Simpson > > > _______________________________________________ > Help-gnu-emacs mailing list > Help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > > +++++++++++++++++++++++++++++++++++++++++++ > This Mail Was Scanned By Mail-seCure System > at the Tel-Aviv University CC. > +++++++++++++++++++++++++++++++++++++++++++ This Mail Was Scanned By Mail-seCure System at the Tel-Aviv University CC.