emacs-devel
[Top][All Lists]
Advanced

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

Re: dired-do-touch


From: Juri Linkov
Subject: Re: dired-do-touch
Date: Sat, 27 Mar 2004 19:52:45 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Matthew Mundell <address@hidden> writes:
> Juri Linkov <address@hidden> writes:
>> I don't see a reason why changing file time should differ from
>> operations changing other file attributes like mode, owner and
>> group.
>
> So you're suggesting to use an external program until a date can be
> entered with the version of dired-do-touch which uses a primitive?  It
> sounds like a good idea.

Yes.  Since Richard asked to consider one feature at a time,
I think the most natural order would be the following:

1. Add the touch dired command that works like other dired commands
   which change file attributes: chmod, chown, chgrp;
2a. Add a feature that guesses the initial input for these
   dired commands;
2b. Rewrite these dired commands to use Emacs primitives.

(2a and 2b are in no particular order)

> The set-file-times primitive can still be installed.

I agree that the set-file-times primitive can be installed now,
and later it can be used in the dired touch command.  And generally
this primitive may become necessary for other Lisp programs too.

>> It don't allow to change file times to values other than current time.
>
> The primitive allows any time to be set.  However, the dired-do-time
> patch which uses the primitive always uses the current time.  For this
> to accept an arbitrary time it needs to parse the time from a
> user-supplied string.  Is there a Lisp function which does this?

There is the function `date-to-time' which parses a time string.
But it should be improved to accept the format of the touch program.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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