mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-18 76bbd07de7add0f9d13c6914f158d19630fe2f62
commit | author | age
5cb5f7 1 ;ELC
C 2 ;;; Compiled
3 ;;; in Emacs version 26.1
4 ;;; with all optimizations.
5
6 ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
7
8 ;;; This file does not contain utf-8 non-ASCII characters,
9 ;;; and so can be loaded in Emacs versions earlier than 23.
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14
15 (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' find such a file in the directory from\nwhere you launch locate, it will use this file and will not prompt you\nfor a db file.\nNote that this happen only when locate is launched with a prefix arg." 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 unless\n`helm-locate-command' is non-nil, here the default values it will use\naccording 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 \"--regex\".\n\nYou will be able to pass other options such as \"-b\" or \"l\"\nduring helm invocation after entering pattern only when multi matching,\nnot 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 space\nis 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.\nand when non--nil it will always 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\ndirectories of this 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 data base, you can use find command from findutils but\nbe aware that it will be much slower, see `helm-find-files' embebded\nhelp for more infos." helm-files] 8)
16 (defvar helm-locate-map (byte-code "\301 \302\"\210\303\304\305#\210\211\207" [helm-generic-files-map make-sparse-keymap set-keymap-parent define-key "" helm-delete-backward-no-update] 5))
17 (custom-declare-face 'helm-locate-finish '((t (:foreground "Green"))) "Face used in mode line when locate process is finish." :group 'helm-locate)
18 #@181 Try to find if a local locatedb file is available.
19 The search is done in `helm-ff-default-directory' or
20 fall back to `default-directory' if FROM-FF is nil.
21
22 (fn &optional FROM-FF)
23 (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 (#$ . 4654)])
24 #@176 Default function used to create a locale locate db file.
25 Argument DB-NAME name of the db file.
26 Argument DIRECTORY root of file system subtree to scan.
27
28 (fn DB-NAME DIRECTORY)
29 (defalias 'helm-locate-create-db-default-function #[514 "\301\302!#\207" [helm-locate-create-db-command format expand-file-name] 7 (#$ . 5064)])
30 #@132 Function used to create a locale locate db file.
31 It should receive the same arguments as
32 `helm-locate-create-db-default-function'.
33 (defvar helm-locate-create-db-function 'helm-locate-create-db-default-function (#$ . 5394))
34 #@376 Generic function to run Locate.
35 Prefix arg LOCALDB when (4) search and use a local locate db file when it
36 exists or create it, when (16) force update of existing db file
37 even if exists.
38 It have no effect when locate command is 'es'.
39 INIT is a string to use as initial input in prompt.
40 See `helm-locate-with-db' and `helm-locate'.
41
42 (fn &optional LOCALDB INIT FROM-FF DEFAULT)
43 (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 (#$ . 5624)])
44 #@53 Setup `helm-locate-command' if not already defined.
45 (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 eql 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 (#$ . 7022)])
46 (defalias 'helm-locate-initial-setup #[0 "\300\301!\210\302 \207" [require helm-for-files helm-locate-set-command] 2])
47 (defvar helm-file-name-history nil)
48 #@258 Run locate -d DB.
49 If DB is not given or nil use locate without -d option.
50 Argument DB can be given as a string or list of db files.
51 Argument INITIAL-INPUT is a string to use as initial-input.
52 See also `helm-locate'.
53
54 (fn &optional DB INITIAL-INPUT DEFAULT)
55 (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 (#$ . 7582)])
56 #@59 Initialize async locate process for `helm-source-locate'.
57 (defalias 'helm-locate-init #[0 "\306\307\"\306\310\"\203\311\202\312\204\204\312\202\311\313    !\314\n\315\267\202;\316\306\317    \"\2036\2027)\202D\n\203C\202D\320@!\321\322\323A\321#Q#\324\f!\203\\\f\202]\325\326\327!\210\326\330\331\332\333\334#\335Q\"\210\336\337 #\340\341 !\342\343\344\345\346!\347\"\350\351%\"\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 #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (smart 41)) 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-byte-code 514 "\306!\211\307U\211\203r\310 q\210    A?\205\311\312\300Qc)\202e\313\230\203\\\n\203;\314 \315\316\317#)\266\203\204;\320 \210\321\322 !r\323\324\325\326\327!\330\"\331$\216\332@\333\"\210\334\335 *\262\202e\336\337\340\341\342#\"\207" vconcat vector [helm-sources helm-locate-fuzzy-match helm-pattern inhibit-changing-match-data mode-line-format 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 internal--before-with-selected-window helm-window make-byte-code 0 "\301\300!\207" vconcat vector [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 "[Locate process finished - (%s results)]" (max (1- (count-lines (point-min) (point-max))) 0)) 'face 'helm-locate-finish))) force-mode-line-update helm-log "Error: Locate %s" replace-regexp-in-string "\n" #1#] 11 "\n\n(fn PROCESS EVENT)"] 15 (#$ . 8712)])
58 #@109 Default sort function for files in fuzzy matching.
59 Sort is done on basename of CANDIDATES.
60
61 (fn CANDIDATES)
62 (defalias 'helm-locate-default-fuzzy-sort-fn #[257 "\300\301\302#\207" [helm-fuzzy-matching-default-sort-fn-1 nil t] 5 (#$ . 10806)])
63 (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)
64 #@87 Create a new object of class type `helm-locate-override-inheritor'.
65
66 (fn &rest SLOTS)
67 (defalias 'helm-locate-override-inheritor #[128 "\300\301\302#\207" [apply make-instance helm-locate-override-inheritor] 5 (#$ . 11582)])
68 (byte-code "\300\301\302\303#\300\207" [function-put helm-locate-override-inheritor compiler-macro helm-locate-override-inheritor--anon-cmacro] 4)
69 #@26 
70
71 (fn WHOLE &rest SLOTS)
72 (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 (#$ . 11960)])
73 (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)
74 #@75 Create a new object of class type `helm-locate-source'.
75
76 (fn &rest SLOTS)
77 (defalias 'helm-locate-source #[128 "\300\301\302#\207" [apply make-instance helm-locate-source] 5 (#$ . 13073)])
78 (byte-code "\300\301\302\303#\300\207" [function-put helm-locate-source compiler-macro helm-locate-source--anon-cmacro] 4)
79 #@26 
80
81 (fn WHOLE &rest SLOTS)
82 (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 (#$ . 13391)])
83 (byte-code "\300\301\302\301\303\"\"\210\304\301\305\306\307$\207" [eieio--defalias helm--setup-source eieio--defgeneric-init-form nil eieio--defmethod :after helm-locate-override-inheritor #[257 "\211\301\302#\207" [helm-locate-map eieio-oset keymap] 6 "\n\n(fn SOURCE)"]] 5)
84 (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)"]))
85 #@16 
86
87 (fn PATTERN)
88 (defalias 'helm-locate-pattern-transformer #[257 "\203l\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\203Z\320\321\322\323\324\325!\326\"\327\330%A\316#\202k\320\321\322\331\324\325!\332\"\333\330%\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-byte-code 257 "\211\301\230\203\302\303\300\"\203\207\304!\207" vconcat vector ["$" string-match "$\\'" regexp-quote] 4 "\n\n(fn C)" "\211\301\230\203\302\303\300\"\203\207\304\305\306!#\207" ["$" string-match "$\\'" format "[^%s]*%s" regexp-quote] 6] 10 (#$ . 14275)])
89 #@25 
90
91 (fn &optional UPDATE)
92 (defalias 'helm-locate-find-dbs-in-projects #[256 "\302\303\211\211:\2039@\262\304    \305!\"\262\204(\306!\203(B\262\2022\"\210B\262A\262\202\211\237\266\204\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] 10 (#$ . 15145)])
93 (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)
94 #@83 Create a new object of class type `helm-locate-subdirs-source'.
95
96 (fn &rest SLOTS)
97 (defalias 'helm-locate-subdirs-source #[128 "\300\301\302#\207" [apply make-instance helm-locate-subdirs-source] 5 (#$ . 16368)])
98 (byte-code "\300\301\302\303#\300\207" [function-put helm-locate-subdirs-source compiler-macro helm-locate-subdirs-source--anon-cmacro] 4)
99 #@26 
100
101 (fn WHOLE &rest SLOTS)
102 (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 (#$ . 16726)])
103 (defalias 'helm-locate-init-subdirs #[0 "\302\303!r\211q\210\304\305\306\307\310!\311\"\312$\216\313\314\315\316\317\320#)\266\203\2030\321\322\323\324\325!#\2023\324\325!\324\326!#\316\317\316$\210\327 *\207" [helm-locate-recursive-dirs-command inhibit-changing-match-data generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 call-process-shell-command format "\\`es" nil t string-match replace-regexp-in-string "/" "\\\\\\\\" helm-attr basedir subdir buffer-string] 11])
104 #@124 Find files with locate in `helm-locate-project-list'.
105 With a prefix arg refresh the database in each project.
106
107 (fn UPDATE)
108 (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!\2020\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 (#$ . 17523) "P"])
109 #@458 Preconfigured `helm' for Locate.
110 Note: you can add locate options after entering pattern.
111 See 'man locate' for valid options and also `helm-locate-command'.
112
113 You can specify a local database with prefix argument ARG.
114 With two prefix arg, refresh the current local db or create it
115 if it doesn't exists.
116
117 To create a user specific db, use
118 "updatedb -l 0 -o db_path -U directory".
119 Where db_path is a filename matched by
120 `helm-locate-db-file-regexp'.
121
122 (fn ARG)
123 (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 (#$ . 18228) "P"])
124 (provide 'helm-locate)