[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: diff-mode documentation
From: |
Aaron S. Hawley |
Subject: |
Re: diff-mode documentation |
Date: |
Tue, 14 Mar 2006 09:50:37 -0500 (EST) |
On Thu, 9 Mar 2006, Richard Stallman wrote:
> @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}.
>
> I would rather these be C-c commands. They are not the sort of commands
> one would repeat over and over in a short period, so there's no harm
> in using C-c, and that would make it possible for the M- commands
> to be case-independent.
>
> @item M-A
> @findex diff-ediff-patch
> Start an Ediff session with the patch.
> @xref{Top, Ediff, Ediff, ediff, The Ediff Manual}.
>
> Same story there.
>
> @item M-K
> @findex diff-file-kill
> In a patch with multiple files, kill the current patch to a file.
>
> This would have to be moved.
I haven't heard anything from Stefan on this, but to get the "ball
rolling" I suppose we're talking about a patch like the one below. I'm
not familiar with the keybinding standards of Emacs, but its some ideas I
had to fulfill the C-c requirement and maintain some semblance of command
mnemonics the M- commands had. I also imagined the old bindings needed to
be preserved and didn't delete them.
--- diff-mode.el 19 Feb 2006 14:01:04 -0500 1.84
+++ diff-mode.el 10 Mar 2006 12:33:38 -0500
@@ -142,8 +142,13 @@
`(("\e" . ,diff-mode-shared-map)
;; From compilation-minor-mode.
("\C-c\C-c" . diff-goto-source)
+ ("\C-ca" . diff-ediff-patch)
+ ("\C-cr" . diff-reverse-direction)
+ ("\C-cu" . diff-context->unified)
+ ("\C-cc" . diff-unified->context)
+ ("\C-c\C-k" . diff-file-kill)
;; Misc operations.
("\C-c\C-r" . diff-refine-hunk)
("\C-c\C-s" . diff-split-hunk)
("\C-c\C-a" . diff-apply-hunk)
("\C-c\C-t" . diff-test-hunk)