all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* dired touch command initial input
@ 2010-08-17 13:04 Thierry Volpiatto
  2010-08-17 16:37 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Thierry Volpiatto @ 2010-08-17 13:04 UTC (permalink / raw
  To: emacs-devel

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 




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dired touch command initial input
  2010-08-17 13:04 dired touch command initial input Thierry Volpiatto
@ 2010-08-17 16:37 ` Andreas Schwab
  2010-08-18  7:11   ` Thierry Volpiatto
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2010-08-17 16:37 UTC (permalink / raw
  To: Thierry Volpiatto; +Cc: emacs-devel

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

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

That could be fixed by putting the current time on the history.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dired touch command initial input
  2010-08-17 16:37 ` Andreas Schwab
@ 2010-08-18  7:11   ` Thierry Volpiatto
  0 siblings, 0 replies; 3+ messages in thread
From: Thierry Volpiatto @ 2010-08-18  7:11 UTC (permalink / raw
  To: emacs-devel

Andreas Schwab <schwab@linux-m68k.org> writes:

> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>
>> It is annoying to modify the prompt manually to insert current time.
>
> That could be fixed by putting the current time on the history.

I don't see how to do that.

Anyway the default should be current time like the shell command touch
does and like the Emacs manual describe unless there is a good reason to
do that.

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-18  7:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-17 13:04 dired touch command initial input Thierry Volpiatto
2010-08-17 16:37 ` Andreas Schwab
2010-08-18  7:11   ` Thierry Volpiatto

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.