From: Michael Slass <miknrene@drizzle.com>
Subject: Re: dired copy file path
Date: Thu, 17 Oct 2002 05:12:55 GMT [thread overview]
Message-ID: <m3d6q9odck.fsf@localhost.localdomain> (raw)
In-Reply-To: m2y98xlsal.fsf@localhost.localdomain
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
prev parent reply other threads:[~2002-10-17 5:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-17 2:20 dired copy file path mr.sparkle
2002-10-17 5:12 ` Michael Slass [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3d6q9odck.fsf@localhost.localdomain \
--to=miknrene@drizzle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.