emacs-devel
[Top][All Lists]
Advanced

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

Re: dired-do-touch (was: [PATCH] fix goto-line)


From: Andreas Schwab
Subject: Re: dired-do-touch (was: [PATCH] fix goto-line)
Date: Sat, 30 Jul 2011 11:54:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Juri Linkov <address@hidden> writes:

>>> +     (if (eq op-symbol 'touch)
>>> +         (format-time-string "%Y%m%d%H%M.%S" (current-time))))
>>
>> I don't know what the overall problem is here, but I can
>> see two issues with this proposed patch.  First, presumably it
>> invokes (current-time) at one point, and then, later,
>> uses that saved current-time to do the 'touch'.  But that's
>> not quite right; it's the equivalent of the shell command
>>
>>   touch --date="$(date)" file
>
> In theory you are right.  But in practice a 1-2 sec delay
> is not a problem.

Note that changing the timestamp to a specific value requires owner
rights, whereas setting it to the current time only requires write
access.

>> whereas surely what is wanted is the equivalent of
>>
>>   touch file
>
> When `touch file' is really wanted then it's easy to type `! touch'.
> `dired-do-touch' was created for the convenience of changing
> the file's timestamp providing useful default values for editing.

An empty timestamp should mean running touch without time argument.

Andreas.

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



reply via email to

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