From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: dired touch command initial input Date: Tue, 17 Aug 2010 15:04:42 +0200 Organization: ThierryVolpiatto Message-ID: <87wrrptmol.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1282050468 8903 80.91.229.12 (17 Aug 2010 13:07:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Aug 2010 13:07:48 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 17 15:07:47 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OlLtJ-0004ds-6Q for ged-emacs-devel@m.gmane.org; Tue, 17 Aug 2010 15:07:45 +0200 Original-Received: from localhost ([127.0.0.1]:52523 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OlLtI-0004sZ-DW for ged-emacs-devel@m.gmane.org; Tue, 17 Aug 2010 09:07:44 -0400 Original-Received: from [140.186.70.92] (port=48614 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OlLt7-0004rY-9w for emacs-devel@gnu.org; Tue, 17 Aug 2010 09:07:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OlLt0-0000xg-0C for emacs-devel@gnu.org; Tue, 17 Aug 2010 09:07:33 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:47211) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OlLsz-0000x5-Po for emacs-devel@gnu.org; Tue, 17 Aug 2010 09:07:25 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OlLsr-0004Rb-V7 for emacs-devel@gnu.org; Tue, 17 Aug 2010 15:07:17 +0200 Original-Received: from 89.77.197-77.rev.gaoland.net ([77.197.77.89]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Aug 2010 15:07:17 +0200 Original-Received: from thierry.volpiatto by 89.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Aug 2010 15:07:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 89.77.197-77.rev.gaoland.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:HatKJPwPDs2OyDphKyWrz7GWzzM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:128813 Archived-At: Hi all, actually the dired touch command "T" use the more recent timestamp of the marked files for initial value. I wonder why it does not take the current-time as initial input like the touch command does and like it is described in manual: ,---- | `T TIMESTAMP ' | Touch the specified files (`dired-do-touch'). This means updating | their modification times to the present time. This is like the | shell command `touch'. `---- So why not using this simple version of `dired-touch-initial' instead: ,---- | (defun dired-touch-initial (files) | "Create initial input value for `touch' command." | (format-time-string "%Y%m%d%H%M.%S" (current-time))) `---- It is annoying to modify the prompt manually to insert current time. But maybe there is a special reason to use the more recent timestamp or the current timestamp if only one file? In this case that should be specified in the manual (different behavior than usual shell command). Otherwise, i will submit a bug. -- Thierry Volpiatto Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997