emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dired touch command initial input


From: Thierry Volpiatto
Subject: dired touch command initial input
Date: Tue, 17 Aug 2010 15:04:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi all,
actually the dired touch command "T" use the more recent timestamp of
the marked files for initial value.

I wonder why it does not take the current-time as initial input like the
touch command does and like it is described in manual:

,----
| `T TIMESTAMP <RET>'
|      Touch the specified files (`dired-do-touch').  This means updating
|      their modification times to the present time.  This is like the
|      shell command `touch'.
`----

So why not using this simple version of `dired-touch-initial' instead:

,----
| (defun dired-touch-initial (files)
|   "Create initial input value for `touch' command."
|   (format-time-string "%Y%m%d%H%M.%S" (current-time)))
`----

It is annoying to modify the prompt manually to insert current time.

But maybe there is a special reason to use the more recent timestamp or
the current timestamp if only one file?

In this case that should be specified in the manual (different behavior
than usual shell command).

Otherwise, i will submit a bug.

-- 
Thierry Volpiatto
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]