From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Slass Newsgroups: gmane.emacs.help Subject: Re: dired copy file path Date: Thu, 17 Oct 2002 05:12:55 GMT Organization: AT&T Broadband Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034957501 22146 80.91.224.249 (18 Oct 2002 16:11:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 18 Oct 2002 16:11:41 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 182Zir-0005k5-00 for ; Fri, 18 Oct 2002 18:11:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 182Zfd-00061o-00; Fri, 18 Oct 2002 12:08:17 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn14feed!wn12feed!wn11feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-NNTP-Posting-Host: 12.228.27.239 Original-X-Complaints-To: abuse@attbi.com Original-X-Trace: rwcrnsc53 1034831575 12.228.27.239 (Thu, 17 Oct 2002 05:12:55 GMT) Original-NNTP-Posting-Date: Thu, 17 Oct 2002 05:12:55 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:106138 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2682 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2682 happy@vole.com (mr.sparkle) writes: >Greetings! >Is there any way to copy the full pathname of the file under point in >dired? For example, when I am in my home home directory and point is >on the file foo, I would like to be able to copy the path >/home/sparkle/foo >Thanks! > This defines a function to do that (defun dired-copy-filename () "push the path and filename of the file under the point to the kill ring" (interactive) (message "added %s to kill ring" (kill-new (dired-get-filename)))) And this will bind it to 'c' on entering dired (add-hook 'dired-mode-hook (lambda () (define-key dired-mode-map "c" 'dired-copy-filename))) VERY LIGHTLY TESTED -- Mike Slass