aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-04-09 17:28:38 +0000
committerDave Love2000-04-09 17:28:38 +0000
commit9a98ef18f571f20b6131cbd18708b07962ff39f9 (patch)
tree602bd4efa77d5d002994b150963053abbc7f0e57
parent176256a10cde5deb76b61ed42b89508084aae19a (diff)
downloademacs-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.texi53
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
454are redundant when you store all the previous versions in a version 455are redundant when you store all the previous versions in a version
455control system. @xref{VC Workfile Handling}. 456control 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
458prevents backup files being written for files in @file{/tmp}. 462prevents backup files being written for files in the directories named
463by @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
461numbered backup files for each file that you edit. 466numbered 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),
490the backup file's name is constructed by appending @samp{~} to the 495the backup file's name is normally constructed by appending @samp{~} to the
491file name being edited; thus, the backup file for @file{eval.c} would 496file name being edited; thus, the backup file for @file{eval.c} would
492be @file{eval.c~}. 497be @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.
503Alternatively you can customize the variable
504@var{backup-directory-alist} to specify that files matching certain
505patterns should be backed up in specific directories. A typical use is
506to add an element @code{("." . @var{dir})} to make all backups in the
507directory with absolute name @var{dir}; the names will be mangled to
508prevent clashes between files with the same names originating in
509different directories. Alternatively, adding, say, @code{("." ".~")}
510would make backups in the invisible sub-directory @file{.~} of the
511original file's directory. The directories are created if necessary
512when 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
495names are made by appending @samp{.~}, the number, and another @samp{~} to 515names are made by appending @samp{.~}, the number, and another @samp{~} to
496the original file name. Thus, the backup files of @file{eval.c} would be 516the original file name. Thus, the backup files of @file{eval.c} would be
497called @file{eval.c.~1~}, @file{eval.c.~2~}, and so on, through names 517called @file{eval.c.~1~}, @file{eval.c.~2~}, and so on, through names
498like @file{eval.c.~259~} and beyond. 518like @file{eval.c.~259~} and beyond. @code{backup-directory-alist} can
519be 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,
501the backup file is written as @file{%backup%~} in your home directory. 522the 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
2500starts with @samp{foo} and ends with @samp{bar} is @file{foo*bar}, then 2521starts with @samp{foo} and ends with @samp{bar} is @file{foo*bar}, then
2501specifying @file{/tmp/foo*bar} will visit just @file{/tmp/foo*bar}. 2522specifying @file{/tmp/foo*bar} will visit just @file{/tmp/foo*bar}.
2502Another way is to specify @file{/tmp/foo[*]bar}. 2523Another 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
2532The command @kbd{M-x recentf-mode} or the Customize option of the same
2533name adds to the Files menu a submenu containing a list of recently
2534opened files. @kbd{recentf-save-list} saves the current file list to a
2535file and @kbd{recentf-edit-list} edits it.
2536
2537@findex ff-find-other-file
2538@vindex ff-other-file-alist
2539The command @kbd{ff-find-other-file} finds a file related to the one
2540visited by the current buffer, based on customizable patterns.
2541Typically this will be the header file corresponding to a C/C++ source
2542file, or vice versa. The patterns describing the corresponding files
2543are 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).