comparison lispref/files.texi @ 76841:fc9d442f98d2

Improve indexing.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 31 Mar 2007 17:27:34 +0000
parents 330094c564c4
children 1f4b88ab053d
comparison
equal deleted inserted replaced
76840:0cdcaf11fa80 76841:fc9d442f98d2
294 in the list @code{find-file-hook}. 294 in the list @code{find-file-hook}.
295 @end defun 295 @end defun
296 296
297 @node Saving Buffers 297 @node Saving Buffers
298 @section Saving Buffers 298 @section Saving Buffers
299 @cindex saving buffers
299 300
300 When you edit a file in Emacs, you are actually working on a buffer 301 When you edit a file in Emacs, you are actually working on a buffer
301 that is visiting that file---that is, the contents of the file are 302 that is visiting that file---that is, the contents of the file are
302 copied into the buffer and the copy is what you edit. Changes to the 303 copied into the buffer and the copy is what you edit. Changes to the
303 buffer do not change the file until you @dfn{save} the buffer, which 304 buffer do not change the file until you @dfn{save} the buffer, which
479 Name}). 480 Name}).
480 481
481 @node Reading from Files 482 @node Reading from Files
482 @comment node-name, next, previous, up 483 @comment node-name, next, previous, up
483 @section Reading from Files 484 @section Reading from Files
485 @cindex reading from files
484 486
485 You can copy a file from the disk and insert it into a buffer 487 You can copy a file from the disk and insert it into a buffer
486 using the @code{insert-file-contents} function. Don't use the user-level 488 using the @code{insert-file-contents} function. Don't use the user-level
487 command @code{insert-file} in a Lisp program, as that sets the mark. 489 command @code{insert-file} in a Lisp program, as that sets the mark.
488 490
542 @ref{Magic File Names}. 544 @ref{Magic File Names}.
543 545
544 @node Writing to Files 546 @node Writing to Files
545 @comment node-name, next, previous, up 547 @comment node-name, next, previous, up
546 @section Writing to Files 548 @section Writing to Files
549 @cindex writing to files
547 550
548 You can write the contents of a buffer, or part of a buffer, directly 551 You can write the contents of a buffer, or part of a buffer, directly
549 to a file on disk using the @code{append-to-file} and 552 to a file on disk using the @code{append-to-file} and
550 @code{write-region} functions. Don't use these functions to write to 553 @code{write-region} functions. Don't use these functions to write to
551 files that are being visited; that could cause confusion in the 554 files that are being visited; that could cause confusion in the
645 @end defmac 648 @end defmac
646 649
647 @node File Locks 650 @node File Locks
648 @section File Locks 651 @section File Locks
649 @cindex file locks 652 @cindex file locks
653 @cindex lock file
650 654
651 When two users edit the same file at the same time, they are likely 655 When two users edit the same file at the same time, they are likely
652 to interfere with each other. Emacs tries to prevent this situation 656 to interfere with each other. Emacs tries to prevent this situation
653 from arising by recording a @dfn{file lock} when a file is being 657 from arising by recording a @dfn{file lock} when a file is being
654 modified. (File locks are not implemented on Microsoft systems.) 658 modified. (File locks are not implemented on Microsoft systems.)
734 for its usual definition is in @file{userlock.el}. 738 for its usual definition is in @file{userlock.el}.
735 @end defun 739 @end defun
736 740
737 @node Information about Files 741 @node Information about Files
738 @section Information about Files 742 @section Information about Files
743 @cindex information about files
744 @cindex file, information about
739 745
740 The functions described in this section all operate on strings that 746 The functions described in this section all operate on strings that
741 designate file names. With a few exceptions, all the functions have 747 designate file names. With a few exceptions, all the functions have
742 names that begin with the word @samp{file}. These functions all 748 names that begin with the word @samp{file}. These functions all
743 return information about actual files or directories, so their 749 return information about actual files or directories, so their
2457 which generate the listing with Lisp code. 2463 which generate the listing with Lisp code.
2458 @end defvar 2464 @end defvar
2459 2465
2460 @node Create/Delete Dirs 2466 @node Create/Delete Dirs
2461 @section Creating and Deleting Directories 2467 @section Creating and Deleting Directories
2468 @cindex creating and deleting directories
2462 @c Emacs 19 features 2469 @c Emacs 19 features
2463 2470
2464 Most Emacs Lisp file-manipulation functions get errors when used on 2471 Most Emacs Lisp file-manipulation functions get errors when used on
2465 files that are directories. For example, you cannot delete a directory 2472 files that are directories. For example, you cannot delete a directory
2466 with @code{delete-file}. These special functions exist to create and 2473 with @code{delete-file}. These special functions exist to create and