aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorRichard M. Stallman2005-03-21 18:14:33 +0000
committerRichard M. Stallman2005-03-21 18:14:33 +0000
commit3aff69e30fdfd7c26ac4e13630de12f243d13f5d (patch)
tree00190d74c7bc6c6ae93f8a4ec48b274a6dac4a19 /man
parent67bca9b20fd5287dcc4a7d08ca07d3a092d9e21a (diff)
downloademacs-3aff69e30fdfd7c26ac4e13630de12f243d13f5d.tar.gz
emacs-3aff69e30fdfd7c26ac4e13630de12f243d13f5d.zip
(Visiting): Document large-file-warning-threshold.
Move paragraph on file-selection dialog. Mention visiting files using X drag and drop. (Reverting): Mention using Auto-Revert mode to tail files. Document auto-revert-tail-mode. (Version Systems): Minor correction. (Comparing Files): Diff-mode is no longer based on Compilation mode. Document compare-ignore-whitespace. (Misc File Ops): Explain passing a directory to rename-file. Likewise for copy-file and make-symbolic-link.
Diffstat (limited to 'man')
-rw-r--r--man/files.texi125
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
208about this, see @ref{Completion Options}. 208about this, see @ref{Completion Options}.
209 209
210@cindex file selection dialog
211 When Emacs is built with a suitable GUI toolkit, commands invoked
212with the mouse or the menu bar use the toolkit's standard File
213Selection dialog instead of prompting for the file name in the
214minibuffer. On Unix and GNU/Linux platforms, Emacs does that when
215built with GTK, LessTif, and Motif toolkits; on MS-Windows, the GUI
216version does that by default. @xref{Dialog Boxes}, for info
217on 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
220appearance of new text on the screen and a new buffer name in the mode 211appearance of new text on the screen and a new buffer name in the mode
221line. If the specified file does not exist and could not be created, or 212line. 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
228since you visited or saved it last. If the file has changed, a warning 219since you visited or saved it last. If the file has changed, a warning
229message is shown. @xref{Interlocking,,Simultaneous Editing}. 220message 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
233is larger than the maximum Emacs buffer size (@pxref{Buffers}) cannot be 225@code{large-file-warning-threshold} (the default is 10000000, which is
234visited; if you try, Emacs will display an error message saying that the 226about 10 megabytes), Emacs will ask you for confirmation first. You
235maximum buffer size has been exceeded. 227can answer @kbd{y} to proceed with visiting the file. Note, however,
228that Emacs cannot visit files that are larger than the maximum Emacs
229buffer size, which is around 256 megabytes on 32-bit machines
230(@pxref{Buffers}). If you try, Emacs will display an error message
231saying that the maximum buffer size has been exceeded.
232
233@cindex file selection dialog
234 On graphical terminals, there are two additional methods for
235visiting files. Firstly, when Emacs is built with a suitable GUI
236toolkit, commands invoked with the mouse (by clicking on the menu bar
237or tool bar) use the toolkit's standard File Selection dialog instead
238of prompting for the file name in the minibuffer. On Unix and
239GNU/Linux platforms, Emacs does that when built with GTK, LessTif, and
240Motif toolkits; on MS-Windows, the GUI version does that by default.
241For information on how to customize this, see @xref{Dialog Boxes}.
242
243 Secondly, Emacs supports the ``drag and drop'' protocol on the X
244window system. Dropping a file into an ordinary Emacs window visits
245the file using that window. However, dropping a file into a window
246displaying a Dired buffer moves or copies the file into the displayed
247directory. For details, see @xref{Drag and Drop} and @xref{Misc Dired
248Features}.
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
924they change. Three minor modes are available to do this.
925
926 @kbd{M-x global-auto-revert-mode} runs Global Auto-Revert mode,
927which periodically checks all file buffers and reverts when the
928corresponding file has changed. @kbd{M-x auto-revert-mode} runs a
929local version, Auto-Revert mode, which applies only to the buffer in
930which it was activated. Auto-Revert mode can be used to ``tail'' a
931file, such as a system log, so that changes made to that file by other
932programs are continuously displayed. To do this, just move the point
933to the end of the buffer, and it will stay there as the file contents
934change. However, if you are sure that the file will only change by
935growing at the end, you can tail the file more efficiently using
936Auto-Revert Tail mode, @kbd{M-x auto-revert-tail-mode}.
937
908@vindex auto-revert-interval 938@vindex auto-revert-interval
909You may find it useful to have Emacs revert files automatically when 939 The variable @code{auto-revert-interval} controls how often to check
910they change. Two minor modes are available to do this. In Global 940for a changed file. Since checking a remote file is too slow, these
911Auto-Revert mode, Emacs periodically checks all file buffers and 941modes do not check or revert remote files.
912reverts any when the corresponding file has changed. The local
913variant, Auto-Revert mode, applies only to buffers in which it was
914activated. The variable @code{auto-revert-interval} controls how
915often to check for a changed file. Since checking a remote file is
916too 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
1229supports directory structure versioning, improved branching and 1254supports directory structure versioning, improved branching and
1230merging, and use of symbolic links and meta-data in repositories. 1255merging, 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
2840string; the default is @code{"-c"} to specify a context diff. 2865string; 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
2843you 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
2844source files. You can also move to a particular hunk of changes and 2869successive changed locations in the two source files, as in
2845type @key{RET} or @kbd{C-c C-c}, or click @kbd{Mouse-2} on it, to move 2870Compilation mode (@pxref{Compilation}.) In the @samp{*diff*} buffer,
2846to the corresponding source location. You can also use the other 2871you can move to a particular hunk of changes and type @kbd{C-c C-c}
2847special commands of Compilation mode: @key{SPC} and @key{DEL} for 2872(@code{diff-goto-source}) to visit the corresponding source location.
2848scrolling, 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
2868whitespace. If the variable @code{compare-ignore-case} is 2892whitespace. If the variable @code{compare-ignore-case} is
2869non-@code{nil}, it ignores differences in case as well. 2893non-@code{nil}, the comparison ignores differences in case as well.
2894If the variable @code{compare-ignore-whitespace} is non-nil,
2895@code{compare-windows} normally ignores changes in whitespace, and a
2896prefix 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}
2943to be lost. If @var{old} and @var{new} are on different file systems, the 2970to be lost. If @var{old} and @var{new} are on different file systems, the
2944file @var{old} is copied and deleted. 2971file @var{old} is copied and deleted.
2945 2972
2973 If the argument @var{new} is just a directory name, the real new
2974name 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}
2976renames @file{~/foo} to @file{/tmp/foo}. The same rule applies to all
2977the remaining commands in this section. All of them ask for
2978confirmation 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
2949additional name to an existing file without removing its old name. 2983additional name to an existing file without removing its old name.
2950The new name is created as a ``hard link'' to the existing file. 2984The new name is created as a ``hard link'' to the existing file.
2951The new name must belong on the same file system that the file is on. 2985The new name must belong on the same file system that the file is on.
2952On Windows, this command works only if the file resides in an NTFS 2986On MS-Windows, this command works only if the file resides in an NTFS
2953file system. On MS-DOS, it works by copying the file. 2987file 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 2992named @var{new} with the same contents.
2959@var{new} already exists, because copying has the consequence of overwriting
2960the 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},
2966points at @var{target}. The effect is that future attempts to open file 2998which 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 2999open file @var{linkname} will refer to whatever file is named
2968time 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
2969not in use at that time. This command does not expand the argument 3001the name @var{target} is nonexistent at that time. This command does
2970@var{target}, so that it allows you to specify a relative name 3002not expand the argument @var{target}, so that it allows you to specify
2971as the target of the link. 3003a 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
2974in use. Note that not all systems support symbolic links; on systems 3006support them, this command is not defined.
2975that 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