all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: help-gnu-emacs@gnu.org
Subject: Re: How to put default-directory into kill-ring?
Date: Fri, 14 Feb 2014 13:41:09 +0100	[thread overview]
Message-ID: <20140214134109.23226acb@aga-netbook> (raw)
In-Reply-To: <jwvob2c9xhs.fsf-monnier+gmane.emacs.help@gnu.org>

Dnia 2014-02-12, o godz. 10:14:24
Stefan Monnier <monnier@iro.umontreal.ca> napisał(a):

> >> 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?
> 
> We could provide such a feature, of course.  If you have a good UI for
> it, please tell.

Thanks!

Well, as I wrote: M-x pwd currently does *nothing* with its prefix
argument, and only outputs the default directory in the minibuffer.  So
C-u M-x pwd is basically "wasted".

Another possible use case might be to have my current directory in the
kill ring so that I can `cd' to it in an eshell buffer (assuming I
don't want to open a new one).  Or even in an xterm, for that matter.

> When I need such a thing, I usually use something like C-x C-f
> then copy the part I want, then C-g.

This is not exactly the same, since then I'm stuck with the "~/" prefix
for my home directory, which may or may not be what is wanted.  Also,
in case of us Ido users, this requires one more keypress (it's one more
C-f, so not *that* inconvenient, but still).

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



  reply	other threads:[~2014-02-14 12:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 14:44 How to put default-directory into kill-ring? Barry OReilly
2014-02-12 15:14 ` Stefan Monnier
2014-02-14 12:41   ` Marcin Borkowski [this message]
2014-02-14 13:24     ` Stefan Monnier
2014-02-14 13:40       ` Nicolas Richard
2014-02-14 16:32         ` Stefan Monnier
2014-02-14 18:41         ` Marcin Borkowski
2014-02-14 21:31           ` Nicolas Richard
2014-02-14 18:42       ` Marcin Borkowski
2014-02-14 12:59   ` Michael Heerdegen
2014-02-14 18:40     ` Marcin Borkowski
  -- strict thread matches above, loose matches on Subject: below --
2014-02-04 11:07 Marcin Borkowski
2014-02-04 11:46 ` Thorsten Jolitz
2014-02-05 17:03   ` Marcin Borkowski
2014-02-04 14:01 ` Drew Adams
2014-02-05 17:03   ` Marcin Borkowski
2014-02-04 17:34 ` Leo Liu

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=20140214134109.23226acb@aga-netbook \
    --to=mbork@wmi.amu.edu.pl \
    --cc=help-gnu-emacs@gnu.org \
    /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.