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: Mon, 29 Mar 2004 22:15:19 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <874qs7wjlk.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> <87oeqitbga.fsf@mail.jurta.org> <87isgo4ub2.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 1080588731 30848 80.91.224.253 (29 Mar 2004 19:32:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 29 Mar 2004 19:32:11 +0000 (UTC) Cc: Matthew Mundell , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Mar 29 21:31:59 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 1B82UJ-0008OQ-00 for ; Mon, 29 Mar 2004 21:31:59 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B82UI-0005PB-00 for ; Mon, 29 Mar 2004 21:31:58 +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 1B82RB-0005oP-PY for emacs-devel@quimby.gnus.org; Mon, 29 Mar 2004 14:28:45 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B82QY-0005mA-Bu for emacs-devel@gnu.org; Mon, 29 Mar 2004 14:28:06 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B82Q0-0005cl-Mg for emacs-devel@gnu.org; Mon, 29 Mar 2004 14:28:04 -0500 Original-Received: from [66.33.219.6] (helo=knife.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B82Hl-000491-5A; Mon, 29 Mar 2004 14:19:01 -0500 Original-Received: from mail.jurta.org (80-235-38-198-dsl.mus.estpak.ee [80.235.38.198]) by knife.dreamhost.com (Postfix) with ESMTP id 81BBEE401F; Mon, 29 Mar 2004 11:18:54 -0800 (PST) Original-To: Eli Zaretskii In-Reply-To: (Eli Zaretskii's message of "29 Mar 2004 08:59:57 +0200") 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:21060 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21060 Eli Zaretskii writes: >> There's the set-file-modes primitive for changing modes. Are there >> equivalent primitives for changing owner and group? > > I don't think so. FWIW, I think we should add them. I completely agree that we should add primitives for changing owner and group and use them in dired. Actually, I never understood why dired needs separate commands for external programs that can be easily run by `dired-do-shell-command', like e.g. by typing `! chown owner RET' on marked files. The main reason I wanted to add the touch dired command is that with an initial value for the time at its prompt (I posted a patch for this earlier) the user can edit an initial value. And of course, since dired commands for changing file attributes already exist it makes sense to use Emacs primitives for them for achieve independence from external programs. >> > 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. > > IMHO, we don't _have_ to emulate the `touch' program's date/time > format. The format of the arguments that `touch' accepts is a result > of a certain user-interface design that is appropriate for a > command-line utility. Emacs could in principle present an entirely > different UI, since it is not a command-line app. We just need to > support the same _functionality_, but not necessarily the same > _format_. While I agree that we don't have to emulate the `touch' program format, I think that we ought to add it as one of the possible time formats accepted by the `date-to-time' and other Emacs time-parsing functions, because this format is very compact which makes it convenient for the user to enter. -- Juri Linkov http://www.jurta.org/emacs/