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: dired-do-touch Date: 20 Mar 2004 19:05:40 +0000 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <8765czqqyj.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 1079809670 30021 80.91.224.253 (20 Mar 2004 19:07:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 20 Mar 2004 19:07:50 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Mar 20 20:07:44 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 1B4lou-0006xU-00 for ; Sat, 20 Mar 2004 20:07:44 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B4lou-0002qQ-00 for ; Sat, 20 Mar 2004 20:07:44 +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 1B4lnt-0007JU-Jo for emacs-devel@quimby.gnus.org; Sat, 20 Mar 2004 14:06:41 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B4lnZ-0007J3-6R for emacs-devel@gnu.org; Sat, 20 Mar 2004 14:06:21 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B4ln3-0007C7-A0 for emacs-devel@gnu.org; Sat, 20 Mar 2004 14:06:20 -0500 Original-Received: from [217.158.120.143] (helo=mail.ukfsn.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B4ln3-0007By-0z for emacs-devel@gnu.org; Sat, 20 Mar 2004 14:05:49 -0500 Original-Received: from localhost (lucy.ukfsn.org [127.0.0.1]) by mail.ukfsn.org (Postfix) with ESMTP id D549EE6D7E for ; Sat, 20 Mar 2004 19:05:34 +0000 (GMT) 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 26834-08 for ; Sat, 20 Mar 2004 19:05:34 +0000 (GMT) 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 91AE8E6D5D for ; Sat, 20 Mar 2004 19:05:34 +0000 (GMT) Original-Received: from sno.mundell.ukfsn.org ([10.0.0.3]) by sno.mundell.ukfsn.org with esmtp (Exim 3.36 #1 (Debian)) id 1B4lmv-0000qs-00 for ; Sat, 20 Mar 2004 19:05:41 +0000 Original-To: emacs-devel Original-Lines: 51 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:20648 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20648 In Dired "T" could touch the current file with the touch shell command. 2004-02-08 Matthew Mundell * dired-aux.el (dired-do-touch): New defun. * dired.el: Bind dired-do-touch to T. =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/dired.el,v retrieving revision 1.272 diff -u -r1.272 dired.el --- lisp/dired.el 3 Feb 2004 16:55:30 -0000 1.272 +++ lisp/dired.el 20 Mar 2004 14:04:27 -0000 @@ -895,6 +895,7 @@ (define-key map "Q" 'dired-do-query-replace-regexp) (define-key map "R" 'dired-do-rename) (define-key map "S" 'dired-do-symlink) + (define-key map "T" 'dired-do-touch) (define-key map "X" 'dired-do-shell-command) (define-key map "Z" 'dired-do-compress) (define-key map "!" 'dired-do-shell-command) =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/dired-aux.el,v retrieving revision 1.114 diff -u -r1.114 dired-aux.el --- lisp/dired-aux.el 8 Feb 2004 22:38:51 -0000 1.114 +++ lisp/dired-aux.el 20 Mar 2004 15:15:26 -0000 @@ -2135,6 +2135,17 @@ (backward-delete-char 1)) (message "%s" (buffer-string)))) +;;;###autoload +(defun dired-do-touch (file) + "Touch the current file with the `touch' program." + (interactive (list (dired-get-filename t))) + (with-temp-buffer + (call-process "touch" nil t t "--" file) + (unless (bobp) + (when (bolp) + (backward-delete-char 1)) + (message "%s" (buffer-string))))) + (provide 'dired-aux) ;;; arch-tag: 4b508de9-a153-423d-8d3f-a1bbd86f4f60