From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: dired-do-touch Date: Sat, 27 Mar 2004 19:52:45 +0200 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87oeqitbga.fsf@mail.jurta.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> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1080435180 1843 80.91.224.253 (28 Mar 2004 00:53:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 28 Mar 2004 00:53:00 +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 01:52:54 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 1B7OXm-0008BP-00 for ; Sun, 28 Mar 2004 01:52:54 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B7OXm-0008DE-00 for ; Sun, 28 Mar 2004 01:52:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B7OHu-0001pR-Ow for emacs-devel@quimby.gnus.org; Sat, 27 Mar 2004 19:36:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B7NP3-0001wh-4G for emacs-devel@gnu.org; Sat, 27 Mar 2004 18:39:49 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B7Mv2-0005M7-EP for emacs-devel@gnu.org; Sat, 27 Mar 2004 18:09:19 -0500 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1B7Mpv-0004Sw-Q8; Sat, 27 Mar 2004 18:03:31 -0500 Original-Received: from [66.33.219.6] (helo=knife.dreamhost.com) by mx20.gnu.org with esmtp (Exim 4.30) id 1B7IG5-0004zX-3e; Sat, 27 Mar 2004 13:10:13 -0500 Original-Received: from mail.jurta.org (80-235-34-145-dsl.mus.estpak.ee [80.235.34.145]) by knife.dreamhost.com (Postfix) with ESMTP id 5E672E4070; Sat, 27 Mar 2004 10:04:59 -0800 (PST) Original-To: Matthew Mundell In-Reply-To: <87ekre6zft.fsf@sno.mundell.ukfsn.org> (Matthew Mundell's message of "27 Mar 2004 16:13:10 +0000") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) 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:20998 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20998 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. (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/