Function: locate-find-directory
locate-find-directory is an interactive and byte-compiled function
defined in locate.el.gz.
Signature
(locate-find-directory)
Documentation
Visit the directory of the file mentioned on this line.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/locate.el.gz
;;; Modified three functions from `dired.el':
;;; dired-find-directory,
;;; dired-find-directory-other-window
;;; dired-get-filename
(defun locate-find-directory ()
"Visit the directory of the file mentioned on this line."
(interactive)
(if (locate-main-listing-line-p)
(let ((directory-name (locate-get-dirname)))
(if (file-directory-p directory-name)
(find-file directory-name)
(if (file-symlink-p directory-name)
(error "Directory is a symlink to a nonexistent target")
(error "Directory no longer exists; run `updatedb' to update database"))))
(message "This command only works inside main listing.")))