diff options
| author | Tino Calancha | 2018-08-02 13:20:46 +0900 |
|---|---|---|
| committer | Tino Calancha | 2018-08-02 13:20:46 +0900 |
| commit | e65ec81fc3e556719fae8d8b4b42f571c7e9f4fc (patch) | |
| tree | 9a7f094620535b860c27b0f1763ebd1e33ba0163 /doc | |
| parent | d216d7d248199aa6c99cd642116717c5b301ae6d (diff) | |
| download | emacs-e65ec81fc3e556719fae8d8b4b42f571c7e9f4fc.tar.gz emacs-e65ec81fc3e556719fae8d8b4b42f571c7e9f4fc.zip | |
New commands to create an empty file
Similarly as `create-directory', `dired-create-directory',
the new commands create the parent dirs as needed (Bug#24150).
* lisp/files.el (make-empty-file): New command.
* lisp/dired-aux.el (dired-create-empty-file): New command.
(dired--find-topmost-parent-dir): New function extracted
from `dired-create-directory'.
(dired-create-directory, dired-create-empty-file): Use it.
* lisp/dired.el (dired-mode-map):
Add menu entry for `dired-create-empty-file'.
* doc/emacs/dired.texi (Misc Dired Features)
* doc/lispref/files.texi (Create/Delete Dirs): Update manual.
; * etc/NEWS: Announce the changes.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/dired.texi | 5 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 007a943714a..1b03a3967aa 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi | |||
| @@ -1468,6 +1468,11 @@ rotation is lossless, and uses an external utility called | |||
| 1468 | directory's name, and creates that directory. It signals an error if | 1468 | directory's name, and creates that directory. It signals an error if |
| 1469 | the directory already exists. | 1469 | the directory already exists. |
| 1470 | 1470 | ||
| 1471 | @findex dired-create-empty-file | ||
| 1472 | The command (@code{dired-create-empty-file}) reads a | ||
| 1473 | file name, and creates that file. It signals an error if | ||
| 1474 | the file already exists. | ||
| 1475 | |||
| 1471 | @cindex searching multiple files via Dired | 1476 | @cindex searching multiple files via Dired |
| 1472 | @kindex M-s a C-s @r{(Dired)} | 1477 | @kindex M-s a C-s @r{(Dired)} |
| 1473 | @kindex M-s a M-C-s @r{(Dired)} | 1478 | @kindex M-s a M-C-s @r{(Dired)} |
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 068cf054437..25fabe1ea5b 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -3005,10 +3005,16 @@ This command creates a directory named @var{dirname}. If | |||
| 3005 | @var{parents} is non-@code{nil}, as is always the case in an | 3005 | @var{parents} is non-@code{nil}, as is always the case in an |
| 3006 | interactive call, that means to create the parent directories first, | 3006 | interactive call, that means to create the parent directories first, |
| 3007 | if they don't already exist. | 3007 | if they don't already exist. |
| 3008 | |||
| 3009 | @code{mkdir} is an alias for this. | 3008 | @code{mkdir} is an alias for this. |
| 3010 | @end deffn | 3009 | @end deffn |
| 3011 | 3010 | ||
| 3011 | @deffn Command make-empty-file filename &optional parents | ||
| 3012 | This command creates an empty file named @var{filename}. | ||
| 3013 | As @code{make-directory}, this command creates parent directories | ||
| 3014 | if @var{parents} is non-@code{nil}. | ||
| 3015 | If @var{filename} already exists, this command signals an error. | ||
| 3016 | @end deffn | ||
| 3017 | |||
| 3012 | @deffn Command copy-directory dirname newname &optional keep-time parents copy-contents | 3018 | @deffn Command copy-directory dirname newname &optional keep-time parents copy-contents |
| 3013 | This command copies the directory named @var{dirname} to | 3019 | This command copies the directory named @var{dirname} to |
| 3014 | @var{newname}. If @var{newname} is a directory name, | 3020 | @var{newname}. If @var{newname} is a directory name, |