* dired copy file path
@ 2002-10-17 2:20 mr.sparkle
2002-10-17 5:12 ` Michael Slass
0 siblings, 1 reply; 2+ messages in thread
From: mr.sparkle @ 2002-10-17 2:20 UTC (permalink / raw)
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!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: dired copy file path
2002-10-17 2:20 dired copy file path mr.sparkle
@ 2002-10-17 5:12 ` Michael Slass
0 siblings, 0 replies; 2+ messages in thread
From: Michael Slass @ 2002-10-17 5:12 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-17 5:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-17 2:20 dired copy file path mr.sparkle
2002-10-17 5:12 ` Michael Slass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).