Function: hypb:locate

hypb:locate is an autoloaded, interactive and byte-compiled function defined in hypb.el.

Signature

(hypb:locate SEARCH-STRING &optional FILTER ARG)

Documentation

Find file name match anywhere and put results in the *Locate* buffer.

Pass it SEARCH-STRING as argument. Interactively, prompt for SEARCH-STRING. With prefix arg ARG, prompt for the exact shell command to run instead.

This program searches for those file names in a database that match SEARCH-STRING and normally outputs all matching absolute file names, one per line. The database normally consists of all files on your system, or of all files that you have access to. Consult the documentation of the program for the details about how it determines which file names match SEARCH-STRING. (Those details vary highly with the version.)

You can specify another program for this command to run by customizing the variables locate-command or locate-make-command-line.

The main use of FILTER is to implement locate-with-filter. See the docstring of that function for its meaning.

After preparing the results buffer, this runs dired-mode-hook and then locate-post-command-hook.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hypb.el
;;;###autoload
(defun hypb:locate (search-string &optional filter arg)
  "Find file name match anywhere and put results in the `*Locate*' buffer.
Pass it SEARCH-STRING as argument.  Interactively, prompt for SEARCH-STRING.
With prefix arg ARG, prompt for the exact shell command to run instead.

This program searches for those file names in a database that match
SEARCH-STRING and normally outputs all matching absolute file names,
one per line.  The database normally consists of all files on your
system, or of all files that you have access to.  Consult the
documentation of the program for the details about how it determines
which file names match SEARCH-STRING.  (Those details vary highly with
the version.)

You can specify another program for this command to run by customizing
the variables `locate-command' or `locate-make-command-line'.

The main use of FILTER is to implement `locate-with-filter'.  See
the docstring of that function for its meaning.

After preparing the results buffer, this runs `dired-mode-hook' and
then `locate-post-command-hook'."
  (interactive (list (let ((default (symbol-at-point)))
		       (read-string (format "Locate files anywhere with names that match%s: "
					    (if default
						(format " (default %s)" default)
					      ""))
				    nil nil default))
		     nil
		     current-prefix-arg))
  (locate search-string filter arg))