From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Aaron S. Hawley" Newsgroups: gmane.emacs.devel Subject: diff-mode documentation Date: Wed, 8 Mar 2006 12:07:43 -0500 (EST) Organization: University of Vermont Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-2067372736-1910305367-1141837502=:88630" X-Trace: sea.gmane.org 1141855030 17292 80.91.229.2 (8 Mar 2006 21:57:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Mar 2006 21:57:10 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 08 22:57:08 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FH6dc-0004NP-90 for ged-emacs-devel@m.gmane.org; Wed, 08 Mar 2006 22:56:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FH6da-0006Jb-Ko for ged-emacs-devel@m.gmane.org; Wed, 08 Mar 2006 16:56:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FH28d-00057h-HW for emacs-devel@gnu.org; Wed, 08 Mar 2006 12:07:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FH28Z-0004uv-R8 for emacs-devel@gnu.org; Wed, 08 Mar 2006 12:07:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FH28Z-0004ur-Ga for emacs-devel@gnu.org; Wed, 08 Mar 2006 12:07:47 -0500 Original-Received: from [132.198.101.203] (helo=eagle.uvm.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FH2BR-0001Zw-Ps for emacs-devel@gnu.org; Wed, 08 Mar 2006 12:10:46 -0500 Original-Received: from gnu.uvm.edu (gnu.uvm.edu [132.198.101.64]) by eagle.uvm.edu (8.13.5/8.13.5) with ESMTP id k28H7i5q027395 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 8 Mar 2006 12:07:44 -0500 X-X-Sender: ashawley@gnu.uvm.edu Original-To: emacs-devel@gnu.org Content-ID: X-Mailman-Approved-At: Wed, 08 Mar 2006 16:55:39 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51387 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---2067372736-1910305367-1141837502=:88630 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: The commands and features of Diff mode aren't entirely documumented in the Emacs manual. The following is a patch to files.texi that would add some. There may exist a more appropriate location in the manual (or Emacs) for this all to go. Stefan Monnier, the author of Diff mode, has provided helpful feedback to me on this patch. However, any mistakes are my own. I've tried adopting the style for command tables found elsewhere in the manual. The patch also adds discussion of Diff mode's brilliant feature to interactively correct the patch after any manual edits by the user. Hope this helps, /a ---- Differences between versions of files are often distributed as patches, which are the output from the @command{diff} program. You can use the same Diff mode to operate on a patch by typing @kbd{M-x diff-mode}. Any manual edits you make to a patch with Diff mode will automatically correct the hunk header including insert, delete and file line numbers. Also, the following commands help to navigate, manipulate and apply patches in Diff mode: @table @kbd @item M-n @findex diff-hunk-next Move to the next hunk in the patch. @item M-p @findex diff-hunk-prev Move to the previous hunk in the patch. @item M-@} @findex diff-file-next Move to the next file hunk in a multiple file patch. @item M-@{ @findex diff-file-prev Move to the previous file hunk in a multiple file patch. @item M-k @findex diff-hunk-kill Kill the current hunk at point. @item M-K @findex diff-file-kill In a patch with multiple files, kill the current patch to a file. @item C-c C-s @findex diff-split-hunk Split the hunk at point. This is useful when manually editing a patch and only works with the unified diff format. @item C-c C-r @findex diff-refine-hunk Recomputes the current hunk by ignoring changes in whitespace. @item M-R @findex diff-reverse-direction Convert the patch to a patch that reverts. @xref{Reversed Patches, Applying Reversed Patches, Patch, diff, Comparing and Merging Files}. @item M-U @findex diff-context->unified Convert the patch to the unified diff format. @xref{Unified Format, Unified Format, Diff, diff, Comparing and Merging Files}. @item M-C @findex diff-unified->context Convert the patch back to context diff format. @xref{Context Format, Context Format, Diff, diff, Comparing and Merging Files}. @item M-r @findex diff-restrict-view @findex widen Restrict the view to the current hunk. @xref{Narrowing}. With a prefix argument of @kbd{C-u} restrict the view to the current patch of a multiple file patch. The view can be widened again with @kbd{M-W}. @item C-c C-a @findex diff-apply-hunk Apply hunk to target file. With a prefix argument of @kbd{C-u}, apply the reverse of the hunk. @item M-A @findex diff-ediff-patch Start an Ediff session with the patch. @xref{Top, Ediff, Ediff, ediff, The Ediff Manual}. @item C-x 4 a Add a new entry to the change log for the current file. @xref{Change Log}. This is useful for log entries for functions that are deleted by the patch. @end table ---2067372736-1910305367-1141837502=:88630 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="files.texi-diffmode.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Patch to files.texi Content-Disposition: ATTACHMENT; FILENAME="files.texi-diffmode.diff" LS0tIGZpbGVzLnRleGkJMDYgTWFyIDIwMDYgMjI6NTY6NDQgLTA1MDAJMS4x MzMNCisrKyBmaWxlcy50ZXhpCTA3IE1hciAyMDA2IDE4OjI3OjQxIC0wNTAw CQ0KQEAgLTI5OTksNyArMjk5OSw4NyBAQA0KIEBjaW5kZXggcGF0Y2hlcw0K ICAgRGlmZmVyZW5jZXMgYm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Lg0KK0B4cmVme1RvcCwgRWRpZmYs IEVkaWZmLCBlZGlmZiwgVGhlIEVkaWZmIE1hbnVhbH0uDQorDQorQGl0ZW0g Qy14IDQgYQ0KK0FkZCBhIG5ldyBlbnRyeSB0byB0aGUgY2hhbmdlIGxvZyBm b3IgdGhlIGN1cnJlbnQgZmlsZS4gIEB4cmVme0NoYW5nZQ0KK0xvZ30uICBU aGlzIGlzIHVzZWZ1bCBmb3IgbG9nIGVudHJpZXMgZm9yIGZ1bmN0aW9ucyB0 aGF0IGFyZSBkZWxldGVkDQorYnkgdGhlIHBhdGNoLg0KKw0KK0BlbmQgdGFi bGUNCiANCiBAZmluZGV4IGNvbXBhcmUtd2luZG93cw0KICAgVGhlIGNvbW1h bmQgQGtiZHtNLXggY29tcGFyZS13aW5kb3dzfSBjb21wYXJlcyB0aGUgdGV4 dCBpbiB0aGUNCg== ---2067372736-1910305367-1141837502=:88630 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel ---2067372736-1910305367-1141837502=:88630--