[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dired copy file path

From: Michael Slass
Subject: Re: dired copy file path
Date: Thu, 17 Oct 2002 05:12:55 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 (mr.sparkle) writes:

>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

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"
  (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)))

Mike Slass

reply via email to

[Prev in Thread] Current Thread [Next in Thread]