Mercurial > emacs
comparison man/misc.texi @ 70368:8bc86cbc5164
(Diff Mode): Moved to files.texi.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 04 May 2006 00:29:30 +0000 |
parents | 17cc79655a4b |
children | e41cc24662e3 |
comparison
equal
deleted
inserted
replaced
70367:8a7ffec25790 | 70368:8bc86cbc5164 |
---|---|
1759 | 1759 |
1760 @vindex sort-fold-case | 1760 @vindex sort-fold-case |
1761 Many of the sort commands ignore case differences when comparing, if | 1761 Many of the sort commands ignore case differences when comparing, if |
1762 @code{sort-fold-case} is non-@code{nil}. | 1762 @code{sort-fold-case} is non-@code{nil}. |
1763 | 1763 |
1764 @node Narrowing, Diff Mode, Sorting, Top | 1764 @node Narrowing, Two-Column, Sorting, Top |
1765 @section Narrowing | 1765 @section Narrowing |
1766 @cindex widening | 1766 @cindex widening |
1767 @cindex restriction | 1767 @cindex restriction |
1768 @cindex narrowing | 1768 @cindex narrowing |
1769 @cindex accessible portion | 1769 @cindex accessible portion |
1825 @code{narrow-to-region} is normally a disabled command. Attempting to use | 1825 @code{narrow-to-region} is normally a disabled command. Attempting to use |
1826 this command asks for confirmation and gives you the option of enabling it; | 1826 this command asks for confirmation and gives you the option of enabling it; |
1827 if you enable the command, confirmation will no longer be required for | 1827 if you enable the command, confirmation will no longer be required for |
1828 it. @xref{Disabling}. | 1828 it. @xref{Disabling}. |
1829 | 1829 |
1830 @node Diff Mode, Two-Column, Narrowing, Top | 1830 @node Two-Column, Editing Binary Files, Narrowing, Top |
1831 @section Diff Mode | |
1832 @cindex Diff mode | |
1833 | |
1834 Diff mode is useful for editing patches and comparisons produced by | |
1835 the @command{diff} program. You can select Diff mode by typing | |
1836 @kbd{M-x diff-mode}; Emacs commands that compare files automatically | |
1837 select Diff mode. @xref{Top,, Diff, diff, Comparing and Merging Files}, | |
1838 for more information about @command{diff} output formats. | |
1839 | |
1840 One general feature of Diff mode is that manual edits to the patch | |
1841 automatically correct line numbers, including those in the hunk | |
1842 header, so that you can actually apply the edited patch. Diff mode | |
1843 also provides the following commands to navigate, manipulate and apply | |
1844 parts of patches: | |
1845 | |
1846 @table @kbd | |
1847 @item M-n | |
1848 Move to the next hunk-start (@code{diff-hunk-next}). | |
1849 | |
1850 @item M-p | |
1851 Move to the previous hunk-start (@code{diff-hunk-prev}). | |
1852 | |
1853 @item M-@} | |
1854 Move to the next file-start, in a multi-file patch | |
1855 (@code{diff-file-next}). | |
1856 | |
1857 @item M-@{ | |
1858 Move to the previous file-start, in a multi-file patch | |
1859 (@code{diff-file-prev}). | |
1860 | |
1861 @item M-k | |
1862 Kill the hunk at point (@code{diff-hunk-kill}). | |
1863 | |
1864 @item M-K | |
1865 In a multi-file patch, kill the current file part. | |
1866 (@code{diff-file-kill}). | |
1867 | |
1868 @item C-c C-a | |
1869 Apply this hunk to its target file (@code{diff-apply-hunk}). With a | |
1870 prefix argument of @kbd{C-u}, revert this hunk. | |
1871 | |
1872 @item C-c C-c | |
1873 Go to the source corresponding to this hunk (@code{diff-goto-source}). | |
1874 | |
1875 @item C-c C-e | |
1876 Start an Ediff session with the patch (@code{diff-ediff-patch}). | |
1877 @xref{Top, Ediff, Ediff, ediff, The Ediff Manual}. | |
1878 | |
1879 @item C-c C-n | |
1880 Restrict the view to the current hunk (@code{diff-restrict-view}). | |
1881 @xref{Narrowing}. With a prefix argument of @kbd{C-u}, restrict the | |
1882 view to the current patch of a multiple file patch. To widen again, | |
1883 use @kbd{C-x n w}. | |
1884 | |
1885 @item C-c C-r | |
1886 Reverse the direction of comparison for the entire buffer | |
1887 (@code{diff-reverse-direction}). | |
1888 | |
1889 @item C-c C-s | |
1890 Split the hunk at point (@code{diff-split-hunk}). This is for | |
1891 manually editing patches, and only works with the unified diff format. | |
1892 | |
1893 @item C-c C-u | |
1894 Convert the entire buffer to unified format | |
1895 (@code{diff-context->unified}). With a prefix argument, convert | |
1896 unified format to context format. In Transient Mark mode, when the | |
1897 mark is active, this command operates only on the region. | |
1898 | |
1899 @item C-c C-w | |
1900 Refine the current hunk so that it disregards changes in whitespace | |
1901 (@code{diff-refine-hunk}). | |
1902 @end table | |
1903 | |
1904 @kbd{C-x 4 a} in Diff mode operates on behalf of the target file, | |
1905 but gets the function name from the patch itself. @xref{Change Log}. | |
1906 This is useful for making log entries for functions that are deleted | |
1907 by the patch. | |
1908 | |
1909 @node Two-Column, Editing Binary Files, Diff Mode, Top | |
1910 @section Two-Column Editing | 1831 @section Two-Column Editing |
1911 @cindex two-column editing | 1832 @cindex two-column editing |
1912 @cindex splitting columns | 1833 @cindex splitting columns |
1913 @cindex columns, splitting | 1834 @cindex columns, splitting |
1914 | 1835 |