diff options
| -rw-r--r-- | man/files.texi | 125 |
1 files changed, 78 insertions, 47 deletions
diff --git a/man/files.texi b/man/files.texi index fff30e21217..4e944f83afd 100644 --- a/man/files.texi +++ b/man/files.texi | |||
| @@ -207,15 +207,6 @@ While in the minibuffer, you can abort @kbd{C-x C-f} by typing | |||
| 207 | @kbd{C-g}. File-name completion ignores certain filenames; for more | 207 | @kbd{C-g}. File-name completion ignores certain filenames; for more |
| 208 | about this, see @ref{Completion Options}. | 208 | about this, see @ref{Completion Options}. |
| 209 | 209 | ||
| 210 | @cindex file selection dialog | ||
| 211 | When Emacs is built with a suitable GUI toolkit, commands invoked | ||
| 212 | with the mouse or the menu bar use the toolkit's standard File | ||
| 213 | Selection dialog instead of prompting for the file name in the | ||
| 214 | minibuffer. On Unix and GNU/Linux platforms, Emacs does that when | ||
| 215 | built with GTK, LessTif, and Motif toolkits; on MS-Windows, the GUI | ||
| 216 | version does that by default. @xref{Dialog Boxes}, for info | ||
| 217 | on customization of this. | ||
| 218 | |||
| 219 | Your confirmation that @kbd{C-x C-f} has completed successfully is the | 210 | Your confirmation that @kbd{C-x C-f} has completed successfully is the |
| 220 | appearance of new text on the screen and a new buffer name in the mode | 211 | appearance of new text on the screen and a new buffer name in the mode |
| 221 | line. If the specified file does not exist and could not be created, or | 212 | line. If the specified file does not exist and could not be created, or |
| @@ -228,11 +219,33 @@ However, before doing so, it checks that the file itself has not changed | |||
| 228 | since you visited or saved it last. If the file has changed, a warning | 219 | since you visited or saved it last. If the file has changed, a warning |
| 229 | message is shown. @xref{Interlocking,,Simultaneous Editing}. | 220 | message is shown. @xref{Interlocking,,Simultaneous Editing}. |
| 230 | 221 | ||
| 222 | @vindex large-file-warning-threshold | ||
| 231 | @cindex maximum buffer size exceeded, error message | 223 | @cindex maximum buffer size exceeded, error message |
| 232 | Since Emacs reads the visited file in its entirety, files whose size | 224 | If you try to visit a file larger than |
| 233 | is larger than the maximum Emacs buffer size (@pxref{Buffers}) cannot be | 225 | @code{large-file-warning-threshold} (the default is 10000000, which is |
| 234 | visited; if you try, Emacs will display an error message saying that the | 226 | about 10 megabytes), Emacs will ask you for confirmation first. You |
| 235 | maximum buffer size has been exceeded. | 227 | can answer @kbd{y} to proceed with visiting the file. Note, however, |
| 228 | that Emacs cannot visit files that are larger than the maximum Emacs | ||
| 229 | buffer size, which is around 256 megabytes on 32-bit machines | ||
| 230 | (@pxref{Buffers}). If you try, Emacs will display an error message | ||
| 231 | saying that the maximum buffer size has been exceeded. | ||
| 232 | |||
| 233 | @cindex file selection dialog | ||
| 234 | On graphical terminals, there are two additional methods for | ||
| 235 | visiting files. Firstly, when Emacs is built with a suitable GUI | ||
| 236 | toolkit, commands invoked with the mouse (by clicking on the menu bar | ||
| 237 | or tool bar) use the toolkit's standard File Selection dialog instead | ||
| 238 | of prompting for the file name in the minibuffer. On Unix and | ||
| 239 | GNU/Linux platforms, Emacs does that when built with GTK, LessTif, and | ||
| 240 | Motif toolkits; on MS-Windows, the GUI version does that by default. | ||
| 241 | For information on how to customize this, see @xref{Dialog Boxes}. | ||
| 242 | |||
| 243 | Secondly, Emacs supports the ``drag and drop'' protocol on the X | ||
| 244 | window system. Dropping a file into an ordinary Emacs window visits | ||
| 245 | the file using that window. However, dropping a file into a window | ||
| 246 | displaying a Dired buffer moves or copies the file into the displayed | ||
| 247 | directory. For details, see @xref{Drag and Drop} and @xref{Misc Dired | ||
| 248 | Features}. | ||
| 236 | 249 | ||
| 237 | @cindex creating files | 250 | @cindex creating files |
| 238 | What if you want to create a new file? Just visit it. Emacs displays | 251 | What if you want to create a new file? Just visit it. Emacs displays |
| @@ -905,15 +918,27 @@ discard your changes.) | |||
| 905 | @cindex mode, Auto-Revert | 918 | @cindex mode, Auto-Revert |
| 906 | @findex global-auto-revert-mode | 919 | @findex global-auto-revert-mode |
| 907 | @findex auto-revert-mode | 920 | @findex auto-revert-mode |
| 921 | @findex auto-revert-tail-mode | ||
| 922 | |||
| 923 | You may find it useful to have Emacs revert files automatically when | ||
| 924 | they change. Three minor modes are available to do this. | ||
| 925 | |||
| 926 | @kbd{M-x global-auto-revert-mode} runs Global Auto-Revert mode, | ||
| 927 | which periodically checks all file buffers and reverts when the | ||
| 928 | corresponding file has changed. @kbd{M-x auto-revert-mode} runs a | ||
| 929 | local version, Auto-Revert mode, which applies only to the buffer in | ||
| 930 | which it was activated. Auto-Revert mode can be used to ``tail'' a | ||
| 931 | file, such as a system log, so that changes made to that file by other | ||
| 932 | programs are continuously displayed. To do this, just move the point | ||
| 933 | to the end of the buffer, and it will stay there as the file contents | ||
| 934 | change. However, if you are sure that the file will only change by | ||
| 935 | growing at the end, you can tail the file more efficiently using | ||
| 936 | Auto-Revert Tail mode, @kbd{M-x auto-revert-tail-mode}. | ||
| 937 | |||
| 908 | @vindex auto-revert-interval | 938 | @vindex auto-revert-interval |
| 909 | You may find it useful to have Emacs revert files automatically when | 939 | The variable @code{auto-revert-interval} controls how often to check |
| 910 | they change. Two minor modes are available to do this. In Global | 940 | for a changed file. Since checking a remote file is too slow, these |
| 911 | Auto-Revert mode, Emacs periodically checks all file buffers and | 941 | modes do not check or revert remote files. |
| 912 | reverts any when the corresponding file has changed. The local | ||
| 913 | variant, Auto-Revert mode, applies only to buffers in which it was | ||
| 914 | activated. The variable @code{auto-revert-interval} controls how | ||
| 915 | often to check for a changed file. Since checking a remote file is | ||
| 916 | too slow, these modes do not check or revert remote files. | ||
| 917 | 942 | ||
| 918 | @node Auto Save | 943 | @node Auto Save |
| 919 | @section Auto-Saving: Protection Against Disasters | 944 | @section Auto-Saving: Protection Against Disasters |
| @@ -1225,7 +1250,7 @@ and deletes. It can be used via http or via its own protocol. | |||
| 1225 | 1250 | ||
| 1226 | @cindex MCVS | 1251 | @cindex MCVS |
| 1227 | @cindex Meta-CVS | 1252 | @cindex Meta-CVS |
| 1228 | Meta-CVS is another attempt to solve problems, arising in CVS. It | 1253 | Meta-CVS is another attempt to solve problems arising in CVS. It |
| 1229 | supports directory structure versioning, improved branching and | 1254 | supports directory structure versioning, improved branching and |
| 1230 | merging, and use of symbolic links and meta-data in repositories. | 1255 | merging, and use of symbolic links and meta-data in repositories. |
| 1231 | 1256 | ||
| @@ -2839,14 +2864,12 @@ running the @code{diff} program, using options taken from the variable | |||
| 2839 | @code{diff-switches}. The value of @code{diff-switches} should be a | 2864 | @code{diff-switches}. The value of @code{diff-switches} should be a |
| 2840 | string; the default is @code{"-c"} to specify a context diff. | 2865 | string; the default is @code{"-c"} to specify a context diff. |
| 2841 | 2866 | ||
| 2842 | The buffer @samp{*diff*} has Compilation mode as its major mode, so | 2867 | @findex diff-goto-source |
| 2843 | you can use @kbd{C-x `} to visit successive changed locations in the two | 2868 | After running @kbd{M-x diff}, you can use @kbd{C-x `} to visit |
| 2844 | source files. You can also move to a particular hunk of changes and | 2869 | successive changed locations in the two source files, as in |
| 2845 | type @key{RET} or @kbd{C-c C-c}, or click @kbd{Mouse-2} on it, to move | 2870 | Compilation mode (@pxref{Compilation}.) In the @samp{*diff*} buffer, |
| 2846 | to the corresponding source location. You can also use the other | 2871 | you can move to a particular hunk of changes and type @kbd{C-c C-c} |
| 2847 | special commands of Compilation mode: @key{SPC} and @key{DEL} for | 2872 | (@code{diff-goto-source}) to visit the corresponding source location. |
| 2848 | scrolling, and @kbd{M-p} and @kbd{M-n} for cursor motion. | ||
| 2849 | @xref{Compilation}. | ||
| 2850 | 2873 | ||
| 2851 | @findex diff-backup | 2874 | @findex diff-backup |
| 2852 | The command @kbd{M-x diff-backup} compares a specified file with its most | 2875 | The command @kbd{M-x diff-backup} compares a specified file with its most |
| @@ -2864,9 +2887,13 @@ the command is finished. For more information about windows in Emacs, | |||
| 2864 | @ref{Windows}. | 2887 | @ref{Windows}. |
| 2865 | 2888 | ||
| 2866 | @vindex compare-ignore-case | 2889 | @vindex compare-ignore-case |
| 2890 | @vindex compare-ignore-whitespace | ||
| 2867 | With a numeric argument, @code{compare-windows} ignores changes in | 2891 | With a numeric argument, @code{compare-windows} ignores changes in |
| 2868 | whitespace. If the variable @code{compare-ignore-case} is | 2892 | whitespace. If the variable @code{compare-ignore-case} is |
| 2869 | non-@code{nil}, it ignores differences in case as well. | 2893 | non-@code{nil}, the comparison ignores differences in case as well. |
| 2894 | If the variable @code{compare-ignore-whitespace} is non-nil, | ||
| 2895 | @code{compare-windows} normally ignores changes in whitespace, and a | ||
| 2896 | prefix argument turns that off. | ||
| 2870 | 2897 | ||
| 2871 | @findex diff-mode | 2898 | @findex diff-mode |
| 2872 | @cindex diffs | 2899 | @cindex diffs |
| @@ -2943,36 +2970,40 @@ done; this is because renaming causes the old meaning of the name @var{new} | |||
| 2943 | to be lost. If @var{old} and @var{new} are on different file systems, the | 2970 | to be lost. If @var{old} and @var{new} are on different file systems, the |
| 2944 | file @var{old} is copied and deleted. | 2971 | file @var{old} is copied and deleted. |
| 2945 | 2972 | ||
| 2973 | If the argument @var{new} is just a directory name, the real new | ||
| 2974 | name is in that directory, with the same non-directory component as | ||
| 2975 | @var{old}. For example, @kbd{M-x rename-file RET ~/foo RET /tmp RET} | ||
| 2976 | renames @file{~/foo} to @file{/tmp/foo}. The same rule applies to all | ||
| 2977 | the remaining commands in this section. All of them ask for | ||
| 2978 | confirmation when the new file name already exists, too. | ||
| 2979 | |||
| 2946 | @findex add-name-to-file | 2980 | @findex add-name-to-file |
| 2947 | @cindex hard links (creation) | 2981 | @cindex hard links (creation) |
| 2948 | The similar command @kbd{M-x add-name-to-file} is used to add an | 2982 | The similar command @kbd{M-x add-name-to-file} is used to add an |
| 2949 | additional name to an existing file without removing its old name. | 2983 | additional name to an existing file without removing its old name. |
| 2950 | The new name is created as a ``hard link'' to the existing file. | 2984 | The new name is created as a ``hard link'' to the existing file. |
| 2951 | The new name must belong on the same file system that the file is on. | 2985 | The new name must belong on the same file system that the file is on. |
| 2952 | On Windows, this command works only if the file resides in an NTFS | 2986 | On MS-Windows, this command works only if the file resides in an NTFS |
| 2953 | file system. On MS-DOS, it works by copying the file. | 2987 | file system. On MS-DOS, it works by copying the file. |
| 2954 | 2988 | ||
| 2955 | @findex copy-file | 2989 | @findex copy-file |
| 2956 | @cindex copying files | 2990 | @cindex copying files |
| 2957 | @kbd{M-x copy-file} reads the file @var{old} and writes a new file named | 2991 | @kbd{M-x copy-file} reads the file @var{old} and writes a new file |
| 2958 | @var{new} with the same contents. Confirmation is required if a file named | 2992 | named @var{new} with the same contents. |
| 2959 | @var{new} already exists, because copying has the consequence of overwriting | ||
| 2960 | the old contents of the file @var{new}. | ||
| 2961 | 2993 | ||
| 2962 | @findex make-symbolic-link | 2994 | @findex make-symbolic-link |
| 2963 | @cindex symbolic links (creation) | 2995 | @cindex symbolic links (creation) |
| 2964 | @kbd{M-x make-symbolic-link} reads two file names @var{target} and | 2996 | @kbd{M-x make-symbolic-link} reads two file names @var{target} and |
| 2965 | @var{linkname}, then creates a symbolic link named @var{linkname}, which | 2997 | @var{linkname}, then creates a symbolic link named @var{linkname}, |
| 2966 | points at @var{target}. The effect is that future attempts to open file | 2998 | which points at @var{target}. The effect is that future attempts to |
| 2967 | @var{linkname} will refer to whatever file is named @var{target} at the | 2999 | open file @var{linkname} will refer to whatever file is named |
| 2968 | time the opening is done, or will get an error if the name @var{target} is | 3000 | @var{target} at the time the opening is done, or will get an error if |
| 2969 | not in use at that time. This command does not expand the argument | 3001 | the name @var{target} is nonexistent at that time. This command does |
| 2970 | @var{target}, so that it allows you to specify a relative name | 3002 | not expand the argument @var{target}, so that it allows you to specify |
| 2971 | as the target of the link. | 3003 | a relative name as the target of the link. |
| 2972 | 3004 | ||
| 2973 | Confirmation is required when creating the link if @var{linkname} is | 3005 | Not all systems support symbolic links; on systems that don't |
| 2974 | in use. Note that not all systems support symbolic links; on systems | 3006 | support them, this command is not defined. |
| 2975 | that don't support them, this command is not defined. | ||
| 2976 | 3007 | ||
| 2977 | @node Compressed Files | 3008 | @node Compressed Files |
| 2978 | @section Accessing Compressed Files | 3009 | @section Accessing Compressed Files |