emacs-devel
[Top][All Lists]
Advanced

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

Re: dired-do-touch


From: Matthew Mundell
Subject: Re: dired-do-touch
Date: 28 Mar 2004 20:59:13 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Juri Linkov <address@hidden> writes:

> 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.

There's the set-file-modes primitive for changing modes.  Are there
equivalent primitives for changing owner and group?

If the commands are going to be rewritten soon to use primitives then
perhaps step 1 can be skipped.

>
> (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.

Earlier in the thread Lars Hansen suggested adding such a primitive,
for use in Tramp.

> >> 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.

Thanks, I missed it.




reply via email to

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