]> code.delx.au - gnu-emacs/blobdiff - doc/emacs/files.texi
Implement CLASH_DETECTION for MS-Windows.
[gnu-emacs] / doc / emacs / files.texi
index e12bb385653010411ce716a199813d21a62c017c..1f78747eaa6fbcdcccb98f6d8b9cf2ec7aec23fd 100644 (file)
@@ -1,6 +1,6 @@
 @c This is part of the Emacs manual.
-@c Copyright (C) 1985-1987, 1993-1995, 1997, 1999-2012
-@c   Free Software Foundation, Inc.
+@c Copyright (C) 1985-1987, 1993-1995, 1997, 1999-2013 Free Software
+@c Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Files
 @chapter File Handling
@@ -72,7 +72,7 @@ directory into the minibuffer as the initial contents.  You can
 inhibit this insertion by changing the variable
 @code{insert-default-directory} to @code{nil} (@pxref{Minibuffer
 File}).  Regardless, Emacs always assumes that any relative file name
-is relative to the default directory, e.g. entering a file name
+is relative to the default directory, e.g., entering a file name
 without a directory specifies a file in the default directory.
 
 @findex cd
@@ -734,10 +734,10 @@ file.
 @cindex locking files
   When you make the first modification in an Emacs buffer that is
 visiting a file, Emacs records that the file is @dfn{locked} by you.
-(It does this by creating a specially-named symbolic link in the same
-directory.)  Emacs removes the lock when you save the changes.  The
-idea is that the file is locked whenever an Emacs buffer visiting it
-has unsaved changes.
+(It does this by creating a specially-named symbolic link or regular
+file with special contents in the same directory.)  Emacs removes the
+lock when you save the changes.  The idea is that the file is locked
+whenever an Emacs buffer visiting it has unsaved changes.
 
 @vindex create-lockfiles
   You can prevent the creation of lock files by setting the variable
@@ -773,15 +773,15 @@ spurious, just use @kbd{p} to tell Emacs to go ahead anyway.
 multiple names, Emacs does not prevent two users from editing it
 simultaneously under different names.
 
-  A lock file cannot be written in some circumstances, e.g. if Emacs
-lacks the system permissions or the system does not support symbolic
-links.  In these cases, Emacs can still detect the collision when you
-try to save a file, by checking the file's last-modification date.  If
-the file has changed since the last time Emacs visited or saved it,
-that implies that changes have been made in some other way, and will
-be lost if Emacs proceeds with saving.  Emacs then displays a warning
-message and asks for confirmation before saving; answer @kbd{yes} to
-save, and @kbd{no} or @kbd{C-g} cancel the save.
+  A lock file cannot be written in some circumstances, e.g., if Emacs
+lacks the system permissions or cannot create lock files for some
+other reason.  In these cases, Emacs can still detect the collision
+when you try to save a file, by checking the file's last-modification
+date.  If the file has changed since the last time Emacs visited or
+saved it, that implies that changes have been made in some other way,
+and will be lost if Emacs proceeds with saving.  Emacs then displays a
+warning message and asks for confirmation before saving; answer
+@kbd{yes} to save, and @kbd{no} or @kbd{C-g} cancel the save.
 
   If you are notified that simultaneous editing has already taken
 place, one way to compare the buffer to its file is the @kbd{M-x
@@ -1341,7 +1341,7 @@ contents of the hunk.
   You can edit a Diff mode buffer like any other buffer.  (If it is
 read-only, you need to make it writable first.  @xref{Misc Buffer}.)
 Whenever you change a hunk, Diff mode attempts to automatically
-correct the line numbers in the hunk headers, to ensure that the diff
+correct the line numbers in the hunk headers, to ensure that the patch
 remains ``correct''.  To disable automatic line number correction,
 change the variable @code{diff-update-on-the-fly} to @code{nil}.
 
@@ -1470,11 +1470,22 @@ name from the patch itself.  This is useful for making log entries for
 functions that are deleted by the patch.
 @end table
 
-  By default, Diff mode highlights trailing whitespace on modified
-lines, so that they are more obvious.  This is done by enabling
-Whitespace mode in the Diff buffer (@pxref{Useless Whitespace}).  Diff
-mode buffers are set up so that Whitespace mode avoids highlighting
-trailing whitespace occurring in the diff context.
+@c Trailing whitespace is NOT shown by default.
+@c Emacs's dir-locals file enables this (for some reason).
+@cindex trailing whitespace, in patches
+@findex diff-delete-trailing-whitespace
+  Patches sometimes include trailing whitespace on modified lines, as
+an unintentional and undesired change.  There are two ways to deal
+with this problem.  Firstly, if you enable Whitespace mode in a Diff
+buffer (@pxref{Useless Whitespace}), it automatically highlights
+trailing whitespace in modified lines.  Secondly, you can use the
+command @kbd{M-x diff-delete-trailing-whitespace}, which searches for
+trailing whitespace in the lines modified by the patch, and removes
+that whitespace in both the patch and the patched source file(s).
+This command does not save the modifications that it makes, so you can
+decide whether to save the changes (the list of modified files is
+displayed in the echo area).  With a prefix argument, it tries to
+modify the original source files rather than the patched source files.
 
 @node Misc File Ops
 @section Miscellaneous File Operations
@@ -1564,9 +1575,8 @@ open file @var{linkname} will refer to whatever file is named
 @var{target} at the time the opening is done, or will get an error if
 the name @var{target} is nonexistent at that time.  This command does
 not expand the argument @var{target}, so that it allows you to specify
-a relative name as the target of the link.  Not all systems support
-symbolic links; on systems that don't support them, this command is
-not defined.
+a relative name as the target of the link.  On MS-Windows, this
+command works only on MS Windows Vista and later.
 
 @kindex C-x i
 @findex insert-file
@@ -1927,8 +1937,7 @@ or taller than the frame, the usual point motion keys (@kbd{C-f},
 displayed.  If the image can be animated, the command @kbd{RET}
 (@code{image-toggle-animation}) starts or stops the animation.
 Animation plays once, unless the option @code{image-animate-loop} is
-non-@code{nil}.  Currently, Emacs only supports animation in GIF
-files.
+non-@code{nil}.
 
 @cindex ImageMagick support
 @vindex imagemagick-enabled-types
@@ -1938,7 +1947,7 @@ can use ImageMagick to render a wide variety of images.  The variable
 @code{imagemagick-enabled-types} lists the image types that Emacs may
 render using ImageMagick; each element in the list should be an
 internal ImageMagick name for an image type, as a symbol or an
-equivalent string (e.g.@: @code{BMP} for @file{.bmp} images).  To
+equivalent string (e.g., @code{BMP} for @file{.bmp} images).  To
 enable ImageMagick for all possible image types, change
 @code{imagemagick-enabled-types} to @code{t}.  The variable
 @code{imagemagick-types-inhibit} lists the image types which should