diff options
| author | Dave Love | 2000-04-09 17:28:38 +0000 |
|---|---|---|
| committer | Dave Love | 2000-04-09 17:28:38 +0000 |
| commit | 9a98ef18f571f20b6131cbd18708b07962ff39f9 (patch) | |
| tree | 602bd4efa77d5d002994b150963053abbc7f0e57 | |
| parent | 176256a10cde5deb76b61ed42b89508084aae19a (diff) | |
| download | emacs-9a98ef18f571f20b6131cbd18708b07962ff39f9.tar.gz emacs-9a98ef18f571f20b6131cbd18708b07962ff39f9.zip | |
(Backup): backup-enable-predicate.
(Backup Names): make-backup-file-name-function, backup-directory-alist.
(File Conveniences): New (needs work).
| -rw-r--r-- | man/files.texi | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/man/files.texi b/man/files.texi index 2dabe05197c..f9ca68d3008 100644 --- a/man/files.texi +++ b/man/files.texi | |||
| @@ -34,6 +34,7 @@ on file directories. | |||
| 34 | * File Archives:: Operating on tar, zip, jar etc. archive files. | 34 | * File Archives:: Operating on tar, zip, jar etc. archive files. |
| 35 | * Remote Files:: Accessing files on other sites. | 35 | * Remote Files:: Accessing files on other sites. |
| 36 | * Quoted File Names:: Quoting special characters in file names. | 36 | * Quoted File Names:: Quoting special characters in file names. |
| 37 | * File Conveniences:: Convenience Features for Finding Files. | ||
| 37 | @end menu | 38 | @end menu |
| 38 | 39 | ||
| 39 | @node File Names | 40 | @node File Names |
| @@ -454,8 +455,12 @@ to make backup files. By default, it is @code{nil}, since backup files | |||
| 454 | are redundant when you store all the previous versions in a version | 455 | are redundant when you store all the previous versions in a version |
| 455 | control system. @xref{VC Workfile Handling}. | 456 | control system. @xref{VC Workfile Handling}. |
| 456 | 457 | ||
| 458 | @vindex backup-enable-predicate | ||
| 459 | @vindex temporary-file-directory | ||
| 460 | @vindex small-temporary-file-directory | ||
| 457 | The default value of the @code{backup-enable-predicate} variable | 461 | The default value of the @code{backup-enable-predicate} variable |
| 458 | prevents backup files being written for files in @file{/tmp}. | 462 | prevents backup files being written for files in the directories named |
| 463 | by @code{temporary-file-directory} or @code{small-temporary-file-directory}. | ||
| 459 | 464 | ||
| 460 | At your option, Emacs can keep either a single backup file or a series of | 465 | At your option, Emacs can keep either a single backup file or a series of |
| 461 | numbered backup files for each file that you edit. | 466 | numbered backup files for each file that you edit. |
| @@ -487,15 +492,31 @@ newly saved contents, if you save again. | |||
| 487 | @subsubsection Single or Numbered Backups | 492 | @subsubsection Single or Numbered Backups |
| 488 | 493 | ||
| 489 | If you choose to have a single backup file (this is the default), | 494 | If you choose to have a single backup file (this is the default), |
| 490 | the backup file's name is constructed by appending @samp{~} to the | 495 | the backup file's name is normally constructed by appending @samp{~} to the |
| 491 | file name being edited; thus, the backup file for @file{eval.c} would | 496 | file name being edited; thus, the backup file for @file{eval.c} would |
| 492 | be @file{eval.c~}. | 497 | be @file{eval.c~}. |
| 493 | 498 | ||
| 499 | @vindex make-backup-file-name-function | ||
| 500 | @vindex backup-directory-alist | ||
| 501 | You can change this behaviour by defining the variable | ||
| 502 | @code{make-backup-file-name-function} to a suitable function. | ||
| 503 | Alternatively you can customize the variable | ||
| 504 | @var{backup-directory-alist} to specify that files matching certain | ||
| 505 | patterns should be backed up in specific directories. A typical use is | ||
| 506 | to add an element @code{("." . @var{dir})} to make all backups in the | ||
| 507 | directory with absolute name @var{dir}; the names will be mangled to | ||
| 508 | prevent clashes between files with the same names originating in | ||
| 509 | different directories. Alternatively, adding, say, @code{("." ".~")} | ||
| 510 | would make backups in the invisible sub-directory @file{.~} of the | ||
| 511 | original file's directory. The directories are created if necessary | ||
| 512 | when the backup is made. | ||
| 513 | |||
| 494 | If you choose to have a series of numbered backup files, backup file | 514 | If you choose to have a series of numbered backup files, backup file |
| 495 | names are made by appending @samp{.~}, the number, and another @samp{~} to | 515 | names are made by appending @samp{.~}, the number, and another @samp{~} to |
| 496 | the original file name. Thus, the backup files of @file{eval.c} would be | 516 | the original file name. Thus, the backup files of @file{eval.c} would be |
| 497 | called @file{eval.c.~1~}, @file{eval.c.~2~}, and so on, through names | 517 | called @file{eval.c.~1~}, @file{eval.c.~2~}, and so on, through names |
| 498 | like @file{eval.c.~259~} and beyond. | 518 | like @file{eval.c.~259~} and beyond. @code{backup-directory-alist} can |
| 519 | be used to control their location as for single backups. | ||
| 499 | 520 | ||
| 500 | If protection stops you from writing backup files under the usual names, | 521 | If protection stops you from writing backup files under the usual names, |
| 501 | the backup file is written as @file{%backup%~} in your home directory. | 522 | the backup file is written as @file{%backup%~} in your home directory. |
| @@ -2500,3 +2521,29 @@ themselves. For example, if the only file name in @file{/tmp} that | |||
| 2500 | starts with @samp{foo} and ends with @samp{bar} is @file{foo*bar}, then | 2521 | starts with @samp{foo} and ends with @samp{bar} is @file{foo*bar}, then |
| 2501 | specifying @file{/tmp/foo*bar} will visit just @file{/tmp/foo*bar}. | 2522 | specifying @file{/tmp/foo*bar} will visit just @file{/tmp/foo*bar}. |
| 2502 | Another way is to specify @file{/tmp/foo[*]bar}. | 2523 | Another way is to specify @file{/tmp/foo[*]bar}. |
| 2524 | |||
| 2525 | @node File Conveniences | ||
| 2526 | @section Convenience Features for Finding Files | ||
| 2527 | |||
| 2528 | @findex recentf-mode | ||
| 2529 | @vindex recentf-mode | ||
| 2530 | @findex recentf-save-list | ||
| 2531 | @findex recentf-edit-list | ||
| 2532 | The command @kbd{M-x recentf-mode} or the Customize option of the same | ||
| 2533 | name adds to the Files menu a submenu containing a list of recently | ||
| 2534 | opened files. @kbd{recentf-save-list} saves the current file list to a | ||
| 2535 | file and @kbd{recentf-edit-list} edits it. | ||
| 2536 | |||
| 2537 | @findex ff-find-other-file | ||
| 2538 | @vindex ff-other-file-alist | ||
| 2539 | The command @kbd{ff-find-other-file} finds a file related to the one | ||
| 2540 | visited by the current buffer, based on customizable patterns. | ||
| 2541 | Typically this will be the header file corresponding to a C/C++ source | ||
| 2542 | file, or vice versa. The patterns describing the corresponding files | ||
| 2543 | are customizable via @code{ff-other-file-alist}. | ||
| 2544 | |||
| 2545 | @c The Shadowfile package provides automatic file copying, allowing you to | ||
| 2546 | @c keep identical copies of files in more than one place---possibly on | ||
| 2547 | @c different machines. When you save a file, it checks whether it is on | ||
| 2548 | @c the list of files with `shadows', and if so, it tries to copy it when | ||
| 2549 | @c you exit emacs (or use the @kbd{M-x shadow-copy-files} command). | ||