diff options
| author | Chong Yidong | 2011-10-21 22:45:34 +0800 |
|---|---|---|
| committer | Chong Yidong | 2011-10-21 22:45:34 +0800 |
| commit | bfd779dd73eb7bc3258c98e12aa7fbcbc98f6bbd (patch) | |
| tree | 672d198fddf1c5aacfff00694c8dbcc64dd4e40a | |
| parent | f9888580794b9addf34bd138075a4503c24793c0 (diff) | |
| download | emacs-bfd779dd73eb7bc3258c98e12aa7fbcbc98f6bbd.tar.gz emacs-bfd779dd73eb7bc3258c98e12aa7fbcbc98f6bbd.zip | |
Update Files chapter of Emacs manual.
Plus miscellaneous minor speling fixes in other manual files.
* doc/emacs/files.texi (File Names, Visiting, Interlocking): Copyedits.
(Backup Copying): backup-by-copying-when-mismatch is now t.
(Customize Save): Fix description of require-final-newline.
(Reverting): Note that revert-buffer can't be undone. Mention VC.
(Auto Save Control): Clarify.
(File Archives): Add 7z.
(Remote Files): ange-ftp-make-backup-files defaults to nil.
* doc/emacs/arevert-xtra.texi (Autorevert): Copyedits.
| -rw-r--r-- | admin/FOR-RELEASE | 6 | ||||
| -rw-r--r-- | doc/emacs/ChangeLog | 12 | ||||
| -rw-r--r-- | doc/emacs/arevert-xtra.texi | 10 | ||||
| -rw-r--r-- | doc/emacs/basic.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/buffers.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/commands.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/display.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 633 | ||||
| -rw-r--r-- | doc/emacs/help.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/killing.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/screen.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/search.texi | 2 | ||||
| -rw-r--r-- | etc/NEWS | 10 |
13 files changed, 332 insertions, 355 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 7b1b7df7704..80a66be3fa4 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -151,7 +151,7 @@ TUTORIAL.zh | |||
| 151 | abbrevs.texi | 151 | abbrevs.texi |
| 152 | ack.texi | 152 | ack.texi |
| 153 | anti.texi | 153 | anti.texi |
| 154 | arevert-xtra.texi | 154 | arevert-xtra.texi cyd |
| 155 | basic.texi cyd | 155 | basic.texi cyd |
| 156 | buffers.texi | 156 | buffers.texi |
| 157 | building.texi | 157 | building.texi |
| @@ -167,7 +167,7 @@ emacs.texi | |||
| 167 | emacs-xtra.texi | 167 | emacs-xtra.texi |
| 168 | emerge-xtra.texi | 168 | emerge-xtra.texi |
| 169 | entering.texi cyd | 169 | entering.texi cyd |
| 170 | files.texi | 170 | files.texi cyd |
| 171 | fixit.texi | 171 | fixit.texi |
| 172 | fortran-xtra.texi | 172 | fortran-xtra.texi |
| 173 | frames.texi | 173 | frames.texi |
| @@ -175,7 +175,7 @@ glossary.texi | |||
| 175 | help.texi cyd | 175 | help.texi cyd |
| 176 | indent.texi | 176 | indent.texi |
| 177 | killing.texi cyd | 177 | killing.texi cyd |
| 178 | kmacro.texi | 178 | kmacro.texi cyd |
| 179 | macos.texi | 179 | macos.texi |
| 180 | maintaining.texi | 180 | maintaining.texi |
| 181 | major.texi | 181 | major.texi |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 5b07d4d692a..94b7bbe2432 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2011-10-21 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * files.texi (File Names, Visiting, Interlocking): Copyedits. | ||
| 4 | (Backup Copying): backup-by-copying-when-mismatch is now t. | ||
| 5 | (Customize Save): Fix description of require-final-newline. | ||
| 6 | (Reverting): Note that revert-buffer can't be undone. Mention VC. | ||
| 7 | (Auto Save Control): Clarify. | ||
| 8 | (File Archives): Add 7z. | ||
| 9 | (Remote Files): ange-ftp-make-backup-files defaults to nil. | ||
| 10 | |||
| 11 | * arevert-xtra.texi (Autorevert): Copyedits. | ||
| 12 | |||
| 1 | 2011-10-20 Chong Yidong <cyd@gnu.org> | 13 | 2011-10-20 Chong Yidong <cyd@gnu.org> |
| 2 | 14 | ||
| 3 | * custom.texi (Hooks, Init Examples): | 15 | * custom.texi (Hooks, Init Examples): |
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi index 374886cd956..6a24646b5f7 100644 --- a/doc/emacs/arevert-xtra.texi +++ b/doc/emacs/arevert-xtra.texi | |||
| @@ -8,11 +8,11 @@ | |||
| 8 | @section Auto Reverting Non-File Buffers | 8 | @section Auto Reverting Non-File Buffers |
| 9 | 9 | ||
| 10 | Global Auto Revert Mode normally only reverts file buffers. There are | 10 | Global Auto Revert Mode normally only reverts file buffers. There are |
| 11 | two ways to auto-revert certain non-file buffers: enabling Auto Revert | 11 | two ways to auto-revert certain non-file buffers: by enabling Auto |
| 12 | Mode in those buffers (using @kbd{M-x auto-revert-mode}); and setting | 12 | Revert Mode in those buffers (using @kbd{M-x auto-revert-mode}); and |
| 13 | @code{global-auto-revert-non-file-buffers} non-@code{nil}. The latter | 13 | by setting @code{global-auto-revert-non-file-buffers} to a |
| 14 | enables Auto Reverting for all types of buffers for which it is | 14 | non-@code{nil} value. The latter enables Auto Reverting for all types |
| 15 | implemented (listed in the menu below). | 15 | of buffers for which it is implemented (listed in the menu below). |
| 16 | 16 | ||
| 17 | Like file buffers, non-file buffers should normally not revert while | 17 | Like file buffers, non-file buffers should normally not revert while |
| 18 | you are working on them, or while they contain information that might | 18 | you are working on them, or while they contain information that might |
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 714e03720bc..abb65982873 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi | |||
| @@ -367,7 +367,7 @@ the preceding newline, joining this line to the previous one. | |||
| 367 | If, however, the region is active, @kbd{@key{DEL}} instead deletes | 367 | If, however, the region is active, @kbd{@key{DEL}} instead deletes |
| 368 | the text in the region. @xref{Mark}, for a description of the region. | 368 | the text in the region. @xref{Mark}, for a description of the region. |
| 369 | 369 | ||
| 370 | On most keyboards, @key{DEL} is labelled @key{Backspace}, but we | 370 | On most keyboards, @key{DEL} is labeled @key{Backspace}, but we |
| 371 | refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL} | 371 | refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL} |
| 372 | with the @key{Delete} key; we will discuss @key{Delete} momentarily.) | 372 | with the @key{Delete} key; we will discuss @key{Delete} momentarily.) |
| 373 | On some text-only terminals, Emacs may not recognize the @key{DEL} key | 373 | On some text-only terminals, Emacs may not recognize the @key{DEL} key |
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index b82f3fac7d4..1108b501ee9 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi | |||
| @@ -245,7 +245,7 @@ value in each buffer and makes the buffer read-only if its value is | |||
| 245 | non-@code{nil}. If you have files under version control, you may find | 245 | non-@code{nil}. If you have files under version control, you may find |
| 246 | it convenient to bind @kbd{C-x C-q} to @code{vc-toggle-read-only} | 246 | it convenient to bind @kbd{C-x C-q} to @code{vc-toggle-read-only} |
| 247 | instead. This will guard you against an operation that will confuse | 247 | instead. This will guard you against an operation that will confuse |
| 248 | most modern version-conmtrol systems. @xref{Version Control}. | 248 | most modern version-control systems. @xref{Version Control}. |
| 249 | 249 | ||
| 250 | @findex rename-buffer | 250 | @findex rename-buffer |
| 251 | @kbd{M-x rename-buffer} changes the name of the current buffer. You | 251 | @kbd{M-x rename-buffer} changes the name of the current buffer. You |
diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi index de6e7539c27..817cfc369d1 100644 --- a/doc/emacs/commands.texi +++ b/doc/emacs/commands.texi | |||
| @@ -46,7 +46,7 @@ are certain characters found on non-English keyboards | |||
| 46 | @cindex M- | 46 | @cindex M- |
| 47 | Emacs also recognizes control characters that are entered using | 47 | Emacs also recognizes control characters that are entered using |
| 48 | @dfn{modifier keys}. Two commonly-used modifier keys are | 48 | @dfn{modifier keys}. Two commonly-used modifier keys are |
| 49 | @key{Control} (usually labelled @key{Ctrl}), and @key{Meta} (usually | 49 | @key{Control} (usually labeled @key{Ctrl}), and @key{Meta} (usually |
| 50 | labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{Meta} for | 50 | labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{Meta} for |
| 51 | historical reasons.}. For example, @kbd{Control-a} is entered by | 51 | historical reasons.}. For example, @kbd{Control-a} is entered by |
| 52 | holding down the @key{Ctrl} key while pressing @kbd{a}; we will refer | 52 | holding down the @key{Ctrl} key while pressing @kbd{a}; we will refer |
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 254f9465690..b72e24bf243 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi | |||
| @@ -1415,7 +1415,7 @@ to make the screen blink. | |||
| 1415 | The variable @code{echo-keystrokes} controls the echoing of multi-character | 1415 | The variable @code{echo-keystrokes} controls the echoing of multi-character |
| 1416 | keys; its value is the number of seconds of pause required to cause echoing | 1416 | keys; its value is the number of seconds of pause required to cause echoing |
| 1417 | to start, or zero, meaning don't echo at all. The value takes effect when | 1417 | to start, or zero, meaning don't echo at all. The value takes effect when |
| 1418 | there is someting to echo. @xref{Echo Area}. | 1418 | there is something to echo. @xref{Echo Area}. |
| 1419 | 1419 | ||
| 1420 | @cindex mouse pointer | 1420 | @cindex mouse pointer |
| 1421 | @cindex hourglass pointer display | 1421 | @cindex hourglass pointer display |
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 433bf617598..fdd977cf5ff 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -47,58 +47,51 @@ on file directories. | |||
| 47 | @section File Names | 47 | @section File Names |
| 48 | @cindex file names | 48 | @cindex file names |
| 49 | 49 | ||
| 50 | Many Emacs commands that operate on a file require you to specify | ||
| 51 | the file name, using the minibuffer (@pxref{Minibuffer}). You can use | ||
| 52 | @dfn{completion} to specify long file names (@pxref{Completion}). | ||
| 53 | Note that file name completion ignores file names whose extensions | ||
| 54 | appear in the variable @code{completion-ignored-extensions} | ||
| 55 | (@pxref{Completion Options}). | ||
| 56 | |||
| 57 | @cindex default file name | 50 | @cindex default file name |
| 58 | For most operations, there is a @dfn{default file name} which is | 51 | Many Emacs commands that operate on a file require you to specify |
| 59 | used if you type just @key{RET} to enter an empty argument. Normally, | 52 | the file name, using the minibuffer (@pxref{Minibuffer File}). You |
| 60 | the default file name is the name of the file visited in the current | 53 | can use @dfn{completion} to specify long file names |
| 61 | buffer. | 54 | (@pxref{Completion}); note that file name completion ignores file |
| 55 | names whose extensions appear in the variable | ||
| 56 | @code{completion-ignored-extensions} (@pxref{Completion Options}). | ||
| 62 | 57 | ||
| 63 | @cindex default directory | 58 | @cindex default directory |
| 64 | @vindex default-directory | 59 | @vindex default-directory |
| 65 | @vindex insert-default-directory | 60 | @vindex insert-default-directory |
| 66 | Each buffer has a @dfn{default directory} which is normally the same | 61 | Each buffer has a @dfn{default directory}, stored in the |
| 67 | as the directory of the file visited in that buffer. For example, if | 62 | buffer-local variable @code{default-directory}. Whenever Emacs reads |
| 68 | the default file name is @file{/u/rms/gnu/gnu.tasks}, the default | 63 | a file name using the minibuffer, it usually inserts the default |
| 69 | directory is normally @file{/u/rms/gnu/}. The default directory is | 64 | directory into the minibuffer as the initial contents. You can |
| 70 | kept in the variable @code{default-directory}, which has a separate | 65 | inhibit this insertion by changing the variable |
| 71 | value in every buffer. When a command reads a file name using the | 66 | @code{insert-default-directory} to @code{nil} (@pxref{Minibuffer |
| 72 | minibuffer, the default directory usually serves as the initial | 67 | File}). Regardless, Emacs always assumes that any relative file name |
| 73 | contents of the minibuffer. To inhibit the insertion of the default | 68 | is relative to the default directory, e.g. entering a file name |
| 74 | directory, set the variable @code{insert-default-directory} to | 69 | without a directory specifies a file in the default directory. |
| 75 | @code{nil}. | ||
| 76 | 70 | ||
| 77 | If you enter a file name without a directory, that specifies a file | 71 | @findex cd |
| 78 | in the default directory. If you specify a directory in a relative | 72 | @findex pwd |
| 79 | fashion, with a name that does not start with a slash, it is | 73 | When you visit a file, Emacs sets @code{default-directory} in the |
| 80 | interpreted with respect to the default directory. For example, | 74 | visiting buffer to the directory of its file. When you create a new |
| 81 | suppose the default directory is @file{/u/rms/gnu/}. Entering just | 75 | buffer that is not visiting a file, via a command like @kbd{C-x b}, |
| 82 | @samp{foo} in the minibuffer, with a directory omitted, specifies the | 76 | its default directory is usually copied from the buffer that was |
| 83 | file @file{/u/rms/gnu/foo}; entering @samp{../.login} specifies | 77 | current at the time (@pxref{Select Buffer}). You can use the command |
| 78 | @kbd{M-x pwd} to see the value of @code{default-directory} in the | ||
| 79 | current buffer. The command @kbd{M-x cd} prompts for a directory | ||
| 80 | name, and sets the buffer's @code{default-directory} to that directory | ||
| 81 | (doing this does not change the buffer's file name, if any). | ||
| 82 | |||
| 83 | As an example, when you visit the file @file{/u/rms/gnu/gnu.tasks}, | ||
| 84 | the default directory is set to @file{/u/rms/gnu/}. If you invoke a | ||
| 85 | command that reads a file name, entering just @samp{foo} in the | ||
| 86 | minibuffer, with a directory omitted, specifies the file | ||
| 87 | @file{/u/rms/gnu/foo}; entering @samp{../.login} specifies | ||
| 84 | @file{/u/rms/.login}; and entering @samp{new/foo} specifies | 88 | @file{/u/rms/.login}; and entering @samp{new/foo} specifies |
| 85 | @file{/u/rms/gnu/new/foo}. | 89 | @file{/u/rms/gnu/new/foo}. |
| 86 | 90 | ||
| 87 | When typing a file name into the minibuffer, you can make use of a | 91 | When typing a file name into the minibuffer, you can make use of a |
| 88 | couple of shortcuts: a double slash is interpreted as ``ignore | 92 | couple of shortcuts: a double slash is interpreted as ``ignore |
| 89 | everything before the second slash in the pair,'' and @samp{~/} is | 93 | everything before the second slash in the pair,'' and @samp{~/} is |
| 90 | interpreted as your home directory. @xref{Minibuffer File}, for more | 94 | interpreted as your home directory. @xref{Minibuffer File}. |
| 91 | information about these shortcuts. | ||
| 92 | |||
| 93 | @findex cd | ||
| 94 | @findex pwd | ||
| 95 | The command @kbd{M-x pwd} displays the default directory, and the | ||
| 96 | command @kbd{M-x cd} sets it to a value read using the minibuffer. A | ||
| 97 | buffer's default directory changes only when the @code{cd} command is | ||
| 98 | used. A file-visiting buffer's default directory is initialized to | ||
| 99 | the directory of the file it visits. If you create a buffer with | ||
| 100 | @kbd{C-x b}, its default directory is copied from that of the buffer | ||
| 101 | that was current at the time (@pxref{Select Buffer}). | ||
| 102 | 95 | ||
| 103 | @cindex environment variables in file names | 96 | @cindex environment variables in file names |
| 104 | @cindex expansion of environment variables | 97 | @cindex expansion of environment variables |
| @@ -113,10 +106,8 @@ the @samp{$}; alternatively, it can be enclosed in braces after the | |||
| 113 | @file{/u/$@{FOO@}/test.c} are abbreviations for | 106 | @file{/u/$@{FOO@}/test.c} are abbreviations for |
| 114 | @file{/u/rms/hacks/test.c}. If the environment variable is not | 107 | @file{/u/rms/hacks/test.c}. If the environment variable is not |
| 115 | defined, no substitution occurs, so that the character @samp{$} stands | 108 | defined, no substitution occurs, so that the character @samp{$} stands |
| 116 | for itself. | 109 | for itself. Note that environment variables affect Emacs only if they |
| 117 | 110 | are applied before Emacs is started. | |
| 118 | Note that environment variables affect Emacs only if they are | ||
| 119 | applied before Emacs is started. | ||
| 120 | 111 | ||
| 121 | To access a file with @samp{$} in its name, if the @samp{$} causes | 112 | To access a file with @samp{$} in its name, if the @samp{$} causes |
| 122 | expansion, type @samp{$$}. This pair is converted to a single | 113 | expansion, type @samp{$$}. This pair is converted to a single |
| @@ -125,8 +116,7 @@ a single @samp{$}. Alternatively, quote the whole file name with | |||
| 125 | @samp{/:} (@pxref{Quoted File Names}). File names which begin with a | 116 | @samp{/:} (@pxref{Quoted File Names}). File names which begin with a |
| 126 | literal @samp{~} should also be quoted with @samp{/:}. | 117 | literal @samp{~} should also be quoted with @samp{/:}. |
| 127 | 118 | ||
| 128 | You can include non-@acronym{ASCII} characters in file names if you set the | 119 | You can include non-@acronym{ASCII} characters in file names. |
| 129 | variable @code{file-name-coding-system} to a non-@code{nil} value. | ||
| 130 | @xref{File Name Coding}. | 120 | @xref{File Name Coding}. |
| 131 | 121 | ||
| 132 | @node Visiting | 122 | @node Visiting |
| @@ -159,48 +149,43 @@ Visit a file with no conversion of the contents. | |||
| 159 | buffer so you can edit them. Emacs makes a new buffer for each file | 149 | buffer so you can edit them. Emacs makes a new buffer for each file |
| 160 | that you visit. | 150 | that you visit. |
| 161 | 151 | ||
| 162 | Emacs normally constructs the buffer name from the file name, | 152 | @kindex C-x C-f |
| 163 | omitting the directory name. For example, a file named | 153 | @findex find-file |
| 164 | @file{/usr/rms/emacs.tex} is visited in a buffer named | 154 | To visit a file, type @kbd{C-x C-f} (@code{find-file}) and use the |
| 165 | @samp{emacs.tex}. If there is already a buffer with that name, Emacs | 155 | minibuffer to enter the name of the desired file (@pxref{File Names}). |
| 166 | constructs a unique name; the normal method is to append @samp{<2>}, | 156 | While in the minibuffer, you can abort the command by typing |
| 167 | @samp{<3>}, and so on, but you can select other methods. | 157 | @kbd{C-g}. |
| 158 | |||
| 159 | If the specified file exists but the system does not allow you to | ||
| 160 | read it, an error message is displayed in the echo area. Otherwise, | ||
| 161 | you can tell that @kbd{C-x C-f} has completed successfully by the | ||
| 162 | appearance of new text on the screen, and by the buffer name shown in | ||
| 163 | the mode line (@pxref{Mode Line}). Emacs normally constructs the | ||
| 164 | buffer name from the file name, omitting the directory name. For | ||
| 165 | example, a file named @file{/usr/rms/emacs.tex} is visited in a buffer | ||
| 166 | named @samp{emacs.tex}. If there is already a buffer with that name, | ||
| 167 | Emacs constructs a unique name; the normal method is to append | ||
| 168 | @samp{<2>}, @samp{<3>}, and so on, but you can select other methods. | ||
| 168 | @xref{Uniquify}. | 169 | @xref{Uniquify}. |
| 169 | 170 | ||
| 170 | Each window's mode line shows the name of the buffer that is being | 171 | @cindex creating files |
| 171 | displayed in that window, so you can always tell what buffer you are | 172 | To create a new file, just visit it using the same command, @kbd{C-x |
| 172 | editing. @pxref{Mode Line}. | 173 | C-f}. Emacs displays @samp{(New file)} in the echo area, but in other |
| 173 | 174 | respects behaves as if you had visited an existing empty file. | |
| 174 | The changes you make with editing commands are made in the Emacs | ||
| 175 | buffer. They do not take effect in the file that you visited, or any | ||
| 176 | permanent place, until you @dfn{save} the buffer (@pxref{Saving}). | ||
| 177 | 175 | ||
| 178 | @cindex modified (buffer) | 176 | @cindex modified (buffer) |
| 179 | If a buffer contains changes that have not been saved, we say the | 177 | After visiting a file, the changes you make with editing commands are |
| 180 | buffer is @dfn{modified}. This implies that some changes will be lost | 178 | made in the Emacs buffer. They do not take effect in the visited |
| 181 | if the buffer is not saved. The mode line displays two stars near the | 179 | file, until you @dfn{save} the buffer (@pxref{Saving}). If a buffer |
| 182 | left margin to indicate that the buffer is modified. | 180 | contains changes that have not been saved, we say the buffer is |
| 183 | 181 | @dfn{modified}. This implies that some changes will be lost if the | |
| 184 | @kindex C-x C-f | 182 | buffer is not saved. The mode line displays two stars near the left |
| 185 | @findex find-file | 183 | margin to indicate that the buffer is modified. |
| 186 | To visit a file, type @kbd{C-x C-f} (@code{find-file}) and use the | 184 | |
| 187 | minibuffer to enter the name of the desired file. The usual | 185 | If you visit a file that is already in Emacs, @kbd{C-x C-f} switches |
| 188 | defaulting and completion behavior is available in this minibuffer | 186 | to the existing buffer instead of making another copy. Before doing |
| 189 | (@pxref{Minibuffer File}). Note, also, that completion ignores | 187 | so, it checks whether the file has changed since you last visited or |
| 190 | certain file names (@pxref{Completion Options}). While in the | 188 | saved it. If the file has changed, Emacs offers to reread it. |
| 191 | minibuffer, you can abort @kbd{C-x C-f} by typing @kbd{C-g}. | ||
| 192 | |||
| 193 | Your can tell that @kbd{C-x C-f} has completed successfully by the | ||
| 194 | appearance of new text on the screen and a new buffer name in the mode | ||
| 195 | line. If the specified file does not exist and you could not create | ||
| 196 | it, or exists but you can't read it, an error message is displayed in | ||
| 197 | the echo area. | ||
| 198 | |||
| 199 | If you visit a file that is already in Emacs, @kbd{C-x C-f} does not make | ||
| 200 | another copy. It selects the existing buffer containing that file. | ||
| 201 | However, before doing so, it checks whether the file itself has changed | ||
| 202 | since you visited or saved it last. If the file has changed, Emacs offers | ||
| 203 | to reread it. | ||
| 204 | 189 | ||
| 205 | @vindex large-file-warning-threshold | 190 | @vindex large-file-warning-threshold |
| 206 | @cindex file, warning when size is large | 191 | @cindex file, warning when size is large |
| @@ -211,10 +196,10 @@ to reread it. | |||
| 211 | about 10 megabytes), Emacs asks you for confirmation first. You can | 196 | about 10 megabytes), Emacs asks you for confirmation first. You can |
| 212 | answer @kbd{y} to proceed with visiting the file. Note, however, that | 197 | answer @kbd{y} to proceed with visiting the file. Note, however, that |
| 213 | Emacs cannot visit files that are larger than the maximum Emacs buffer | 198 | Emacs cannot visit files that are larger than the maximum Emacs buffer |
| 214 | size, which is limited by the amount of memory Emacs can allocate | 199 | size, which is limited by the amount of memory Emacs can allocate and |
| 215 | and by the integers that Emacs can represent | 200 | by the integers that Emacs can represent (@pxref{Buffers}). If you |
| 216 | (@pxref{Buffers}). If you try, Emacs will display an error message | 201 | try, Emacs displays an error message saying that the maximum buffer |
| 217 | saying that the maximum buffer size has been exceeded. | 202 | size has been exceeded. |
| 218 | 203 | ||
| 219 | @cindex wildcard characters in file names | 204 | @cindex wildcard characters in file names |
| 220 | @vindex find-file-wildcards | 205 | @vindex find-file-wildcards |
| @@ -228,28 +213,6 @@ File Names}, for information on how to visit a file whose name | |||
| 228 | actually contains wildcard characters. You can disable the wildcard | 213 | actually contains wildcard characters. You can disable the wildcard |
| 229 | feature by customizing @code{find-file-wildcards}. | 214 | feature by customizing @code{find-file-wildcards}. |
| 230 | 215 | ||
| 231 | @cindex file selection dialog | ||
| 232 | On graphical displays, there are two additional methods for visiting | ||
| 233 | files. Firstly, when Emacs is built with a suitable GUI toolkit, | ||
| 234 | commands invoked with the mouse (by clicking on the menu bar or tool | ||
| 235 | bar) use the toolkit's standard ``File Selection'' dialog instead of | ||
| 236 | prompting for the file name in the minibuffer. On GNU/Linux and Unix | ||
| 237 | platforms, Emacs does this when built with GTK, LessTif, and Motif | ||
| 238 | toolkits; on MS-Windows and Mac, the GUI version does that by default. | ||
| 239 | For information on how to customize this, see @ref{Dialog Boxes}. | ||
| 240 | |||
| 241 | Secondly, Emacs supports ``drag and drop'': dropping a file into an | ||
| 242 | ordinary Emacs window visits the file using that window. As an | ||
| 243 | exception, dropping a file into a window displaying a Dired buffer | ||
| 244 | moves or copies the file into the displayed directory. For details, | ||
| 245 | see @ref{Drag and Drop}, and @ref{Misc Dired Features}. | ||
| 246 | |||
| 247 | @cindex creating files | ||
| 248 | What if you want to create a new file? Just visit it. Emacs | ||
| 249 | displays @samp{(New file)} in the echo area, but in other respects | ||
| 250 | behaves as if you had visited an existing empty file. If you make | ||
| 251 | changes and save them, the file is created. | ||
| 252 | |||
| 253 | @cindex minibuffer confirmation | 216 | @cindex minibuffer confirmation |
| 254 | @cindex confirming in the minibuffer | 217 | @cindex confirming in the minibuffer |
| 255 | @vindex confirm-nonexistent-file-or-buffer | 218 | @vindex confirm-nonexistent-file-or-buffer |
| @@ -271,20 +234,19 @@ about completion. | |||
| 271 | 234 | ||
| 272 | @kindex C-x C-v | 235 | @kindex C-x C-v |
| 273 | @findex find-alternate-file | 236 | @findex find-alternate-file |
| 274 | If you visit a nonexistent file unintentionally (because you typed | 237 | If you visit the wrong file unintentionally by typing its name |
| 275 | the wrong file name), type @kbd{C-x C-v} (@code{find-alternate-file}) | 238 | incorrectly, type @kbd{C-x C-v} (@code{find-alternate-file}) to visit |
| 276 | to visit the file you really wanted. @kbd{C-x C-v} is similar to | 239 | the file you really wanted. @kbd{C-x C-v} is similar to @kbd{C-x |
| 277 | @kbd{C-x C-f}, but it kills the current buffer (after first offering | 240 | C-f}, but it kills the current buffer (after first offering to save it |
| 278 | to save it if it is modified). When @kbd{C-x C-v} reads the file name | 241 | if it is modified). When @kbd{C-x C-v} reads the file name to visit, |
| 279 | to visit, it inserts the entire default file name in the buffer, with | 242 | it inserts the entire default file name in the buffer, with point just |
| 280 | point just after the directory part; this is convenient if you made a | 243 | after the directory part; this is convenient if you made a slight |
| 281 | slight error in typing the name. | 244 | error in typing the name. |
| 282 | 245 | ||
| 283 | @vindex find-file-run-dired | 246 | @vindex find-file-run-dired |
| 284 | If you ``visit'' a file that is actually a directory, Emacs invokes | 247 | If you ``visit'' a file that is actually a directory, Emacs invokes |
| 285 | Dired, the Emacs directory browser; this lets you ``edit'' the | 248 | Dired, the Emacs directory browser. @xref{Dired}. You can disable |
| 286 | contents of the directory. @xref{Dired}. You can disable this | 249 | this behavior by setting the variable @code{find-file-run-dired} to |
| 287 | behavior by setting the variable @code{find-file-run-dired} to | ||
| 288 | @code{nil}; in that case, it is an error to try to visit a directory. | 250 | @code{nil}; in that case, it is an error to try to visit a directory. |
| 289 | 251 | ||
| 290 | Files which are actually collections of other files, or @dfn{file | 252 | Files which are actually collections of other files, or @dfn{file |
| @@ -321,17 +283,28 @@ new frame, or makes visible any existing frame showing the file you | |||
| 321 | seek. This feature is available only when you are using a window | 283 | seek. This feature is available only when you are using a window |
| 322 | system. @xref{Frames}. | 284 | system. @xref{Frames}. |
| 323 | 285 | ||
| 324 | Emacs recognizes from the contents of a file which end-of-line | 286 | @cindex file selection dialog |
| 325 | convention it uses to separate lines---newline (used on GNU/Linux and | 287 | On graphical displays, there are two additional methods for visiting |
| 326 | on Unix), carriage-return linefeed (used on Microsoft systems), or | 288 | files. Firstly, when Emacs is built with a suitable GUI toolkit, |
| 327 | just carriage-return (used on the Macintosh)---and automatically | 289 | commands invoked with the mouse (by clicking on the menu bar or tool |
| 328 | converts the contents to the normal Emacs convention, which is that | 290 | bar) use the toolkit's standard ``File Selection'' dialog instead of |
| 329 | the newline character separates lines. This is a part of the general | 291 | prompting for the file name in the minibuffer. On GNU/Linux and Unix |
| 330 | feature of coding system conversion (@pxref{Coding Systems}), and | 292 | platforms, Emacs does this when built with GTK, LessTif, and Motif |
| 331 | makes it possible to edit files imported from different operating | 293 | toolkits; on MS-Windows and Mac, the GUI version does that by default. |
| 332 | systems with equal convenience. If you change the text and save the | 294 | For information on how to customize this, see @ref{Dialog Boxes}. |
| 333 | file, Emacs performs the inverse conversion, changing newlines back | 295 | |
| 334 | into carriage-return linefeed or just carriage-return if appropriate. | 296 | Secondly, Emacs supports ``drag and drop'': dropping a file into an |
| 297 | ordinary Emacs window visits the file using that window. As an | ||
| 298 | exception, dropping a file into a window displaying a Dired buffer | ||
| 299 | moves or copies the file into the displayed directory. For details, | ||
| 300 | see @ref{Drag and Drop}, and @ref{Misc Dired Features}. | ||
| 301 | |||
| 302 | Each time you visit a file, Emacs automatically scans its contents | ||
| 303 | to detect what character encoding and end-of-line convention it uses, | ||
| 304 | and converts these to Emacs' internal encoding and end-of-line | ||
| 305 | convention within the buffer. When you save the buffer, Emacs | ||
| 306 | performs the inverse conversion, writing the file to disk with its | ||
| 307 | original encoding and end-of-line convention. @xref{Coding Systems}. | ||
| 335 | 308 | ||
| 336 | @findex find-file-literally | 309 | @findex find-file-literally |
| 337 | If you wish to edit a file as a sequence of @acronym{ASCII} | 310 | If you wish to edit a file as a sequence of @acronym{ASCII} |
| @@ -346,17 +319,17 @@ command asks you whether to visit it literally instead. | |||
| 346 | 319 | ||
| 347 | @vindex find-file-hook | 320 | @vindex find-file-hook |
| 348 | @vindex find-file-not-found-functions | 321 | @vindex find-file-not-found-functions |
| 349 | Two special hook variables allow extensions to modify the operation of | 322 | Two special hook variables allow extensions to modify the operation |
| 350 | visiting files. Visiting a file that does not exist runs the functions | 323 | of visiting files. Visiting a file that does not exist runs the |
| 351 | in the list @code{find-file-not-found-functions}; this variable holds a list | 324 | functions in @code{find-file-not-found-functions}; this variable holds |
| 352 | of functions, and the functions are called one by one (with no | 325 | a list of functions, which are called one by one (with no arguments) |
| 353 | arguments) until one of them returns non-@code{nil}. This is not a | 326 | until one of them returns non-@code{nil}. This is not a normal hook, |
| 354 | normal hook, and the name ends in @samp{-functions} rather than @samp{-hook} | 327 | and the name ends in @samp{-functions} rather than @samp{-hook} to |
| 355 | to indicate that fact. | 328 | indicate that fact. |
| 356 | 329 | ||
| 357 | Successful visiting of any file, whether existing or not, calls the | 330 | Successful visiting of any file, whether existing or not, calls the |
| 358 | functions in the list @code{find-file-hook}, with no arguments. | 331 | functions in @code{find-file-hook}, with no arguments. This variable |
| 359 | This variable is a normal hook. In the case of a nonexistent file, the | 332 | is a normal hook. In the case of a nonexistent file, the |
| 360 | @code{find-file-not-found-functions} are run first. @xref{Hooks}. | 333 | @code{find-file-not-found-functions} are run first. @xref{Hooks}. |
| 361 | 334 | ||
| 362 | There are several ways to specify automatically the major mode for | 335 | There are several ways to specify automatically the major mode for |
| @@ -386,9 +359,9 @@ that was visited in the buffer. | |||
| 386 | 359 | ||
| 387 | @table @kbd | 360 | @table @kbd |
| 388 | @item C-x C-s | 361 | @item C-x C-s |
| 389 | Save the current buffer in its visited file on disk (@code{save-buffer}). | 362 | Save the current buffer to its file (@code{save-buffer}). |
| 390 | @item C-x s | 363 | @item C-x s |
| 391 | Save any or all buffers in their visited files (@code{save-some-buffers}). | 364 | Save any or all buffers to their files (@code{save-some-buffers}). |
| 392 | @item M-~ | 365 | @item M-~ |
| 393 | Forget that the current buffer has been changed (@code{not-modified}). | 366 | Forget that the current buffer has been changed (@code{not-modified}). |
| 394 | With prefix argument (@kbd{C-u}), mark the current buffer as changed. | 367 | With prefix argument (@kbd{C-u}), mark the current buffer as changed. |
| @@ -597,8 +570,8 @@ Never make numbered backups; always make single backups. | |||
| 597 | @end table | 570 | @end table |
| 598 | 571 | ||
| 599 | @noindent | 572 | @noindent |
| 600 | The usual way to set this variable is globally, through your | 573 | The usual way to set this variable is globally, through your init file |
| 601 | @file{.emacs} file or the customization buffer. However, you can set | 574 | or the customization buffer. However, you can set |
| 602 | @code{version-control} locally in an individual buffer to control the | 575 | @code{version-control} locally in an individual buffer to control the |
| 603 | making of backups for that buffer's file (@pxref{Locals}). You can | 576 | making of backups for that buffer's file (@pxref{Locals}). You can |
| 604 | have Emacs set @code{version-control} locally whenever you visit a | 577 | have Emacs set @code{version-control} locally whenever you visit a |
| @@ -679,34 +652,38 @@ and group. If copying is used, these do not change. If renaming is used, | |||
| 679 | you become the file's owner, and the file's group becomes the default | 652 | you become the file's owner, and the file's group becomes the default |
| 680 | (different operating systems have different defaults for the group). | 653 | (different operating systems have different defaults for the group). |
| 681 | 654 | ||
| 682 | Having the owner change is usually a good idea, because then the owner | ||
| 683 | always shows who last edited the file. Also, the owners of the backups | ||
| 684 | show who produced those versions. Occasionally there is a file whose | ||
| 685 | owner should not change; it is a good idea for such files to contain | ||
| 686 | local variable lists to set @code{backup-by-copying-when-mismatch} | ||
| 687 | locally (@pxref{File Variables}). | ||
| 688 | |||
| 689 | @vindex backup-by-copying | 655 | @vindex backup-by-copying |
| 690 | @vindex backup-by-copying-when-linked | 656 | @vindex backup-by-copying-when-linked |
| 691 | @vindex backup-by-copying-when-mismatch | 657 | @vindex backup-by-copying-when-mismatch |
| 692 | @vindex backup-by-copying-when-privileged-mismatch | 658 | @vindex backup-by-copying-when-privileged-mismatch |
| 693 | @cindex file ownership, and backup | 659 | @cindex file ownership, and backup |
| 694 | @cindex backup, and user-id | 660 | @cindex backup, and user-id |
| 695 | The choice of renaming or copying is controlled by four variables. | 661 | The choice of renaming or copying is made as follows: |
| 696 | Renaming is the default choice. If the variable | 662 | |
| 697 | @code{backup-by-copying} is non-@code{nil}, copying is used. Otherwise, | 663 | @itemize |
| 698 | if the variable @code{backup-by-copying-when-linked} is non-@code{nil}, | 664 | @item |
| 699 | then copying is used for files that have multiple names, but renaming | 665 | If the variable @code{backup-by-copying} is non-@code{nil} (the |
| 700 | may still be used when the file being edited has only one name. If the | 666 | default is @code{nil}), use copying. |
| 701 | variable @code{backup-by-copying-when-mismatch} is non-@code{nil}, then | 667 | |
| 702 | copying is used if renaming would cause the file's owner or group to | 668 | @item |
| 703 | change. @code{backup-by-copying-when-mismatch} is @code{t} by default | 669 | Otherwise, if the variable @code{backup-by-copying-when-linked} is |
| 704 | if you start Emacs as the superuser. The fourth variable, | 670 | non-@code{nil} (the default is @code{nil}), and the file has multiple |
| 705 | @code{backup-by-copying-when-privileged-mismatch}, gives the highest | 671 | names, use copying. |
| 706 | numeric user-id for which @code{backup-by-copying-when-mismatch} will be | 672 | |
| 707 | forced on. This is useful when low-numbered user-ids are assigned to | 673 | @item |
| 708 | special system users, such as @code{root}, @code{bin}, @code{daemon}, | 674 | Otherwise, if the variable @code{backup-by-copying-when-mismatch} is |
| 709 | etc., which must maintain ownership of files. | 675 | non-@code{nil} (the default is @code{t}), and renaming would change |
| 676 | the file's owner or group, use copying. | ||
| 677 | |||
| 678 | If you change @code{backup-by-copying-when-mismatch} to @code{nil}, | ||
| 679 | Emacs checks the numeric user-id of the file's owner. If this is | ||
| 680 | higher than @code{backup-by-copying-when-privileged-mismatch}, then it | ||
| 681 | behaves as though @code{backup-by-copying-when-mismatch} is | ||
| 682 | non-@code{nil} anyway. | ||
| 683 | |||
| 684 | @item | ||
| 685 | Otherwise, renaming is the default choice. | ||
| 686 | @end itemize | ||
| 710 | 687 | ||
| 711 | When a file is managed with a version control system (@pxref{Version | 688 | When a file is managed with a version control system (@pxref{Version |
| 712 | Control}), Emacs does not normally make backups in the usual way for | 689 | Control}), Emacs does not normally make backups in the usual way for |
| @@ -725,28 +702,28 @@ Emacs---the version control system does it. | |||
| 725 | if there isn't already one there. If the value is @code{visit}, Emacs | 702 | if there isn't already one there. If the value is @code{visit}, Emacs |
| 726 | adds a newline at the end of any file that doesn't have one, just | 703 | adds a newline at the end of any file that doesn't have one, just |
| 727 | after it visits the file. (This marks the buffer as modified, and you | 704 | after it visits the file. (This marks the buffer as modified, and you |
| 728 | can undo it.) If the value is @code{visit-save}, that means to add | 705 | can undo it.) If the value is @code{visit-save}, Emacs adds such |
| 729 | newlines both on visiting and on saving. If the value is @code{nil}, | 706 | newlines both on visiting and on saving. If the value is @code{nil}, |
| 730 | Emacs leaves the end of the file unchanged; if it's neither @code{nil} | 707 | Emacs leaves the end of the file unchanged; any other non-@code{nil} |
| 731 | nor @code{t}, Emacs asks you whether to add a newline. The default is | 708 | value means to asks you whether to add a newline. The default is |
| 732 | @code{nil}. | 709 | @code{nil}. |
| 733 | 710 | ||
| 734 | @vindex mode-require-final-newline | 711 | @vindex mode-require-final-newline |
| 735 | Many major modes are designed for specific kinds of files that are | 712 | Some major modes are designed for specific kinds of files that are |
| 736 | always supposed to end in newlines. These major modes set the | 713 | always supposed to end in newlines. Such major modes set the variable |
| 737 | variable @code{require-final-newline} according to | 714 | @code{require-final-newline} to the value of |
| 738 | @code{mode-require-final-newline}. By setting the latter variable, | 715 | @code{mode-require-final-newline}, which defaults to @code{t}. By |
| 739 | you can control how these modes handle final newlines. | 716 | setting the latter variable, you can control how these modes handle |
| 717 | final newlines. | ||
| 740 | 718 | ||
| 741 | @vindex write-region-inhibit-fsync | 719 | @vindex write-region-inhibit-fsync |
| 742 | When Emacs saves a file, it invokes the @code{fsync} system call to | 720 | When Emacs saves a file, it invokes the @code{fsync} system call to |
| 743 | force the data immediately out to disk. This is important for safety | 721 | force the data immediately out to disk. This is important for safety |
| 744 | if the system crashes or in case of power outage. However, it can be | 722 | if the system crashes or in case of power outage. However, it can be |
| 745 | disruptive on laptops using power saving, because it requires the disk | 723 | disruptive on laptops using power saving, as it may force a disk |
| 746 | to spin up each time you save a file. Setting | 724 | spin-up each time you save a file. If you accept an increased risk of |
| 747 | @code{write-region-inhibit-fsync} to a non-@code{nil} value disables | 725 | data loss, you can set @code{write-region-inhibit-fsync} to a |
| 748 | this synchronization. Be careful---this means increased risk of data | 726 | non-@code{nil} value to disable the synchronization. |
| 749 | loss. | ||
| 750 | 727 | ||
| 751 | @node Interlocking | 728 | @node Interlocking |
| 752 | @subsection Protection against Simultaneous Editing | 729 | @subsection Protection against Simultaneous Editing |
| @@ -754,9 +731,9 @@ loss. | |||
| 754 | @cindex file dates | 731 | @cindex file dates |
| 755 | @cindex simultaneous editing | 732 | @cindex simultaneous editing |
| 756 | Simultaneous editing occurs when two users visit the same file, both | 733 | Simultaneous editing occurs when two users visit the same file, both |
| 757 | make changes, and then both save them. If nobody were informed that | 734 | make changes, and then both save them. If nobody is informed that |
| 758 | this was happening, whichever user saved first would later find that his | 735 | this is happening, whichever user saves first would later find that |
| 759 | changes were lost. | 736 | his changes were lost. |
| 760 | 737 | ||
| 761 | On some systems, Emacs notices immediately when the second user starts | 738 | On some systems, Emacs notices immediately when the second user starts |
| 762 | to change the file, and issues an immediate warning. On all systems, | 739 | to change the file, and issues an immediate warning. On all systems, |
| @@ -794,38 +771,28 @@ contents remain unchanged---the modification you were trying to make | |||
| 794 | does not actually take place. | 771 | does not actually take place. |
| 795 | @end table | 772 | @end table |
| 796 | 773 | ||
| 797 | Note that locking works on the basis of a file name; if a file has | ||
| 798 | multiple names, Emacs does not realize that the two names are the same file | ||
| 799 | and cannot prevent two users from editing it simultaneously under different | ||
| 800 | names. However, basing locking on names means that Emacs can interlock the | ||
| 801 | editing of new files that will not really exist until they are saved. | ||
| 802 | |||
| 803 | Some systems are not configured to allow Emacs to make locks, and | ||
| 804 | there are cases where lock files cannot be written. In these cases, | ||
| 805 | Emacs cannot detect trouble in advance, but it still can detect the | ||
| 806 | collision when you try to save a file and overwrite someone else's | ||
| 807 | changes. Every time Emacs saves a buffer, it first checks the | ||
| 808 | last-modification date of the existing file on disk to verify that it | ||
| 809 | has not changed since the file was last visited or saved. If the date | ||
| 810 | does not match, it implies that changes were made in the file in some | ||
| 811 | other way, and these changes are about to be lost if Emacs actually | ||
| 812 | does save. To prevent this, Emacs displays a warning message and asks | ||
| 813 | for confirmation before saving. Occasionally you will know why the | ||
| 814 | file was changed and know that it does not matter; then you can answer | ||
| 815 | @kbd{yes} and proceed. Otherwise, you should cancel the save with | ||
| 816 | @kbd{C-g} and investigate the situation. | ||
| 817 | |||
| 818 | If Emacs or the operating system crashes, this may leave behind lock | 774 | If Emacs or the operating system crashes, this may leave behind lock |
| 819 | files which are stale, so you may occasionally get warnings about | 775 | files which are stale, so you may occasionally get warnings about |
| 820 | spurious collisions. When you determine that the collision is spurious, | 776 | spurious collisions. When you determine that the collision is |
| 821 | just use @kbd{p} to tell Emacs to go ahead anyway. | 777 | spurious, just use @kbd{p} to tell Emacs to go ahead anyway. |
| 822 | 778 | ||
| 823 | The first thing you should do when notified that simultaneous editing | 779 | Note that locking works on the basis of a file name; if a file has |
| 824 | has already taken place is to list the directory with @kbd{C-u C-x C-d} | 780 | multiple names, Emacs does not prevent two users from editing it |
| 825 | (@pxref{Directories}). This shows the file's current author. You | 781 | simultaneously under different names. |
| 826 | should attempt to contact him to warn him not to continue editing. | 782 | |
| 827 | Often the next step is to save the contents of your Emacs buffer under a | 783 | A lock file cannot be written in some circumstances, e.g. if Emacs |
| 828 | different name, and use @code{diff} to compare the two files.@refill | 784 | lacks the system permissions or the system does not support symbolic |
| 785 | links. In these cases, Emacs can still detect the collision when you | ||
| 786 | try to save a file, by checking the file's last-modification date. If | ||
| 787 | the file has changed since the last time Emacs visited or saved it, | ||
| 788 | that implies that changes have been made in some other way, and will | ||
| 789 | be lost if Emacs proceeds with saving. Emacs then displays a warning | ||
| 790 | message and asks for confirmation before saving; answer @kbd{yes} to | ||
| 791 | save, and @kbd{no} or @kbd{C-g} cancel the save. | ||
| 792 | |||
| 793 | If you are notified that simultaneous editing has already taken | ||
| 794 | place, one way to compare the buffer to its file is the @kbd{M-x | ||
| 795 | diff-buffer-with-file} command. @xref{Comparing Files}. | ||
| 829 | 796 | ||
| 830 | @node File Shadowing | 797 | @node File Shadowing |
| 831 | @subsection Shadowing Files | 798 | @subsection Shadowing Files |
| @@ -881,10 +848,10 @@ shadow-define-cluster}. | |||
| 881 | @cindex modification dates | 848 | @cindex modification dates |
| 882 | @cindex locale, date format | 849 | @cindex locale, date format |
| 883 | 850 | ||
| 884 | You can arrange to put a time stamp in a file, so that it will be updated | 851 | You can arrange to put a time stamp in a file, so that it is updated |
| 885 | automatically each time you edit and save the file. The time stamp | 852 | automatically each time you edit and save the file. The time stamp |
| 886 | has to be in the first eight lines of the file, and you should | 853 | must be in the first eight lines of the file, and you should insert it |
| 887 | insert it like this: | 854 | like this: |
| 888 | 855 | ||
| 889 | @example | 856 | @example |
| 890 | Time-stamp: <> | 857 | Time-stamp: <> |
| @@ -898,13 +865,13 @@ Time-stamp: " " | |||
| 898 | @end example | 865 | @end example |
| 899 | 866 | ||
| 900 | @findex time-stamp | 867 | @findex time-stamp |
| 901 | Then add the hook function @code{time-stamp} to the hook | 868 | Then add the function @code{time-stamp} to the hook |
| 902 | @code{before-save-hook}; that hook function will automatically update | 869 | @code{before-save-hook} (@pxref{Hooks}). When you save the file, this |
| 903 | the time stamp, inserting the current date and time when you save the | 870 | function then automatically updates the time stamp with the current |
| 904 | file. You can also use the command @kbd{M-x time-stamp} to update the | 871 | date and time. You can also use the command @kbd{M-x time-stamp} to |
| 905 | time stamp manually. For other customizations, see the Custom group | 872 | update the time stamp manually. For other customizations, see the |
| 906 | @code{time-stamp}. Note that non-numeric fields in the time stamp are | 873 | Custom group @code{time-stamp}. Note that the time stamp is formatted |
| 907 | formatted according to your locale setting (@pxref{Environment}). | 874 | according to your locale setting (@pxref{Environment}). |
| 908 | 875 | ||
| 909 | @node Reverting | 876 | @node Reverting |
| 910 | @section Reverting a Buffer | 877 | @section Reverting a Buffer |
| @@ -912,18 +879,21 @@ formatted according to your locale setting (@pxref{Environment}). | |||
| 912 | @cindex drastic changes | 879 | @cindex drastic changes |
| 913 | @cindex reread a file | 880 | @cindex reread a file |
| 914 | 881 | ||
| 915 | If you have made extensive changes to a file and then change your mind | 882 | If you have made extensive changes to a file-visiting buffer and |
| 916 | about them, you can get rid of them by reading in the previous version | 883 | then change your mind, you can @dfn{revert} the changes and go back to |
| 917 | of the file. To do this, use @kbd{M-x revert-buffer}, which operates on | 884 | the saved version of the file. To do this, type @kbd{M-x |
| 918 | the current buffer. Since reverting a buffer unintentionally could lose | 885 | revert-buffer}. Since reverting unintentionally could lose a lot of |
| 919 | a lot of work, you must confirm this command with @kbd{yes}. | 886 | work, Emacs asks for confirmation first. |
| 920 | 887 | ||
| 921 | @code{revert-buffer} tries to position point in such a way that, if | 888 | The @code{revert-buffer} command tries to position point in such a |
| 922 | the file was edited only slightly, you will be at approximately the | 889 | way that, if the file was edited only slightly, you will be at |
| 923 | same piece of text after reverting as before. However, if you have made | 890 | approximately the same part of the text as before. But if you have |
| 924 | drastic changes, point may wind up in a totally different piece of text. | 891 | made major changes, point may end up in a totally different location. |
| 925 | 892 | ||
| 926 | Reverting marks the buffer as ``not modified''. | 893 | Reverting marks the buffer as ``not modified''. It also clears the |
| 894 | buffer's undo history (@pxref{Undo}). Thus, the reversion cannot be | ||
| 895 | undone---if you change your mind yet again, you can't use the undo | ||
| 896 | commands to bring the reverted changes back. | ||
| 927 | 897 | ||
| 928 | Some kinds of buffers that are not associated with files, such as | 898 | Some kinds of buffers that are not associated with files, such as |
| 929 | Dired buffers, can also be reverted. For them, reverting means | 899 | Dired buffers, can also be reverted. For them, reverting means |
| @@ -950,15 +920,14 @@ discard your changes.) | |||
| 950 | @findex auto-revert-mode | 920 | @findex auto-revert-mode |
| 951 | @findex auto-revert-tail-mode | 921 | @findex auto-revert-tail-mode |
| 952 | @vindex auto-revert-interval | 922 | @vindex auto-revert-interval |
| 953 | 923 | You can also tell Emacs to revert buffers periodically. To do this | |
| 954 | In addition, you can tell Emacs to periodically revert a buffer by | 924 | for a specific buffer, enable the minor mode Auto-Revert mode by |
| 955 | typing @kbd{M-x auto-revert-mode}. This turns on Auto-Revert mode, a | 925 | typing @kbd{M-x auto-revert-mode}. This automatically reverts the |
| 956 | minor mode that makes Emacs automatically revert the current buffer | 926 | current buffer every five seconds; you can change the interval through |
| 957 | every five seconds. You can change this interval through the variable | 927 | the variable @code{auto-revert-interval}. To do the same for all file |
| 958 | @code{auto-revert-interval}. Typing @kbd{M-x global-auto-revert-mode} | 928 | buffers, type @kbd{M-x global-auto-revert-mode} to enable Global |
| 959 | enables Global Auto-Revert mode, which does the same for all file | 929 | Auto-Revert mode. These minor modes do not check or revert remote |
| 960 | buffers. Auto-Revert mode and Global Auto-Revert modes do not check | 930 | files, because that is usually too slow. |
| 961 | or revert remote files, because that is usually too slow. | ||
| 962 | 931 | ||
| 963 | One use of Auto-Revert mode is to ``tail'' a file such as a system | 932 | One use of Auto-Revert mode is to ``tail'' a file such as a system |
| 964 | log, so that changes made to that file by other programs are | 933 | log, so that changes made to that file by other programs are |
| @@ -969,8 +938,9 @@ the end, use Auto-Revert Tail mode instead | |||
| 969 | (@code{auto-revert-tail-mode}). It is more efficient for this. | 938 | (@code{auto-revert-tail-mode}). It is more efficient for this. |
| 970 | Auto-Revert Tail mode works also for remote files. | 939 | Auto-Revert Tail mode works also for remote files. |
| 971 | 940 | ||
| 972 | @xref{VC Mode Line}, for Auto Revert peculiarities in buffers that | 941 | @xref{VC Undo}, for commands to revert to earlier versions of files |
| 973 | visit files under version control. | 942 | under version control. @xref{VC Mode Line}, for Auto Revert |
| 943 | peculiarities when visiting files under version control. | ||
| 974 | 944 | ||
| 975 | @ifnottex | 945 | @ifnottex |
| 976 | @include arevert-xtra.texi | 946 | @include arevert-xtra.texi |
| @@ -1061,40 +1031,41 @@ any auto-save file to go with the new visited name. | |||
| 1061 | @vindex auto-save-default | 1031 | @vindex auto-save-default |
| 1062 | @findex auto-save-mode | 1032 | @findex auto-save-mode |
| 1063 | Each time you visit a file, auto-saving is turned on for that file's | 1033 | Each time you visit a file, auto-saving is turned on for that file's |
| 1064 | buffer if the variable @code{auto-save-default} is non-@code{nil} (but not | 1034 | buffer if the variable @code{auto-save-default} is non-@code{nil} (but |
| 1065 | in batch mode; @pxref{Entering Emacs}). The default for this variable is | 1035 | not in batch mode; @pxref{Initial Options}). The default for this |
| 1066 | @code{t}, so auto-saving is the usual practice for file-visiting buffers. | 1036 | variable is @code{t}, so auto-saving is the usual practice for |
| 1067 | Auto-saving can be turned on or off for any existing buffer with the | 1037 | file-visiting buffers. To toggle auto-saving in the current buffer, |
| 1068 | command @kbd{M-x auto-save-mode}. Like other minor mode commands, @kbd{M-x | 1038 | type @kbd{M-x auto-save-mode}. Auto Save mode acts as a buffer-local |
| 1069 | auto-save-mode} turns auto-saving on with a positive argument, off with a | 1039 | minor mode (@pxref{Minor Modes}). |
| 1070 | zero or negative argument; with no argument, it toggles. | ||
| 1071 | 1040 | ||
| 1072 | @vindex auto-save-interval | 1041 | @vindex auto-save-interval |
| 1073 | Emacs does auto-saving periodically based on counting how many characters | 1042 | Emacs auto-saves periodically based on how many characters you have |
| 1074 | you have typed since the last time auto-saving was done. The variable | 1043 | typed since the last auto-save. The variable |
| 1075 | @code{auto-save-interval} specifies how many characters there are between | 1044 | @code{auto-save-interval} specifies how many characters there are |
| 1076 | auto-saves. By default, it is 300. Emacs doesn't accept values that are | 1045 | between auto-saves. By default, it is 300. Emacs doesn't accept |
| 1077 | too small: if you customize @code{auto-save-interval} to a value less | 1046 | values that are too small: if you customize @code{auto-save-interval} |
| 1078 | than 20, Emacs will behave as if the value is 20. | 1047 | to a value less than 20, Emacs will behave as if the value is 20. |
| 1079 | 1048 | ||
| 1080 | @vindex auto-save-timeout | 1049 | @vindex auto-save-timeout |
| 1081 | Auto-saving also takes place when you stop typing for a while. The | 1050 | Auto-saving also takes place when you stop typing for a while. By |
| 1082 | variable @code{auto-save-timeout} says how many seconds Emacs should | 1051 | default, it does this after 30 seconds of idleness (at this time, |
| 1083 | wait before it does an auto save (and perhaps also a garbage | 1052 | Emacs may also perform garbage collection; @pxref{Garbage |
| 1084 | collection). (The actual time period is longer if the current buffer is | 1053 | Collection,,, elisp, The Emacs Lisp Reference Manual}). To change |
| 1085 | long; this is a heuristic which aims to keep out of your way when you | 1054 | this interval, customize the variable @code{auto-save-timeout}. The |
| 1086 | are editing long buffers, in which auto-save takes an appreciable amount | 1055 | actual time period is longer if the current buffer is long; this is a |
| 1087 | of time.) Auto-saving during idle periods accomplishes two things: | 1056 | heuristic which aims to keep out of your way when you are editing long |
| 1088 | first, it makes sure all your work is saved if you go away from the | 1057 | buffers, in which auto-save takes an appreciable amount of time. |
| 1089 | terminal for a while; second, it may avoid some auto-saving while you | 1058 | Auto-saving during idle periods accomplishes two things: first, it |
| 1090 | are actually typing. | 1059 | makes sure all your work is saved if you go away from the terminal for |
| 1060 | a while; second, it may avoid some auto-saving while you are actually | ||
| 1061 | typing. | ||
| 1091 | 1062 | ||
| 1092 | Emacs also does auto-saving whenever it gets a fatal error. This | 1063 | Emacs also does auto-saving whenever it gets a fatal error. This |
| 1093 | includes killing the Emacs job with a shell command such as @samp{kill | 1064 | includes killing the Emacs job with a shell command such as @samp{kill |
| 1094 | %emacs}, or disconnecting a phone line or network connection. | 1065 | %emacs}, or disconnecting a phone line or network connection. |
| 1095 | 1066 | ||
| 1096 | @findex do-auto-save | 1067 | @findex do-auto-save |
| 1097 | You can request an auto-save explicitly with the command @kbd{M-x | 1068 | You can perform an auto-save explicitly with the command @kbd{M-x |
| 1098 | do-auto-save}. | 1069 | do-auto-save}. |
| 1099 | 1070 | ||
| 1100 | @node Recover | 1071 | @node Recover |
| @@ -1138,13 +1109,11 @@ this---saving them---updates the files themselves. | |||
| 1138 | 1109 | ||
| 1139 | @vindex auto-save-list-file-prefix | 1110 | @vindex auto-save-list-file-prefix |
| 1140 | Emacs records information about interrupted sessions for later | 1111 | Emacs records information about interrupted sessions for later |
| 1141 | recovery in files named | 1112 | recovery in files named @file{.saves-@var{pid}-@var{hostname}} in the |
| 1142 | @file{~/.emacs.d/auto-save-list/.saves-@var{pid}-@var{hostname}}. The | 1113 | directory @file{~/.emacs.d/auto-save-list/}. This directory is |
| 1143 | directory used, @file{~/.emacs.d/auto-save-list/}, is determined by | 1114 | determined by the variable @code{auto-save-list-file-prefix}. If you |
| 1144 | the variable @code{auto-save-list-file-prefix}. You can record | 1115 | set @code{auto-save-list-file-prefix} to @code{nil}, sessions are not |
| 1145 | sessions in a different place by customizing that variable. If you | 1116 | recorded for recovery. |
| 1146 | set @code{auto-save-list-file-prefix} to @code{nil} in your | ||
| 1147 | @file{.emacs} file, sessions are not recorded for recovery. | ||
| 1148 | 1117 | ||
| 1149 | @node File Aliases | 1118 | @node File Aliases |
| 1150 | @section File Name Aliases | 1119 | @section File Name Aliases |
| @@ -1292,8 +1261,8 @@ buffer named @samp{*diff*}. This works by running the @command{diff} | |||
| 1292 | program, using options taken from the variable @code{diff-switches}. | 1261 | program, using options taken from the variable @code{diff-switches}. |
| 1293 | The value of @code{diff-switches} should be a string; the default is | 1262 | The value of @code{diff-switches} should be a string; the default is |
| 1294 | @code{"-c"} to specify a context diff. @xref{Top,, Diff, diff, | 1263 | @code{"-c"} to specify a context diff. @xref{Top,, Diff, diff, |
| 1295 | Comparing and Merging Files}, for more information about | 1264 | Comparing and Merging Files}, for more information about the |
| 1296 | @command{diff} output formats. | 1265 | @command{diff} program. |
| 1297 | 1266 | ||
| 1298 | The output of the @code{diff} command is shown using a major mode | 1267 | The output of the @code{diff} command is shown using a major mode |
| 1299 | called Diff mode. @xref{Diff Mode}. | 1268 | called Diff mode. @xref{Diff Mode}. |
| @@ -1361,11 +1330,10 @@ merging files. | |||
| 1361 | @cindex patches, editing | 1330 | @cindex patches, editing |
| 1362 | 1331 | ||
| 1363 | Diff mode is a major mode used for the output of @kbd{M-x diff} and | 1332 | Diff mode is a major mode used for the output of @kbd{M-x diff} and |
| 1364 | other similar commands, as well as the output of the @command{diff} | 1333 | other similar commands. This kind of output is called a @dfn{patch}, |
| 1365 | program. This kind of output is called a @dfn{patch}, because it can | 1334 | because it can be passed to the @command{patch} command to |
| 1366 | be passed to the @command{patch} command to automatically apply the | 1335 | automatically apply the specified changes. To select Diff mode |
| 1367 | specified changes. To select Diff mode manually, type @kbd{M-x | 1336 | manually, type @kbd{M-x diff-mode}. |
| 1368 | diff-mode}. | ||
| 1369 | 1337 | ||
| 1370 | @cindex hunk, diff | 1338 | @cindex hunk, diff |
| 1371 | The changes specified in a patch are grouped into @dfn{hunks}, which | 1339 | The changes specified in a patch are grouped into @dfn{hunks}, which |
| @@ -1659,21 +1627,18 @@ Tar mode is used also for compressed archives---files with extensions | |||
| 1659 | The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file | 1627 | The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file |
| 1660 | into its own buffer. You can edit it there, and if you save the | 1628 | into its own buffer. You can edit it there, and if you save the |
| 1661 | buffer, the edited version will replace the version in the Tar buffer. | 1629 | buffer, the edited version will replace the version in the Tar buffer. |
| 1662 | @kbd{v} extracts a file into a buffer in View mode (@pxref{View | 1630 | Clicking with the mouse on the file name in the Tar buffer does |
| 1663 | Mode}). @kbd{o} extracts the file and displays it in another window, | 1631 | likewise. @kbd{v} extracts a file into a buffer in View mode |
| 1664 | so you could edit the file and operate on the archive simultaneously. | 1632 | (@pxref{View Mode}). @kbd{o} extracts the file and displays it in |
| 1665 | @kbd{d} marks a file for deletion when you later use @kbd{x}, and | 1633 | another window, so you could edit the file and operate on the archive |
| 1634 | simultaneously. | ||
| 1635 | |||
| 1636 | @kbd{d} marks a file for deletion when you later use @kbd{x}, and | ||
| 1666 | @kbd{u} unmarks a file, as in Dired. @kbd{C} copies a file from the | 1637 | @kbd{u} unmarks a file, as in Dired. @kbd{C} copies a file from the |
| 1667 | archive to disk and @kbd{R} renames a file within the archive. | 1638 | archive to disk and @kbd{R} renames a file within the archive. |
| 1668 | @kbd{g} reverts the buffer from the archive on disk. | 1639 | @kbd{g} reverts the buffer from the archive on disk. The keys |
| 1669 | 1640 | @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission bits, | |
| 1670 | The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission | 1641 | group, and owner, respectively. |
| 1671 | bits, group, and owner, respectively. | ||
| 1672 | |||
| 1673 | If your display supports colors and the mouse, moving the mouse | ||
| 1674 | pointer across a file name highlights that file name, indicating that | ||
| 1675 | you can click on it. Clicking @kbd{Mouse-2} on the highlighted file | ||
| 1676 | name extracts the file into a buffer and displays that buffer. | ||
| 1677 | 1642 | ||
| 1678 | Saving the Tar buffer writes a new version of the archive to disk with | 1643 | Saving the Tar buffer writes a new version of the archive to disk with |
| 1679 | the changes you made to the components. | 1644 | the changes you made to the components. |
| @@ -1690,19 +1655,20 @@ requires the appropriate uncompression program. | |||
| 1690 | @cindex @code{zip} | 1655 | @cindex @code{zip} |
| 1691 | @cindex @code{lzh} | 1656 | @cindex @code{lzh} |
| 1692 | @cindex @code{zoo} | 1657 | @cindex @code{zoo} |
| 1658 | @cindex @code{7z} | ||
| 1693 | @pindex arc | 1659 | @pindex arc |
| 1694 | @pindex jar | 1660 | @pindex jar |
| 1695 | @pindex zip | 1661 | @pindex zip |
| 1696 | @pindex rar | 1662 | @pindex rar |
| 1697 | @pindex lzh | 1663 | @pindex lzh |
| 1698 | @pindex zoo | 1664 | @pindex zoo |
| 1665 | @pindex 7z | ||
| 1699 | @cindex Java class archives | 1666 | @cindex Java class archives |
| 1700 | @cindex unzip archives | 1667 | @cindex unzip archives |
| 1701 | A separate but similar Archive mode is used for archives produced by | 1668 | A separate but similar Archive mode is used for @code{arc}, |
| 1702 | the programs @code{arc}, @code{jar}, @code{lzh}, @code{zip}, | 1669 | @code{jar}, @code{lzh}, @code{zip}, @code{rar}, @code{7z}, and |
| 1703 | @code{rar}, and @code{zoo}, which have extensions corresponding to the | 1670 | @code{zoo} archives, as well as @code{exe} files that are |
| 1704 | program names. Archive mode also works for those @code{exe} files | 1671 | self-extracting executables. |
| 1705 | that are self-extracting executables. | ||
| 1706 | 1672 | ||
| 1707 | The key bindings of Archive mode are similar to those in Tar mode, | 1673 | The key bindings of Archive mode are similar to those in Tar mode, |
| 1708 | with the addition of the @kbd{m} key which marks a file for subsequent | 1674 | with the addition of the @kbd{m} key which marks a file for subsequent |
| @@ -1712,11 +1678,11 @@ information, for those archive types where it won't fit in a single | |||
| 1712 | line. Operations such as renaming a subfile, or changing its mode or | 1678 | line. Operations such as renaming a subfile, or changing its mode or |
| 1713 | owner, are supported only for some of the archive formats. | 1679 | owner, are supported only for some of the archive formats. |
| 1714 | 1680 | ||
| 1715 | Unlike Tar mode, Archive mode runs the archiving program to unpack | 1681 | Unlike Tar mode, Archive mode runs the archiving programs to unpack |
| 1716 | and repack archives. Details of the program names and their options | 1682 | and repack archives. However, you don't need these programs to look |
| 1717 | can be set in the @samp{Archive} Customize group. However, you don't | 1683 | at the archive table of contents, only to extract or manipulate the |
| 1718 | need these programs to look at the archive table of contents, only to | 1684 | subfiles in the archive. Details of the program names and their |
| 1719 | extract or manipulate the subfiles in the archive. | 1685 | options can be set in the @samp{Archive} Customize group. |
| 1720 | 1686 | ||
| 1721 | @node Remote Files | 1687 | @node Remote Files |
| 1722 | @section Remote Files | 1688 | @section Remote Files |
| @@ -1748,16 +1714,14 @@ Emacs chooses the method as follows: | |||
| 1748 | 1714 | ||
| 1749 | @enumerate | 1715 | @enumerate |
| 1750 | @item | 1716 | @item |
| 1751 | If the host name starts with @samp{ftp.} (with dot), then Emacs uses | 1717 | If the host name starts with @samp{ftp.} (with dot), Emacs uses FTP. |
| 1752 | FTP. | ||
| 1753 | @item | 1718 | @item |
| 1754 | If the user name is @samp{ftp} or @samp{anonymous}, then Emacs uses | 1719 | If the user name is @samp{ftp} or @samp{anonymous}, Emacs uses FTP. |
| 1755 | FTP. | ||
| 1756 | @item | 1720 | @item |
| 1757 | If the variable @code{tramp-default-method} is set to @samp{ftp}, | 1721 | If the variable @code{tramp-default-method} is set to @samp{ftp}, |
| 1758 | then Emacs uses FTP. | 1722 | Emacs uses FTP. |
| 1759 | @item | 1723 | @item |
| 1760 | If @command{ssh-agent} is running, then Emacs uses @command{scp}. | 1724 | If @command{ssh-agent} is running, Emacs uses @command{scp}. |
| 1761 | @item | 1725 | @item |
| 1762 | Otherwise, Emacs uses @command{ssh}. | 1726 | Otherwise, Emacs uses @command{ssh}. |
| 1763 | @end enumerate | 1727 | @end enumerate |
| @@ -1769,32 +1733,31 @@ variable @code{tramp-mode} to @code{nil}. You can turn off the | |||
| 1769 | feature in individual cases by quoting the file name with @samp{/:} | 1733 | feature in individual cases by quoting the file name with @samp{/:} |
| 1770 | (@pxref{Quoted File Names}). | 1734 | (@pxref{Quoted File Names}). |
| 1771 | 1735 | ||
| 1736 | @cindex ange-ftp | ||
| 1772 | Remote file access through FTP is handled by the Ange-FTP package, which | 1737 | Remote file access through FTP is handled by the Ange-FTP package, which |
| 1773 | is documented in the following. Remote file access through the other | 1738 | is documented in the following. Remote file access through the other |
| 1774 | methods is handled by the Tramp package, which has its own manual. | 1739 | methods is handled by the Tramp package, which has its own manual. |
| 1775 | @xref{Top, The Tramp Manual,, tramp, The Tramp Manual}. | 1740 | @xref{Top, The Tramp Manual,, tramp, The Tramp Manual}. |
| 1776 | 1741 | ||
| 1777 | When the Ange-FTP package is used, Emacs logs in through FTP using | 1742 | @vindex ange-ftp-default-user |
| 1778 | your user name or the name @var{user}. It may ask you for a password | 1743 | @cindex user name for remote file access |
| 1779 | from time to time (@pxref{Passwords}); this is used for logging in on | 1744 | When the Ange-FTP package is used, Emacs logs in through FTP using |
| 1780 | @var{host}. The form using @var{port} allows you to access servers | 1745 | the name @var{user}, if that is specified in the remote file name. If |
| 1781 | running on a non-default TCP port. | 1746 | @var{user} is unspecified, Emacs logs in using your user name on the |
| 1747 | local system; but if you set the variable @code{ange-ftp-default-user} | ||
| 1748 | to a string, that string is used instead. When logging in, Emacs may | ||
| 1749 | also ask for a password. | ||
| 1782 | 1750 | ||
| 1783 | @cindex backups for remote files | 1751 | @cindex backups for remote files |
| 1784 | @vindex ange-ftp-make-backup-files | 1752 | @vindex ange-ftp-make-backup-files |
| 1785 | If you want to disable backups for remote files, set the variable | 1753 | For performance reasons, Emacs does not make backup files for files |
| 1786 | @code{ange-ftp-make-backup-files} to @code{nil}. | 1754 | accessed via FTP by default. To make it do so, change the variable |
| 1755 | @code{ange-ftp-make-backup-files} to a non-@code{nil} value. | ||
| 1787 | 1756 | ||
| 1788 | By default, the auto-save files (@pxref{Auto Save Files}) for remote | 1757 | By default, auto-save files for remote files are made in the |
| 1789 | files are made in the temporary file directory on the local machine. | 1758 | temporary file directory on the local machine, as specified by the |
| 1790 | This is achieved using the variable @code{auto-save-file-name-transforms}. | 1759 | variable @code{auto-save-file-name-transforms}. @xref{Auto Save |
| 1791 | 1760 | Files}. | |
| 1792 | @cindex ange-ftp | ||
| 1793 | @vindex ange-ftp-default-user | ||
| 1794 | @cindex user name for remote file access | ||
| 1795 | Normally, if you do not specify a user name in a remote file name, | ||
| 1796 | that means to use your own user name. But if you set the variable | ||
| 1797 | @code{ange-ftp-default-user} to a string, that string is used instead. | ||
| 1798 | 1761 | ||
| 1799 | @cindex anonymous FTP | 1762 | @cindex anonymous FTP |
| 1800 | @vindex ange-ftp-generate-anonymous-password | 1763 | @vindex ange-ftp-generate-anonymous-password |
| @@ -1950,10 +1913,10 @@ images as thumbnails. | |||
| 1950 | @findex filesets-init | 1913 | @findex filesets-init |
| 1951 | If you regularly edit a certain group of files, you can define them | 1914 | If you regularly edit a certain group of files, you can define them |
| 1952 | as a @dfn{fileset}. This lets you perform certain operations, such as | 1915 | as a @dfn{fileset}. This lets you perform certain operations, such as |
| 1953 | visiting, @code{query-replace}, and shell commands on all the files | 1916 | visiting, @code{query-replace}, and shell commands on all the files at |
| 1954 | at once. To make use of filesets, you must first add the expression | 1917 | once. To make use of filesets, you must first add the expression |
| 1955 | @code{(filesets-init)} to your @file{.emacs} file (@pxref{Init File}). | 1918 | @code{(filesets-init)} to your init file (@pxref{Init File}). This |
| 1956 | This adds a @samp{Filesets} menu to the menu bar. | 1919 | adds a @samp{Filesets} menu to the menu bar. |
| 1957 | 1920 | ||
| 1958 | @findex filesets-add-buffer | 1921 | @findex filesets-add-buffer |
| 1959 | @findex filesets-remove-buffer | 1922 | @findex filesets-remove-buffer |
| @@ -1980,7 +1943,7 @@ files in a fileset, and @kbd{M-x filesets-close} to close them. Use | |||
| 1980 | a fileset. These commands are also available from the @samp{Filesets} | 1943 | a fileset. These commands are also available from the @samp{Filesets} |
| 1981 | menu, where each existing fileset is represented by a submenu. | 1944 | menu, where each existing fileset is represented by a submenu. |
| 1982 | 1945 | ||
| 1983 | Emacs uses the concept of a fileset elsewhere @pxref{Version | 1946 | @xref{Version Control}, for a different concept of ``filesets'': |
| 1984 | Control} to describe sets of files to be treated as a group for | 1947 | groups of files bundled together for version control operations. |
| 1985 | purposes of version control operations. Those filesets are unnamed | 1948 | Filesets of that type are unnamed, and do not persist across Emacs |
| 1986 | and do not persist across Emacs sessions. | 1949 | sessions. |
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index a85edf101e5..c024d428511 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi | |||
| @@ -70,7 +70,7 @@ meanings for it, but they all support @key{F1} for help.) | |||
| 70 | * Package Keywords:: Finding Lisp libraries by keywords (topics). | 70 | * Package Keywords:: Finding Lisp libraries by keywords (topics). |
| 71 | * Language Help:: Help relating to international language support. | 71 | * Language Help:: Help relating to international language support. |
| 72 | * Misc Help:: Other help commands. | 72 | * Misc Help:: Other help commands. |
| 73 | * Help Files:: Commands to display auxilliary help files. | 73 | * Help Files:: Commands to display auxiliary help files. |
| 74 | * Help Echo:: Help on active text and tooltips (`balloon help'). | 74 | * Help Echo:: Help on active text and tooltips (`balloon help'). |
| 75 | @end menu | 75 | @end menu |
| 76 | 76 | ||
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 8689e9c8324..6237b00c2ee 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi | |||
| @@ -736,7 +736,7 @@ insert rectangles, and commands to make blank rectangles. | |||
| 736 | k} (@code{kill-rectangle}) to remove the text and and save it as the | 736 | k} (@code{kill-rectangle}) to remove the text and and save it as the |
| 737 | @dfn{last killed rectangle}. In both cases, erasing the | 737 | @dfn{last killed rectangle}. In both cases, erasing the |
| 738 | region-rectangle is like erasing the specified text on each line of | 738 | region-rectangle is like erasing the specified text on each line of |
| 739 | the rectange; if there is any following text on the line, it moves | 739 | the rectangle; if there is any following text on the line, it moves |
| 740 | backwards to fill the gap. | 740 | backwards to fill the gap. |
| 741 | 741 | ||
| 742 | ``Killing'' a rectangle is not killing in the usual sense; the | 742 | ``Killing'' a rectangle is not killing in the usual sense; the |
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index 14d4c678085..fcc31e30988 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi | |||
| @@ -189,7 +189,7 @@ is sometimes useful to have this information. | |||
| 189 | 189 | ||
| 190 | @var{cs} describes the character set of the text in the buffer | 190 | @var{cs} describes the character set of the text in the buffer |
| 191 | (@pxref{Coding Systems}). If it is a dash (@samp{-}), that indicates | 191 | (@pxref{Coding Systems}). If it is a dash (@samp{-}), that indicates |
| 192 | no special character set handling (with the possible expection of | 192 | no special character set handling (with the possible exception of |
| 193 | end-of-line conventions, described in the next paragraph). @samp{=} | 193 | end-of-line conventions, described in the next paragraph). @samp{=} |
| 194 | means no conversion whatsoever, and is usually used for files | 194 | means no conversion whatsoever, and is usually used for files |
| 195 | containing non-textual data. Other characters represent various | 195 | containing non-textual data. Other characters represent various |
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 8e77de0bbb4..31b5aa37f83 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -371,7 +371,7 @@ wrap around, going from the last page to the first page or vice versa. | |||
| 371 | When the current match is on a history element, that history element | 371 | When the current match is on a history element, that history element |
| 372 | is pulled into the minibuffer. If you exit the incremental search | 372 | is pulled into the minibuffer. If you exit the incremental search |
| 373 | normally (e.g. by typing @key{RET}), it remains in the minibuffer | 373 | normally (e.g. by typing @key{RET}), it remains in the minibuffer |
| 374 | afterwards. Cancelling the search, with @kbd{C-g}, restores the | 374 | afterwards. Canceling the search, with @kbd{C-g}, restores the |
| 375 | contents of the minibuffer when you began the search. | 375 | contents of the minibuffer when you began the search. |
| 376 | 376 | ||
| 377 | @node Nonincremental Search | 377 | @node Nonincremental Search |
| @@ -272,7 +272,7 @@ context in their return values. | |||
| 272 | 272 | ||
| 273 | *** The new functions file-selinux-context and set-file-selinux-context | 273 | *** The new functions file-selinux-context and set-file-selinux-context |
| 274 | get and set the SELinux context of a file. | 274 | get and set the SELinux context of a file. |
| 275 | 275 | --- | |
| 276 | *** Tramp offers handlers for file-selinux-context and set-file-selinux-context | 276 | *** Tramp offers handlers for file-selinux-context and set-file-selinux-context |
| 277 | for remote machines which support SELinux. | 277 | for remote machines which support SELinux. |
| 278 | 278 | ||
| @@ -460,6 +460,7 @@ isearch-yank-kill. | |||
| 460 | *** `count-lines-region' is now an alias for `count-words-region', | 460 | *** `count-lines-region' is now an alias for `count-words-region', |
| 461 | bound to M-=, which shows the number of lines, words, and characters. | 461 | bound to M-=, which shows the number of lines, words, and characters. |
| 462 | 462 | ||
| 463 | +++ | ||
| 463 | ** The default value of `backup-by-copying-when-mismatch' is now t. | 464 | ** The default value of `backup-by-copying-when-mismatch' is now t. |
| 464 | 465 | ||
| 465 | +++ | 466 | +++ |
| @@ -560,6 +561,7 @@ updates later on, and Emacs appears to be unable to keep up. | |||
| 560 | 561 | ||
| 561 | * Changes in Specialized Modes and Packages in Emacs 24.1 | 562 | * Changes in Specialized Modes and Packages in Emacs 24.1 |
| 562 | 563 | ||
| 564 | +++ | ||
| 563 | ** Archive Mode has basic support for browsing and updating 7z archives. | 565 | ** Archive Mode has basic support for browsing and updating 7z archives. |
| 564 | 566 | ||
| 565 | ** browse-url has a new variable `browse-url-mailto-function' | 567 | ** browse-url has a new variable `browse-url-mailto-function' |
| @@ -804,12 +806,12 @@ additional details about each column. | |||
| 804 | *** latex-electric-env-pair-mode keeps \begin..\end matched on the fly. | 806 | *** latex-electric-env-pair-mode keeps \begin..\end matched on the fly. |
| 805 | 807 | ||
| 806 | ** Tramp | 808 | ** Tramp |
| 807 | 809 | --- | |
| 808 | *** There exists a new inline access method "ksu" (kerberized su). | 810 | *** There exists a new inline access method "ksu" (kerberized su). |
| 809 | 811 | --- | |
| 810 | *** The following access methods are discontinued: "ssh1_old", | 812 | *** The following access methods are discontinued: "ssh1_old", |
| 811 | "ssh2_old", "scp1_old", "scp2_old", "imap", "imaps" and "fish". | 813 | "ssh2_old", "scp1_old", "scp2_old", "imap", "imaps" and "fish". |
| 812 | 814 | --- | |
| 813 | *** The option `ange-ftp-binary-file-name-regexp' has changed its | 815 | *** The option `ange-ftp-binary-file-name-regexp' has changed its |
| 814 | default value to "". | 816 | default value to "". |
| 815 | 817 | ||