From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: dired-do-touch (was: [PATCH] fix goto-line) Date: Sat, 30 Jul 2011 11:54:01 +0200 Message-ID: References: <874o26muk2.fsf@gnu.org> <8762ml5odm.fsf@mail.jurta.org> <8762mlglnt.fsf@mail.jurta.org> <4E32E399.8000402@cs.ucla.edu> <87aabw16ls.fsf_-_@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1312019658 22861 80.91.229.12 (30 Jul 2011 09:54:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 30 Jul 2011 09:54:18 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 30 11:54:14 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qn6FG-0004My-JS for ged-emacs-devel@m.gmane.org; Sat, 30 Jul 2011 11:54:10 +0200 Original-Received: from localhost ([::1]:52996 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qn6FG-0002hp-3H for ged-emacs-devel@m.gmane.org; Sat, 30 Jul 2011 05:54:10 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:47065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qn6FD-0002hV-FE for emacs-devel@gnu.org; Sat, 30 Jul 2011 05:54:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qn6FC-0007or-CS for emacs-devel@gnu.org; Sat, 30 Jul 2011 05:54:07 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.10]:44660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qn6FC-0007o6-6t for emacs-devel@gnu.org; Sat, 30 Jul 2011 05:54:06 -0400 Original-Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 5C4B2188A165; Sat, 30 Jul 2011 11:54:02 +0200 (CEST) X-Auth-Info: rCePwizXXRrUC8ymSSm567Tl8CeMYRlcyY5qnQD/Nag= Original-Received: from linux.local (ppp-88-217-97-219.dynamic.mnet-online.de [88.217.97.219]) by mail.mnet-online.de (Postfix) with ESMTPA id 8B1581C00120; Sat, 30 Jul 2011 11:54:02 +0200 (CEST) Original-Received: by linux.local (Postfix, from userid 501) id AF6B51E52AD; Sat, 30 Jul 2011 11:54:01 +0200 (CEST) X-Yow: Did I say I was a sardine? Or a bus??? In-Reply-To: <87aabw16ls.fsf_-_@mail.jurta.org> (Juri Linkov's message of "Sat, 30 Jul 2011 12:17:17 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 212.18.0.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:142514 Archived-At: Juri Linkov writes: >>> + (if (eq op-symbol 'touch) >>> + (format-time-string "%Y%m%d%H%M.%S" (current-time)))) >> >> I don't know what the overall problem is here, but I can >> see two issues with this proposed patch. First, presumably it >> invokes (current-time) at one point, and then, later, >> uses that saved current-time to do the 'touch'. But that's >> not quite right; it's the equivalent of the shell command >> >> touch --date="$(date)" file > > In theory you are right. But in practice a 1-2 sec delay > is not a problem. Note that changing the timestamp to a specific value requires owner rights, whereas setting it to the current time only requires write access. >> whereas surely what is wanted is the equivalent of >> >> touch file > > When `touch file' is really wanted then it's easy to type `! touch'. > `dired-do-touch' was created for the convenience of changing > the file's timestamp providing useful default values for editing. An empty timestamp should mean running touch without time argument. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."