From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: How to put default-directory into kill-ring? Date: Fri, 14 Feb 2014 13:41:09 +0100 Organization: WMI UAM Message-ID: <20140214134109.23226acb@aga-netbook> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1392381686 22633 80.91.229.3 (14 Feb 2014 12:41:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Feb 2014 12:41:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 14 13:41:35 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WEI5G-0004FG-L4 for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Feb 2014 13:41:34 +0100 Original-Received: from localhost ([::1]:51399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEI5G-0002k9-AA for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Feb 2014 07:41:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEI52-0002jr-8K for help-gnu-emacs@gnu.org; Fri, 14 Feb 2014 07:41:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WEI4x-0006QU-EW for help-gnu-emacs@gnu.org; Fri, 14 Feb 2014 07:41:20 -0500 Original-Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:55934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEI4x-0006Pz-8P for help-gnu-emacs@gnu.org; Fri, 14 Feb 2014 07:41:15 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id 80D1142062 for ; Fri, 14 Feb 2014 13:41:11 +0100 (CET) Original-Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x-b+3a5iRxEo for ; Fri, 14 Feb 2014 13:41:11 +0100 (CET) Original-Received: from aga-netbook (jedenzero6-jeden5osiem.echostar.pl [213.156.106.158]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 5B8B042061 for ; Fri, 14 Feb 2014 13:41:11 +0100 (CET) In-Reply-To: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.20; i686-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:808:114:2::50 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96081 Archived-At: Dnia 2014-02-12, o godz. 10:14:24 Stefan Monnier napisa=C5=82(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? >=20 > 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, --=20 Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University