From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Directory name to variable (dired?) Date: Sun, 7 Oct 2018 23:02:44 +0000 (UTC) Message-ID: References: <20181007214950.GA17855@mail.akwebsoft.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1538953288 3990 195.159.176.226 (7 Oct 2018 23:01:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 7 Oct 2018 23:01:28 +0000 (UTC) To: Tim Johnson , Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 08 01:01:24 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 1g9I39-0000tz-0U for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Oct 2018 01:01:23 +0200 Original-Received: from localhost ([::1]:43733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9I5F-0003n5-6y for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Oct 2018 19:03:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9I4i-0003n0-Tj for Help-gnu-emacs@gnu.org; Sun, 07 Oct 2018 19:03:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9I4f-00086M-NY for Help-gnu-emacs@gnu.org; Sun, 07 Oct 2018 19:03:00 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:49534) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9I4f-000846-FB for Help-gnu-emacs@gnu.org; Sun, 07 Oct 2018 19:02:57 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w97N0Kcv155868; Sun, 7 Oct 2018 23:02:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=iQYT4quYV0/+2kBpIR/BHqG8wj2x1eohkl0lOQeJ4eQ=; b=Gn9LRnhCkkwhrRb3yxNWgpYoYSTUtUltio2ktCEuk7MANncHHvRdNBUJ7A07J43dKrZX du9lSRu+kCeHzYk285RMAvUXjt+GFk77Hj7yfl8Rn9jZXazblq2seVDaD+lE84eO+Lon cwlDMm6lAW/9XXI8JVF1nS0BdyeN0rPWAiBgCHND7pf5RMCf60CD/AHlgeqx+ykDRVv2 +7JqwqRbSf0FcdQw00ObqKtUke550amJpjSa8Vx/aMFp3NfVtUC3vhH5UisMPk0hgBxK o6Jms/jEKNoQ9ZqJgNcYNgUFrDGKWz26Y+PNrXKVB9PXqNjkowqWCy88YUsuoZ/9sFln xA== Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2mxnpqkcm2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 07 Oct 2018 23:02:52 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w97N2jb2031554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 7 Oct 2018 23:02:46 GMT Original-Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w97N2jxo020822; Sun, 7 Oct 2018 23:02:45 GMT In-Reply-To: <20181007214950.GA17855@mail.akwebsoft.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4735.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9039 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=612 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810070235 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.85 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:118190 Archived-At: > Is there a function that returns a directory and full path > so that it could be assigned to a variable? >=20 > 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.