X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=man%2Fxemacs%2Ffiles.texi;h=142f4890364e0d04de8566f9eb3ebecb0bc6d71a;hb=f6b681259e20b2eed6416abad878c1ed806a0691;hp=ba631631f2bd5d0867ba8756fac96f62b3f72555;hpb=98a6e4055a1fa624c592ac06f79287d55196ca37;p=chise%2Fxemacs-chise.git.1 diff --git a/man/xemacs/files.texi b/man/xemacs/files.texi index ba63163..142f489 100644 --- a/man/xemacs/files.texi +++ b/man/xemacs/files.texi @@ -10,6 +10,19 @@ commands apply directly to text in the buffer; that is, to the copy inside Emacs. Your changes appear in the file itself only when you @dfn{save} the buffer back into the file. +@cindex files, remote +@cindex remote files + Emacs is also able to handle ``remote files'' which are stored on +other hosts. Not only is Emacs somewhat aware of the special issues +involved with network file systems, but it can also use FTP and ssh (or +rsh) to make local copies of the files, and refresh them on the remote +host automatically when you save the buffer. The FTP interface is +provided by the standard @samp{efs} package @ref{Top, EFS, , efs}. The +ssh/rsh interface is provided by the optional @samp{tramp} package +@ref{Top, TRAMP, , tramp}. These packages attempt to implement all of +the operations described below, making remote file use transparent +(except for unavoidable network delays). + In addition to visiting and saving files, Emacs can delete, copy, rename, and append to files, and operate on file directories. @@ -43,6 +56,17 @@ file name is the name of the file visited in the current buffer; this makes it easy to operate on that file with any of the Emacs file commands. +The syntax for accessing remote files unfortunately varies depending on +the method used. The syntax for using FTP is +@samp{/@var{user}@@@var{remote-host}:@var{path-on-remote-host}}. The +syntax for using ssh is +@samp{/[@var{user}@@@var{remote-host}]@var{path-on-remote-host}}. + + In both cases the @samp{@var{user}@@} portion is optional (it defaults +to your local user name). @var{path-on-remote-host} may use the +@samp{~} notation to indicate @var{user}'s home directory on the remote +host. The default file name will reflect the remote host information. + @vindex default-directory Each buffer has a default directory, normally the same as the directory of the file visited in that buffer. When Emacs reads a file @@ -59,6 +83,10 @@ which does not specify a directory, it is short for @file{/u/rms/gnu/foo}. @samp{../.login} would stand for @file{/u/rms/.login}. @samp{new/foo} would stand for the filename @file{/u/rms/gnu/new/foo}. + When visiting a remote file via EFS or TRAMP, the remote directory +becomes the default directory (@pxref{Visiting}) for that buffer, just +as a local directory would. + @vindex default-directory-alist The variable @code{default-directory-alist} takes an alist of major modes and their opinions on @code{default-directory} as a Lisp @@ -615,31 +643,34 @@ version of the file. To do this, use @kbd{M-x revert-buffer}, which operates on the current buffer. Since reverting a buffer can result in very extensive changes, you must confirm it with @kbd{yes}. - If the current buffer has been auto-saved more recently than it has been -saved explicitly, @code{revert-buffer} offers to read the auto save file -instead of the visited file (@pxref{Auto Save}). Emacs asks you about -the auto-save file before the request for confirmation of the -@kbd{revert-buffer} operation, and demands @kbd{y} or @kbd{n} -as an answer. If you have started to type @kbd{yes} for confirmation -without realizing that the auto-save question was going to be asked, the -@kbd{y} will answer that question, but the @kbd{es} will not be valid -confirmation. This gives you a chance to cancel the operation with -@kbd{C-g} and try again with the answers you really intend. - - @code{revert-buffer} keeps point at the same distance (measured in -characters) from the beginning of the file. If the file was edited only -slightly, you will be at approximately the same piece of text after -reverting as before. If you have made more extensive changes, the value of -point in the old file may bring you to a totally different piece of text -than your last editing point. + You may request that @code{revert-buffer} check for an auto-save file +that is more recent than the visited file by providing a prefix +argument. If a recent auto-save file exists, @code{revert-buffer} +offers to read the auto-save file instead of the visited file +(@pxref{Auto Save}). Emacs asks you about the auto-save file before the +request for confirmation of the @kbd{revert-buffer} operation, and +demands @kbd{y} or @kbd{n} as an answer. If you have started to type +@kbd{yes} to confirm the revert operation, the @kbd{y} will answer the +question about using the auto-save file, but the @kbd{es} will not be +valid confirmation for the reversion. This gives you a chance to cancel +the operation with @kbd{C-g} and try again with the answers you really +intend. + + @code{revert-buffer} preserves the value of point (in characters from +the beginning of the file). If the file was edited only slightly, you +will be at approximately the same piece of text after reverting as +before. If you have made more extensive changes, after reversion point +may be in a totally different context than your last edits before +reversion. A buffer reverted from its visited file is marked ``not modified'' until -you make a change. +you make a change. The buffer's modes will also be recalculated, by +@code{normal-mode}. Some kinds of buffers whose contents reflect data bases other than files, such as Dired buffers, can also be reverted. For them, reverting means -recalculating their contents from the appropriate data. Buffers -created randomly with @kbd{C-x b} cannot be reverted; @code{revert-buffer} +refreshing their contents from the appropriate data. Buffers created +randomly with @kbd{C-x b} cannot be reverted; @code{revert-buffer} reports an error when asked to do so. @node Auto Save, Version Control, Reverting, Files