;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311\302%\210\312\313\314\315\316DD\317\320\321\311\306&\210\312\322\314\315\323DD\324\311\306\320\321&\210\312\325\314\315\326DD\327\320\321\311\306&\210\312\330\314\315\331DD\332\320\321\311\306&\210\312\333\314\315\334DD\335\311\306\320\336&\210\312\337\314\315\340DD\341\311\306\320\342&\210\312\343\314\315\344DD\345\311\306\320\342&\210\312\346\314\315\347DD\350\311\306\320\351&\210\312\352\314\315\353DD\354\320\321\311\355&\207" [require cl-lib helm helm-types helm-help custom-declare-group helm-locate nil "Locate related Applications and libraries for Helm." :group custom-declare-variable helm-locate-db-file-regexp funcall function #[0 "\300\207" [#1="m?locate.db$"] 1 #1#] "Default regexp to match locate database.\nIf nil Search in all files." :type string helm-ff-locate-db-filename #[0 "\300\207" [#2="locate.db"] 1 #2#] "The basename of the locatedb file you use locally in your directories.\nWhen this is set and Helm finds such a file in the directory from\nwhere you launch locate, it will use this file and will not\nprompt you for a db file.\nNote that this happen only when locate is launched with a prefix\narg." helm-locate-command #[0 "\300\207" [nil] 1] "A list of arguments for locate program.\n\nHelm will calculate a default value for your system on startup\nunless `helm-locate-command' is non-nil.\n\nHere are the default values it will use according to your system:\n\nGnu/linux: \"locate %s -e -A --regex %s\"\nberkeley-unix: \"locate %s %s\"\nwindows-nt: \"es %s %s\"\nOthers: \"locate %s %s\"\n\nThis string will be passed to format so it should end with `%s'.\nThe first format spec is used for the \"-i\" value of locate/es,\nso don't set it directly but use `helm-locate-case-fold-search'\nfor this.\n\nThe last option must be the one preceding pattern i.e \"-r\" or\n\"--regex\".\n\nYou will be able to pass other options such as \"-b\" or \"l\"\nduring Helm invocation after entering pattern only when multi\nmatching, not when fuzzy matching.\n\nNote that the \"-b\" option is added automatically by Helm when\nvar `helm-locate-fuzzy-match' is non-nil and switching back from\nmultimatch to fuzzy matching (this is done automatically when a\nspace is detected in pattern)." helm-locate-create-db-command #[0 "\300\207" [#3="updatedb -l 0 -o '%s' -U '%s'"] 1 #3#] "Command used to create a locale locate db file." helm-locate-case-fold-search #[0 "\207" [helm-case-fold-search] 1] "It have the same meaning as `helm-case-fold-search'.\nThe -i option of locate will be used depending of value of\n`helm-pattern' when this is set to 'smart.\nWhen nil \"-i\" will not be used at all and when non-nil it will\nalways be used.\nNOTE: the -i option of the \"es\" command used on windows does\nthe opposite of \"locate\" command." symbol helm-locate-fuzzy-match #[0 "\300\207" [nil] 1] "Enable fuzzy matching in `helm-locate'.\nNote that when this is enabled searching is done on basename." boolean helm-locate-fuzzy-sort-fn #[0 "\300\207" [helm-locate-default-fuzzy-sort-fn] 1] "Default fuzzy matching sort function for locate." helm-locate-project-list #[0 "\300\207" [nil] 1] "A list of directories, your projects.\nWhen set, allow browsing recursively files in all directories of\nthis list with `helm-projects-find-files'." (repeat string) helm-locate-recursive-dirs-command #[0 "\300\207" [#4="locate -i -e -A --regex '^%s' '%s.*$'"] 1 #4#] "Command used for recursive directories completion in `helm-find-files'.\n\nFor Windows and `es' use something like \"es -r ^%s.*%s.*$\"\n\nThe two format specs are mandatory.\n\nIf for some reasons you can't use locate because your filesystem\ndoesn't have a database, you can use find command from findutils\nbut be aware that it will be much slower. See `helm-find-files'\nembedded help for more infos." helm-files] 8) (defvar helm-locate-map (byte-code "\301 \302\"\210\303\304\305#\210\207" [helm-generic-files-map make-sparse-keymap set-keymap-parent define-key "" helm-delete-backward-no-update] 5)) (byte-code "\301\302\303\304\305Y\205 \306\307\"BC\310\311\312%\207" [emacs-major-version custom-declare-face helm-locate-finish t append 27 (:extend t) (:foreground "Green") "Face used in mode line when locate process is finish." :group helm-locate] 6) #@182 Try to find if a local locatedb file is available. The search is done in `helm-ff-default-directory' or falls back to `default-directory' if FROM-FF is nil. (fn &optional FROM-FF) (defalias 'helm-ff-find-locatedb #[256 "\205\303\203 \206\n\"\211\205\304\"\207" [helm-ff-locate-db-filename helm-ff-default-directory default-directory locate-dominating-file expand-file-name] 5 (#$ . 4443)]) #@176 Default function used to create a locale locate db file. Argument DB-NAME name of the db file. Argument DIRECTORY root of file system subtree to scan. (fn DB-NAME DIRECTORY) (defalias 'helm-locate-create-db-default-function #[514 "\301\302!#\207" [helm-locate-create-db-command format expand-file-name] 7 (#$ . 4854)]) #@132 Function used to create a locale locate db file. It should receive the same arguments as `helm-locate-create-db-default-function'. (defvar helm-locate-create-db-function 'helm-locate-create-db-default-function (#$ . 5184)) #@376 Generic function to run Locate. Prefix arg LOCALDB when (4) search and use a local locate db file when it exists or create it, when (16) force update of existing db file even if exists. It has no effect when locate command is 'es'. INIT is a string to use as initial input in prompt. See `helm-locate-with-db' and `helm-locate'. (fn &optional LOCALDB INIT FROM-FF DEFAULT) (defalias 'helm-locate-1 #[1024 "\304\305!\210\306 \210\307\2051\310\311\"?\2051\312\232\203 \313!\2061\314\315\316\317\320 \206*\n\"\321 \322\323&\211\203E\324\232\204A\325!\204E!\210\326\205L#\207" [helm-locate-command helm-ff-default-directory default-directory helm-locate-db-file-regexp require helm-mode helm-locate-set-command #[257 "\302!\203\n\303\304!\207\305 \"!\306U\203\303\307\"\207\310\311\"\207" [helm-locate-create-db-function helm-ff-default-directory file-directory-p message "Error: The locate Db should be a file" shell-command 0 "New locatedb file `%s' created" error "Failed to create locatedb file `%s'"] 5 "\n\n(fn CANDIDATE)"] string-match "^es" (4) helm-ff-find-locatedb helm-read-file-name "Create Locate Db file: " :initial-input expand-file-name "locate.db" :preselect :test #[257 "\203\301\"\206\302!\207\211\207" [helm-locate-db-file-regexp string-match file-directory-p] 4 "\n\n(fn X)"] (16) file-exists-p helm-locate-with-db] 13 (#$ . 5414)]) #@53 Setup `helm-locate-command' if not already defined. (defalias 'helm-locate-set-command #[0 "?\205 \302\267\202\303\202\304\202\305\202\304\211\207" [helm-locate-command system-type #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (gnu/linux 11 berkeley-unix 15 windows-nt 19)) "locate %s -e -A --regex %s" "locate %s %s" "es %s %s"] 2 (#$ . 6812)]) (defalias 'helm-locate-initial-setup #[0 "\300\301!\210\302 \207" [require helm-for-files helm-locate-set-command] 2]) (defvar helm-file-name-history nil) #@258 Run locate -d DB. If DB is not given or nil use locate without -d option. Argument DB can be given as a string or list of db files. Argument INITIAL-INPUT is a string to use as initial-input. See also `helm-locate'. (fn &optional DB INITIAL-INPUT DEFAULT) (defalias 'helm-locate-with-db #[768 "\305\306!\210\203;\203C\262\307 \210\203S\310\311\312\203#\313\202$\314\315\316\317\211:\203G@\262\320!\204@\321!B\262A\262\202*\211\237\266\203\322#\" #\202p\203o\323 \317\324\325#)\266\203\204o\310\326\327 #\202p \330\331 \"\332\333\334\335\336\337\317\340 \341\n\342\304&\f)\207" [helm-locate-fuzzy-match helm-locate-command inhibit-changing-match-data file-name-history helm-file-name-history require helm-files helm-locate-set-command replace-regexp-in-string "locate" format "locate -b -d '%s'" "locate -d '%s'" mapconcat identity nil file-directory-p expand-file-name ":" "\\`locate -b" t string-match "\\`locate" "locate -b" mapcar helm-basename helm :sources helm-source-locate :buffer "*helm locate*" :ff-transformer-show-only-basename :input :default :history] 16 (#$ . 7371)]) #@75 Update mode-line with PROCESS-NAME status information. (fn PROCESS-NAME) (defalias 'helm-locate-update-mode-line #[257 "\301\302 !r\303\304\"\216\305@\306\"\210\307\310\307\311\307\312\313\314\315\316 F\317BBD\257\320 *\207" [mode-line-format internal--before-with-selected-window helm-window make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord " " mode-line-buffer-identification (:eval (format "L%s" (helm-candidate-number-at-point))) :eval propertize format "[%s process finished - (%s results)]" (max (1- (count-lines (point-min) (point-max))) 0) ('face 'helm-locate-finish) force-mode-line-update] 13 (#$ . 8501)]) #@59 Initialize async locate process for `helm-source-locate'. (defalias 'helm-locate-init #[0 "\306\307\"\306\310\"\203\311\202\312\204\204\312\202\311\313 !\314\n\315=\203;\316\306\317 \"\2036\2027)\202D\n\203C\202DA\211\203X\320@!\321\322\323\321#Q\202\\\320@!\262#\324\f!\203i\f\202j\325\326\327!\210\326\330\331\332\333\334#\335Q\"\210\336\337 #\340\341 !\342\343\"\"\210)\207" [helm-locate-command helm-pattern helm-locate-case-fold-search case-fold-search default-directory helm-buffer string-match "\\`es" "\\`locate" "-i" #1="" helm-mm-split-pattern format smart nil "[[:upper:]]" shell-quote-argument " " mapconcat identity file-directory-p "/" helm-log "Starting helm-locate process" "Command line used was:\n\n%s" ">>> " propertize face font-lock-comment-face "\n\n" start-process-shell-command "locate-process" set-process-sentinel get-buffer-process make-closure #[514 "\305!\211\306U\211\203r\307 q\210 A?\205\310\300Pc)\207\311\230\203<\n\2038\312 \313\314\315#)\266\203\2048\316 \210\317\320!\207\321\322\323\324\325#\"\207" [V0 helm-sources helm-locate-fuzzy-match helm-pattern inhibit-changing-match-data process-exit-status 1 helm-buffer-get "* Exit with code 1, no result found, command line was:\n\n " "finished\n" "\\s-" nil t string-match helm-redisplay-buffer helm-locate-update-mode-line "Locate" helm-log "Error: Locate %s" replace-regexp-in-string "\n" #1#] 11 "\n\n(fn PROCESS EVENT)"]] 15 (#$ . 9182)]) #@109 Default sort function for files in fuzzy matching. Sort is done on basename of CANDIDATES. (fn CANDIDATES) (defalias 'helm-locate-default-fuzzy-sort-fn #[257 "\300\301\302#\207" [helm-fuzzy-matching-default-sort-fn-1 nil t] 5 (#$ . 10672)]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\211$\207" [defalias helm-locate-override-inheritor-p eieio-make-class-predicate helm-locate-override-inheritor helm-locate-override-inheritor--eieio-childp eieio-make-child-predicate helm-locate-override-inheritor-child-p make-obsolete "use (cl-typep ... \\='helm-locate-override-inheritor) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (helm-type-file) nil] 6) #@87 Create a new object of class type `helm-locate-override-inheritor'. (fn &rest SLOTS) (defalias 'helm-locate-override-inheritor #[128 "\300\301\302#\207" [apply make-instance helm-locate-override-inheritor] 5 (#$ . 11448)]) (byte-code "\300\301\302\303#\300\207" [function-put helm-locate-override-inheritor compiler-macro helm-locate-override-inheritor--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'helm-locate-override-inheritor--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 11826)]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias helm-locate-source-p eieio-make-class-predicate helm-locate-source helm-locate-source--eieio-childp eieio-make-child-predicate helm-locate-source-child-p make-obsolete "use (cl-typep ... \\='helm-locate-source) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (helm-source-async helm-locate-override-inheritor) ((init :initform 'helm-locate-initial-setup) (candidates-process :initform 'helm-locate-init) (requires-pattern :initform 3) (history :initform 'helm-file-name-history) (persistent-action :initform 'helm-ff-kill-or-find-buffer-fname) (candidate-number-limit :initform 9999) (redisplay :initform (progn helm-locate-fuzzy-sort-fn)) (group :initform 'helm-locate)) nil] 6) #@75 Create a new object of class type `helm-locate-source'. (fn &rest SLOTS) (defalias 'helm-locate-source #[128 "\300\301\302#\207" [apply make-instance helm-locate-source] 5 (#$ . 12938)]) (byte-code "\300\301\302\303#\300\207" [function-put helm-locate-source compiler-macro helm-locate-source--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'helm-locate-source--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 13256)]) (cl-generic-define-method 'helm--setup-source '(:after) '((source helm-locate-override-inheritor)) nil #[257 "\211\301\302#\207" [helm-locate-map eieio-oset keymap] 6 "\n\n(fn SOURCE)"]) (defvar helm-source-locate (helm-make-source "Locate" 'helm-locate-source :pattern-transformer 'helm-locate-pattern-transformer :match-part #[257 "\303\304\305\306#)\266\203\204\n\203\306\307\"\204\310!\207\207" [helm-pattern inhibit-changing-match-data helm-locate-fuzzy-match " -b\\'" nil t string-match "\\s-" helm-basename] 8 "\n\n(fn CANDIDATE)"])) #@16 (fn PATTERN) (defalias 'helm-locate-pattern-transformer #[257 "\203X\303\304\305\306#)\266\203\203#\306\307\n\"\203\"\310\311\305\211\n$\207\307\n\304\305\306#)\266\203\2049\312\313\314\n#\211\315\316\"\211@\317\230\203O\320\321\322\"A\316#\207\320\321\323\"\316#\207\207" [helm-locate-fuzzy-match inhibit-changing-match-data helm-locate-command " " nil t string-match "\\`locate -b" replace-match "locate" replace-regexp-in-string "\\`locate" "locate -b" split-string-and-unquote "" "^" mapconcat make-closure #[257 "\211\301\230\203\302\303\300\"\203\207\304!\207" [V0 "$" string-match "$\\'" regexp-quote] 4 "\n\n(fn C)"] #[257 "\211\301\230\203\302\303\300\"\203\207\304\305\306!#\207" [V0 "$" string-match "$\\'" format "[^%s]*%s" regexp-quote] 6 "\n\n(fn C)"]] 8 (#$ . 14049)]) #@25 (fn &optional UPDATE) (defalias 'helm-locate-find-dbs-in-projects #[256 "\302\303\211\211\211:\203?@\262\304 \305!\"\262\204+\306!\203+B\262\2025\"\210B\262A\262\303\262\202\237\207" [helm-locate-project-list helm-ff-locate-db-filename #[514 "\301\"!\302U?\205\303\304\"\207" [helm-locate-create-db-function shell-command 0 error "Failed to create locatedb file `%s'"] 6 "\n\n(fn CANDIDATE DIRECTORY)"] nil expand-file-name file-name-as-directory file-exists-p] 11 (#$ . 14874)]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias helm-locate-subdirs-source-p eieio-make-class-predicate helm-locate-subdirs-source helm-locate-subdirs-source--eieio-childp eieio-make-child-predicate helm-locate-subdirs-source-child-p make-obsolete "use (cl-typep ... \\='helm-locate-subdirs-source) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (helm-source-in-buffer) ((basedir :initarg :basedir :initform nil :custom string) (subdir :initarg :subdir :initform nil :custom 'string) (data :initform #'helm-locate-init-subdirs) (group :initform 'helm-locate)) nil] 6) #@83 Create a new object of class type `helm-locate-subdirs-source'. (fn &rest SLOTS) (defalias 'helm-locate-subdirs-source #[128 "\300\301\302#\207" [apply make-instance helm-locate-subdirs-source] 5 (#$ . 16101)]) (byte-code "\300\301\302\303#\300\207" [function-put helm-locate-subdirs-source compiler-macro helm-locate-subdirs-source--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'helm-locate-subdirs-source--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 16459)]) (defalias 'helm-locate-init-subdirs #[0 "\302\303\304\"r\211q\210\305\306\"\216\307\310\311\304\312#)\266\203\203*\313\314\315!\314\316!#\202M\313\317\311\304\312#)\266\203\203F\320\321\322\314\316!#\202I\314\316!\314\315!#\311\304\311$\210\323 *\207" [helm-locate-recursive-dirs-command inhibit-changing-match-data generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] call-process-shell-command "\\`fd" nil string-match format helm-get-attr subdir basedir "\\`es" replace-regexp-in-string "/" "\\\\\\\\" buffer-string] 11]) #@124 Find files with locate in `helm-locate-project-list'. With a prefix arg refresh the database in each project. (fn UPDATE) (defalias 'helm-projects-find-files #[257 "\302 \210\303\304\305\306#)\266\203\203\307\310!\204 \311\312\313\304\211$\210\314!\211\203+\315!\207\316\317!\207" [helm-locate-command inhibit-changing-match-data helm-locate-set-command #1="\\`locate" nil t string-match executable-find #2="updatedb" cl--assertion-failed (and (string-match-p #1# helm-locate-command) (executable-find #2#)) "Unsupported locate version" helm-locate-find-dbs-in-projects helm-locate-with-db user-error "No projects found, please setup `helm-locate-project-list'"] 8 (#$ . 17306) "P"]) #@458 Preconfigured `helm' for Locate. Note: you can add locate options after entering pattern. See 'man locate' for valid options and also `helm-locate-command'. You can specify a local database with prefix argument ARG. With two prefix arg, refresh the current local db or create it if it doesn't exists. To create a user specific db, use "updatedb -l 0 -o db_path -U directory". Where db_path is a filename matched by `helm-locate-db-file-regexp'. (fn ARG) (defalias 'helm-locate #[257 "\302\303\304C\"\210\305\306\211\307\310!$\207" [default-directory helm-ff-default-directory helm-set-local-variable helm-async-outer-limit-hook #[0 "\205\303 \304\305\306#)\266\203?\205\307 \207" [helm-locate-fuzzy-match helm-pattern inhibit-changing-match-data "\\s-" nil t string-match helm-redisplay-buffer] 7] helm-locate-1 nil thing-at-point filename] 7 (#$ . 18009) "P"]) (provide 'helm-locate)