[Top][All Lists]

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

Re: How to put default-directory into kill-ring?

From: Thorsten Jolitz
Subject: Re: How to put default-directory into kill-ring?
Date: Tue, 04 Feb 2014 12:46:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Marcin Borkowski <address@hidden> writes:

Hi Marcin,

> quite often I want to put some full path to some file (usually
> init.el).  It would be quite convenient for M-x pwd (or maybe C-u M-x
> pwd?) to put its output into the kill ring, which is does not.  So: is
> there any function to do this?  (I can easily write it myself, but
> don't want to reinvent the wheel.)  If not, could this be considered a
> feature request?

I use this in dired (typing '0 w' with point on a file/dir):

| w runs the command dired-copy-filename-as-kill, which is an
| interactive compiled Lisp function in `dired.el'.
| It is bound to w, <menu-bar> <operate> <kill-ring>.
| (dired-copy-filename-as-kill &optional ARG)
| Copy names of marked (or next ARG) files into the kill ring.
| The names are separated by a space.
| With a zero prefix arg, use the absolute file name of each marked file.
| With C-u, use the file name relative to the dired buffer's
| `default-directory'.  (This still may contain slashes if in a subdirectory.)


reply via email to

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