[Top][All Lists]

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

Re: Jump to directory from a *Locate* buffer

From: Bob Proulx
Subject: Re: Jump to directory from a *Locate* buffer
Date: Wed, 14 Jan 2015 15:57:20 -0700
User-agent: Mutt/1.5.23 (2014-03-12)

Marcin Borkowski wrote:
> imagine that I run M-x locate to find some file, and I want to open
> Dired in the directory one of the found files is in.  Is there a way to
> do it or should I write some Elisp for that?

What I do in that situation, already at the beginning of the file
name, is to C-space to set the mark then C-f to the end of the
directory name.  Then M-w copy to the kill ring.  Then C-x C-f C-y RET
to find-file and yank in the directory and open it in dired mode.

However using locate generates a dired buffer meaning all of those
commands are available too.  The 'w' command copies the filename.  The
0w command copies the full pathname of the file.  Therefore an
alternative could be to 0w on that filename to copy the entire full
pathname to the kill ring.  Then C-x C-f C-y and then DEL or M-DEL to
delete the filename part and then RET when the path is just the
directory name.

I am sure there are other ways too.


reply via email to

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