From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: Directory name to variable (dired?) Date: Sun, 7 Oct 2018 15:14:53 -0800 Organization: AkWebsoft Message-ID: <20181007231453.GB17855@mail.akwebsoft.com> References: <20181007214950.GA17855@mail.akwebsoft.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1538954959 24037 195.159.176.226 (7 Oct 2018 23:29:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 7 Oct 2018 23:29:19 +0000 (UTC) User-Agent: Mutt/1.10.0 (2018-05-17) To: Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 08 01:29:15 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9IU7-00069B-C9 for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Oct 2018 01:29:15 +0200 Original-Received: from localhost ([::1]:43777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9IWD-0008GO-KR for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Oct 2018 19:31:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9IVP-00086h-HG for Help-gnu-emacs@gnu.org; Sun, 07 Oct 2018 19:30:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9IGF-0008TG-Eu for Help-gnu-emacs@gnu.org; Sun, 07 Oct 2018 19:15:00 -0400 Original-Received: from tjohnson.mtaonline.net ([64.4.232.191]:58188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9IGF-0008SF-6G for Help-gnu-emacs@gnu.org; Sun, 07 Oct 2018 19:14:55 -0400 Original-Received: by linus (Postfix, from userid 1000) id 149AA24015F; Sun, 7 Oct 2018 15:14:53 -0800 (AKDT) Mail-Followup-To: Emacs Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.4.232.191 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:118192 Archived-At: * Drew Adams [181007 15:07]: > > Is there a function that returns a directory and full path > > so that it could be assigned to a variable? > > > > Ideally, dired would be a great place to start, as the directory > > path is at the top of the screen. > > In Dired, `M-0 w' invokes command `dired-copy-filename-as-kill' > with prefix arg 0, which copies the absolute name of the file > named on the current line. > > Non-interactively, (dired-copy-filename-as-kill 0) does the > same thing. > > Then (setq foo (current-kill 0)) sets variable `foo' to a string > with that absolute file name. Thanks Drew. I can use that, and without adding another package. Cheers -- Tim Johnson http://www.tj49.com