aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-08-28 17:07:10 -0400
committerChong Yidong2011-08-28 17:07:10 -0400
commita6326082984c2f0afa9d4ec104bc9df058cc5ef8 (patch)
treeffd8a36baea9eb30fc0c7f4b6aa36c09bc090c94
parent6bc8cd6546ad666b4d2ef3cbbbcbd8b904f5f34f (diff)
downloademacs-a6326082984c2f0afa9d4ec104bc9df058cc5ef8.tar.gz
emacs-a6326082984c2f0afa9d4ec104bc9df058cc5ef8.zip
Document copy-directory and related changes in manuals.
* doc/emacs/buffers.texi (Misc Buffer): Move view-buffer to View Mode. * doc/emacs/display.texi (View Mode): New node. Move view-file here from Misc File Ops. Move view-buffer here from Misc Buffer. * doc/emacs/files.texi (Misc File Ops): Document new delete-by-moving-to-trash behavior. Remove view-file. * doc/lispref/files.texi (Changing Files, Create/Delete Dirs): Document new arguments for delete-file, delete-directory, and copy-directory.
-rw-r--r--doc/emacs/ChangeLog7
-rw-r--r--doc/emacs/buffers.texi10
-rw-r--r--doc/emacs/display.texi22
-rw-r--r--doc/emacs/emacs.texi1
-rw-r--r--doc/emacs/files.texi142
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/files.texi11
-rw-r--r--etc/NEWS4
8 files changed, 102 insertions, 99 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 7b940ba7b5a..a08bd212b25 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,7 +1,12 @@
12011-08-28 Chong Yidong <cyd@stupidchicken.com> 12011-08-28 Chong Yidong <cyd@stupidchicken.com>
2 2
3 * display.texi (View Mode): New node. Move view-file here from
4 Misc File Ops. Move view-buffer here from Misc Buffer.
5
6 * buffers.texi (Misc Buffer): Move view-buffer to View Mode.
7
3 * files.texi (Misc File Ops): Document new 8 * files.texi (Misc File Ops): Document new
4 delete-by-moving-to-trash behavior. 9 delete-by-moving-to-trash behavior. Remove view-file.
5 10
6 * dired.texi (Dired Deletion): Shorten description of Trash. 11 * dired.texi (Dired Deletion): Shorten description of Trash.
7 12
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index d4cc4f7bb6a..c4880af2b5d 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -285,16 +285,6 @@ buffers with particular names. (With some of these features, such as
285switch to some other buffer before using the command, in order for it 285switch to some other buffer before using the command, in order for it
286to make a different buffer.) 286to make a different buffer.)
287 287
288@findex view-buffer
289 @kbd{M-x view-buffer} is much like @kbd{M-x view-file} (@pxref{Misc
290File Ops}) except that it examines an already existing Emacs buffer.
291View mode provides commands for scrolling through the buffer
292conveniently but not for changing it. When you exit View mode with
293@kbd{q}, that switches back to the buffer (and the position) which was
294previously displayed in the window. Alternatively, if you exit View
295mode with @kbd{e}, the buffer and the value of point that resulted from
296your perusal remain in effect.
297
298 The commands @kbd{M-x append-to-buffer} and @kbd{M-x insert-buffer} 288 The commands @kbd{M-x append-to-buffer} and @kbd{M-x insert-buffer}
299can be used to copy text from one buffer to another. @xref{Accumulating 289can be used to copy text from one buffer to another. @xref{Accumulating
300Text}. 290Text}.
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index cc7f70cf574..aaa04230b6f 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -17,6 +17,7 @@ want to see, and how to display it.
17* Horizontal Scrolling:: Moving text left and right in a window. 17* Horizontal Scrolling:: Moving text left and right in a window.
18* Narrowing:: Restricting display and editing to a portion 18* Narrowing:: Restricting display and editing to a portion
19 of the buffer. 19 of the buffer.
20* View Mode:: Viewing read-only buffers.
20* Follow Mode:: Follow mode lets two windows scroll as one. 21* Follow Mode:: Follow mode lets two windows scroll as one.
21* Faces:: How to change the display style using faces. 22* Faces:: How to change the display style using faces.
22* Standard Faces:: Emacs' predefined faces. 23* Standard Faces:: Emacs' predefined faces.
@@ -368,6 +369,27 @@ this command asks for confirmation and gives you the option of enabling it;
368if you enable the command, confirmation will no longer be required for 369if you enable the command, confirmation will no longer be required for
369it. @xref{Disabling}. 370it. @xref{Disabling}.
370 371
372@node View Mode
373@section View Mode
374@cindex View mode
375@cindex mode, View
376
377 View mode is a minor mode that lets you scan a buffer by sequential
378screenfuls. It provides commands for scrolling through the buffer
379conveniently but not for changing it. Apart from the usual Emacs
380cursor motion commands, you can type @key{SPC} to scroll forward one
381windowful, or @key{DEL} to scroll backward.
382
383 Typing @kbd{q} disables View mode, and switches back to the buffer
384and position before View mode was enabled. Alternatively, type
385@kbd{e} disables View mode, keeping the current buffer and position.
386
387@findex view-buffer
388@findex view-file
389 @kbd{M-x view-buffer} prompts for an existing Emacs buffer, switches
390to it, and enables View mode. @kbd{M-x view-file} prompts for a file
391and visits it with View mode enabled.
392
371@node Follow Mode 393@node Follow Mode
372@section Follow Mode 394@section Follow Mode
373@cindex Follow mode 395@cindex Follow mode
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 5f0d66b95a3..2ba4af712af 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -345,6 +345,7 @@ Controlling the Display
345* Horizontal Scrolling:: Moving text left and right in a window. 345* Horizontal Scrolling:: Moving text left and right in a window.
346* Narrowing:: Restricting display and editing to a portion 346* Narrowing:: Restricting display and editing to a portion
347 of the buffer. 347 of the buffer.
348* View Mode:: Viewing read-only buffers.
348* Follow Mode:: Follow mode lets two windows scroll as one. 349* Follow Mode:: Follow mode lets two windows scroll as one.
349* Faces:: How to change the display style using faces. 350* Faces:: How to change the display style using faces.
350* Standard Faces:: Emacs' predefined faces. 351* Standard Faces:: Emacs' predefined faces.
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index d337ed3694e..a41e14e5fcb 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1503,59 +1503,18 @@ patch syntax (@pxref{Useless Whitespace}).
1503 Emacs has commands for performing many other operations on files. 1503 Emacs has commands for performing many other operations on files.
1504All operate on one file; they do not accept wildcard file names. 1504All operate on one file; they do not accept wildcard file names.
1505 1505
1506@findex view-file
1507@cindex viewing
1508@cindex View mode
1509@cindex mode, View
1510 @kbd{M-x view-file} allows you to scan or read a file by sequential
1511screenfuls. It reads a file name argument using the minibuffer. After
1512reading the file into an Emacs buffer, @code{view-file} displays the
1513beginning. You can then type @key{SPC} to scroll forward one windowful,
1514or @key{DEL} to scroll backward. Various other commands are provided
1515for moving around in the file, but none for changing it; type @kbd{?}
1516while viewing for a list of them. They are mostly the same as normal
1517Emacs cursor motion commands. To exit from viewing, type @kbd{q}.
1518The commands for viewing are defined by a special minor mode called View
1519mode.
1520
1521 A related command, @kbd{M-x view-buffer}, views a buffer already present
1522in Emacs. @xref{Misc Buffer}.
1523
1524@kindex C-x i
1525@findex insert-file
1526 @kbd{M-x insert-file} (also @kbd{C-x i}) inserts a copy of the
1527contents of the specified file into the current buffer at point,
1528leaving point unchanged before the contents. The position after the
1529inserted contents is added to the mark ring, without activating the
1530mark (@pxref{Mark Ring}).
1531
1532@findex insert-file-literally
1533 @kbd{M-x insert-file-literally} is like @kbd{M-x insert-file},
1534except the file is inserted ``literally'': it is treated as a sequence
1535of @acronym{ASCII} characters with no special encoding or conversion,
1536similar to the @kbd{M-x find-file-literally} command
1537(@pxref{Visiting}).
1538
1539@findex write-region
1540 @kbd{M-x write-region} is the inverse of @kbd{M-x insert-file}; it
1541copies the contents of the region into the specified file. @kbd{M-x
1542append-to-file} adds the text of the region to the end of the
1543specified file. @xref{Accumulating Text}. The variable
1544@code{write-region-inhibit-fsync} applies to these commands, as well
1545as saving files; see @ref{Customize Save}.
1546
1547@findex delete-file 1506@findex delete-file
1548@cindex deletion (of files) 1507@cindex deletion (of files)
1549 @kbd{M-x delete-file} prompts for a file and deletes it. If you are 1508 @kbd{M-x delete-file} prompts for a file and deletes it. If you are
1550deleting many files in one directory, it may be more convenient to use 1509deleting many files in one directory, it may be more convenient to use
1551Dired rather than @code{delete-file}. @xref{Dired}. 1510Dired rather than @code{delete-file}. @xref{Dired Deletion}.
1552 1511
1553@cindex trash 1512@cindex trash
1554@cindex recycle bin 1513@cindex recycle bin
1555 @kbd{M-x move-file-to-trash} moves a file into the operating 1514 @kbd{M-x move-file-to-trash} moves a file into the system
1556system's @dfn{Trash} (or @dfn{Recycle Bin}). This is a facility 1515@dfn{Trash} (or @dfn{Recycle Bin}). This is a facility available on
1557available on most operating systems; files that are moved into the 1516most operating systems; files that are moved into the Trash can be
1558Trash can be brought back later if you change your mind. 1517brought back later if you change your mind.
1559 1518
1560@vindex delete-by-moving-to-trash 1519@vindex delete-by-moving-to-trash
1561 By default, Emacs deletion commands do @emph{not} use the Trash. To 1520 By default, Emacs deletion commands do @emph{not} use the Trash. To
@@ -1566,42 +1525,43 @@ delete-directory} (@pxref{Directories}), as well as the deletion
1566commands in Dired (@pxref{Dired Deletion}). Supplying a prefix 1525commands in Dired (@pxref{Dired Deletion}). Supplying a prefix
1567argument to @kbd{M-x delete-file} or @kbd{M-x delete-directory} makes 1526argument to @kbd{M-x delete-file} or @kbd{M-x delete-directory} makes
1568them delete outright, instead of using the Trash, regardless of 1527them delete outright, instead of using the Trash, regardless of
1569@code{delete-by-moving-to-trash}. The variable 1528@code{delete-by-moving-to-trash}.
1570@code{delete-by-moving-to-trash} does not affect file deletions that 1529
1571happen as a side-effect of other Emacs commands (e.g. deletions of 1530@findex copy-file
1572temporary files); those are always true deletions. 1531@cindex copying files
1532 @kbd{M-x copy-file} reads the file @var{old} and writes a new file
1533named @var{new} with the same contents.
1534
1535@findex copy-directory
1536 @kbd{M-x copy-directory} copies directories, similar to the
1537@command{cp -r} shell command. It prompts for a directory @var{old}
1538and a destination @var{new}. If @var{new} is an existing directory,
1539it creates a copy of the @var{old} directory and puts it in @var{new}.
1540If @var{new} is not an existing directory, it copies all the contents
1541of @var{old} into a new directory named @var{new}.
1573 1542
1574@findex rename-file 1543@findex rename-file
1575 @kbd{M-x rename-file} reads two file names @var{old} and @var{new} using 1544 @kbd{M-x rename-file} reads two file names @var{old} and @var{new}
1576the minibuffer, then renames file @var{old} as @var{new}. If the file name 1545using the minibuffer, then renames file @var{old} as @var{new}. If
1577@var{new} already exists, you must confirm with @kbd{yes} or renaming is not 1546the file name @var{new} already exists, you must confirm with
1578done; this is because renaming causes the old meaning of the name @var{new} 1547@kbd{yes} or renaming is not done; this is because renaming causes the
1579to be lost. If @var{old} and @var{new} are on different file systems, the 1548old meaning of the name @var{new} to be lost. If @var{old} and
1580file @var{old} is copied and deleted. 1549@var{new} are on different file systems, the file @var{old} is copied
1581 1550and deleted. If the argument @var{new} is just a directory name, the
1582 If the argument @var{new} is just a directory name, the real new 1551real new name is in that directory, with the same non-directory
1583name is in that directory, with the same non-directory component as 1552component as @var{old}. For example, @kbd{M-x rename-file RET ~/foo
1584@var{old}. For example, @kbd{M-x rename-file RET ~/foo RET /tmp RET} 1553RET /tmp RET} renames @file{~/foo} to @file{/tmp/foo}. The same rule
1585renames @file{~/foo} to @file{/tmp/foo}. The same rule applies to all 1554applies to all the remaining commands in this section. All of them
1586the remaining commands in this section. All of them ask for 1555ask for confirmation when the new file name already exists, too.
1587confirmation when the new file name already exists, too.
1588 1556
1589@findex add-name-to-file 1557@findex add-name-to-file
1590@cindex hard links (creation) 1558@cindex hard links (creation)
1591 The similar command @kbd{M-x add-name-to-file} is used to add an 1559 @kbd{M-x add-name-to-file} adds an additional name to an existing
1592additional name to an existing file without removing its old name. 1560file without removing its old name. The new name is created as a
1593The new name is created as a ``hard link'' to the existing file. 1561``hard link'' to the existing file. The new name must belong on the
1594The new name must belong on the same file system that the file is on. 1562same file system that the file is on. On MS-Windows, this command
1595On MS-Windows, this command works only if the file resides in an NTFS 1563works only if the file resides in an NTFS file system. On MS-DOS, it
1596file system. On MS-DOS, it works by copying the file. 1564works by copying the file.
1597
1598@findex copy-file
1599@findex copy-directory
1600@cindex copying files
1601 @kbd{M-x copy-file} reads the file @var{old} and writes a new file
1602named @var{new} with the same contents. @kbd{M-x copy-directory} does
1603the same for directories, by recursive copying all files and
1604subdirectories.
1605 1565
1606@findex make-symbolic-link 1566@findex make-symbolic-link
1607@cindex symbolic links (creation) 1567@cindex symbolic links (creation)
@@ -1612,10 +1572,32 @@ open file @var{linkname} will refer to whatever file is named
1612@var{target} at the time the opening is done, or will get an error if 1572@var{target} at the time the opening is done, or will get an error if
1613the name @var{target} is nonexistent at that time. This command does 1573the name @var{target} is nonexistent at that time. This command does
1614not expand the argument @var{target}, so that it allows you to specify 1574not expand the argument @var{target}, so that it allows you to specify
1615a relative name as the target of the link. 1575a relative name as the target of the link. Not all systems support
1576symbolic links; on systems that don't support them, this command is
1577not defined.
1578
1579@kindex C-x i
1580@findex insert-file
1581 @kbd{M-x insert-file} (also @kbd{C-x i}) inserts a copy of the
1582contents of the specified file into the current buffer at point,
1583leaving point unchanged before the contents. The position after the
1584inserted contents is added to the mark ring, without activating the
1585mark (@pxref{Mark Ring}).
1616 1586
1617 Not all systems support symbolic links; on systems that don't 1587@findex insert-file-literally
1618support them, this command is not defined. 1588 @kbd{M-x insert-file-literally} is like @kbd{M-x insert-file},
1589except the file is inserted ``literally'': it is treated as a sequence
1590of @acronym{ASCII} characters with no special encoding or conversion,
1591similar to the @kbd{M-x find-file-literally} command
1592(@pxref{Visiting}).
1593
1594@findex write-region
1595 @kbd{M-x write-region} is the inverse of @kbd{M-x insert-file}; it
1596copies the contents of the region into the specified file. @kbd{M-x
1597append-to-file} adds the text of the region to the end of the
1598specified file. @xref{Accumulating Text}. The variable
1599@code{write-region-inhibit-fsync} applies to these commands, as well
1600as saving files; see @ref{Customize Save}.
1619 1601
1620@findex set-file-modes 1602@findex set-file-modes
1621@cindex file modes 1603@cindex file modes
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index a778cd92518..b0328dba3f1 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,7 +1,7 @@
12011-08-28 Chong Yidong <cyd@stupidchicken.com> 12011-08-28 Chong Yidong <cyd@stupidchicken.com>
2 2
3 * files.texi (Changing Files, Create/Delete Dirs): Document TRASH 3 * files.texi (Changing Files, Create/Delete Dirs): Document new
4 argument. 4 arguments for delete-file, delete-directory, and copy-directory.
5 5
6 * frames.texi (Layout Parameters): The defaults for the 6 * frames.texi (Layout Parameters): The defaults for the
7 menu-bar-lines and tool-bar-lines parameters depend on the mode. 7 menu-bar-lines and tool-bar-lines parameters depend on the mode.
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index c83defb433c..25afb810a88 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -2514,7 +2514,7 @@ if they don't already exist.
2514@code{mkdir} is an alias for this. 2514@code{mkdir} is an alias for this.
2515@end deffn 2515@end deffn
2516 2516
2517@deffn Command copy-directory dirname newname &optional keep-time parents 2517@deffn Command copy-directory dirname newname &optional keep-time parents copy-contents
2518This command copies the directory named @var{dirname} to 2518This command copies the directory named @var{dirname} to
2519@var{newname}. If @var{newname} names an existing directory, 2519@var{newname}. If @var{newname} names an existing directory,
2520@var{dirname} will be copied to a subdirectory there. 2520@var{dirname} will be copied to a subdirectory there.
@@ -2522,13 +2522,18 @@ This command copies the directory named @var{dirname} to
2522It always sets the file modes of the copied files to match the 2522It always sets the file modes of the copied files to match the
2523corresponding original file. 2523corresponding original file.
2524 2524
2525The third arg @var{keep-time} non-@code{nil} means to preserve the 2525The third argument @var{keep-time} non-@code{nil} means to preserve the
2526modification time of the copied files. A prefix arg makes 2526modification time of the copied files. A prefix arg makes
2527@var{keep-time} non-@code{nil}. 2527@var{keep-time} non-@code{nil}.
2528 2528
2529Noninteractively, the last argument @var{parents} says whether to 2529The fourth argument @var{parents} says whether to
2530create parent directories if they don't exist. Interactively, 2530create parent directories if they don't exist. Interactively,
2531this happens by default. 2531this happens by default.
2532
2533The fifth argument @var{copy-contents}, if non-@code{nil}, means to
2534copy the contents of @var{dirname} directly into @var{newname} if the
2535latter is an existing directory, instead of copying @var{dirname} into
2536it as a subdirectory.
2532@end deffn 2537@end deffn
2533 2538
2534@cindex trash 2539@cindex trash
diff --git a/etc/NEWS b/etc/NEWS
index f563dde0b0c..afd004c5bb3 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -384,15 +384,12 @@ pops up *Messages*" feature, which can now easily be changed.
384* Editing Changes in Emacs 24.1 384* Editing Changes in Emacs 24.1
385 385
386** Search changes 386** Search changes
387
388+++ 387+++
389*** C-y in Isearch is now bound to isearch-yank-kill, instead of 388*** C-y in Isearch is now bound to isearch-yank-kill, instead of
390isearch-yank-line. 389isearch-yank-line.
391
392--- 390---
393*** M-y in Isearch is now bound to isearch-yank-pop, instead of 391*** M-y in Isearch is now bound to isearch-yank-pop, instead of
394isearch-yank-kill. 392isearch-yank-kill.
395
396+++ 393+++
397*** M-s C-e in Isearch is now bound to isearch-yank-line. 394*** M-s C-e in Isearch is now bound to isearch-yank-line.
398 395
@@ -850,6 +847,7 @@ bidirectional editing introduced in Emacs 24. If you need the
850bidirectional properties of a character, use `get-char-code-property' 847bidirectional properties of a character, use `get-char-code-property'
851with the last argument `bidi-class'. 848with the last argument `bidi-class'.
852 849
850+++
853** `copy-directory' now copies the source directory as a subdirectory 851** `copy-directory' now copies the source directory as a subdirectory
854of the target directory, if the latter is an existing directory. The 852of the target directory, if the latter is an existing directory. The
855new optional arg COPY-CONTENTS, if non-nil, makes the function copy 853new optional arg COPY-CONTENTS, if non-nil, makes the function copy