From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Matthew Mundell Newsgroups: gmane.emacs.devel Subject: Re: dired-do-touch Date: 28 Mar 2004 20:59:13 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87isgo4ub2.fsf@sno.mundell.ukfsn.org> References: <8765czqqyj.fsf@sno.mundell.ukfsn.org> <8765ctkmdo.fsf@mail.jurta.org> <87k7165zee.fsf@mail.jurta.org> <9681-Sat27Mar2004141724+0300-eliz@gnu.org> <87vfkq1lss.fsf@mail.jurta.org> <87ekre6zft.fsf@sno.mundell.ukfsn.org> <87oeqitbga.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1080504246 22422 80.91.224.253 (28 Mar 2004 20:04:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 28 Mar 2004 20:04:06 +0000 (UTC) Cc: Eli Zaretskii , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Mar 28 22:03:55 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B7gVf-00020c-00 for ; Sun, 28 Mar 2004 22:03:55 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B7gVe-0006Lr-00 for ; Sun, 28 Mar 2004 22:03:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B7gV9-0002oK-Rq for emacs-devel@quimby.gnus.org; Sun, 28 Mar 2004 15:03:23 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B7gSU-0007a7-Qm for emacs-devel@gnu.org; Sun, 28 Mar 2004 15:00:38 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B7gRk-0006zW-M1 for emacs-devel@gnu.org; Sun, 28 Mar 2004 15:00:24 -0500 Original-Received: from [217.158.120.143] (helo=mail.ukfsn.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B7gRA-0006i3-De; Sun, 28 Mar 2004 14:59:16 -0500 Original-Received: from localhost (lucy.ukfsn.org [127.0.0.1]) by mail.ukfsn.org (Postfix) with ESMTP id 74798E6E16; Sun, 28 Mar 2004 20:58:17 +0100 (BST) Original-Received: from mail.ukfsn.org ([127.0.0.1]) by localhost (lucy.ukfsn.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10431-16; Sun, 28 Mar 2004 20:58:17 +0100 (BST) Original-Received: from sno.mundell.ukfsn.org (dsl213-218-238-16.as15444.net [213.218.238.16]) by mail.ukfsn.org (Postfix) with ESMTP id 28BD2E6D97; Sun, 28 Mar 2004 20:58:17 +0100 (BST) Original-Received: from sno.mundell.ukfsn.org ([10.0.0.3]) by sno.mundell.ukfsn.org with esmtp (Exim 3.36 #1 (Debian)) id 1B7gR8-0000fS-00; Sun, 28 Mar 2004 20:59:14 +0100 Original-To: Juri Linkov Original-Lines: 50 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21027 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21027 Juri Linkov writes: > Matthew Mundell writes: > > Juri Linkov 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.