help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Directory name to variable (dired?)


From: Tim Johnson
Subject: Re: Directory name to variable (dired?)
Date: Sun, 7 Oct 2018 15:14:53 -0800
User-agent: Mutt/1.10.0 (2018-05-17)

* Drew Adams <drew.adams@oracle.com> [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



reply via email to

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