[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24150: 25.1.50; New command: dired-create-empty-file
From: |
Drew Adams |
Subject: |
bug#24150: 25.1.50; New command: dired-create-empty-file |
Date: |
Thu, 4 Aug 2016 10:29:21 -0700 (PDT) |
> I use dired+ and find `diredp-touch-this-file' useful sometimes. It
> might be handy to have that available, with filename prompting, in the
> core dired. But it's not a high-frequency command for me.
Vanilla Emacs has `dired-do-touch', which is bound to `T'
by default.
Dired+ defines `diredp-touch-this-file', which just does
`dired-do-touch' on the file of the current line:
(dired-do-touch 1).
Just `T', with no files marked, gives you the same behavior
as `diredp-touch-this-file'. The latter is a separate command
because it lets you touch (just) the current file regardless of
whether some files are marked.
Wrt this thread: The Dired touch commands are useful mainly for
updating the file-modified date. But they do not read a file
name, so they cannot be used to create a new, empty file.
I'm not sure what the use cases are for creating a new, empty file,
but I don't think that using a touch command on any file listed in
Dired has the effect of creating another, new file. You can use
`M-!' to run a `touch' operating-system command, of course, but
Dired does not currently offer anything for this, AFAIK.