HOME


sh-3ll 1.0
DIR:/proc/self/root/proc/thread-self/root/usr/share/emacs/26.1/lisp/
Upload File :
Current File : //proc/self/root/proc/thread-self/root/usr/share/emacs/26.1/lisp/find-dired.elc
;ELC
;;; Compiled
;;; in Emacs version 26.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\302\303\304\305\306\301\307\310&\210\311\312\313\314\315DD\316\317\320\306\303\321\322&	\210\311\323\313\314\324DD\325\317\320\321\326\306\303&	\210\311\327\313\314\330DD\331\317\320\321\322\306\303&	\210\311\332\313\314\333DD\334\321\322\306\303&\210\311\335\313\314\336DD\337\321\322\306\303\317\340&	\207" [require dired custom-declare-group find-dired nil "Run a `find' command and Dired the output." :group :prefix "find-" custom-declare-variable find-exec-terminator funcall function #[0 "\3021\303\304\211\211	\305\306\307\310&	0\202\210\304\311=\203\310\207\312\313!\207" [find-program null-device (error) process-file nil "-exec" "echo" "{}" "+" 0 shell-quote-argument ";"] 10] "String that terminates \"find -exec COMMAND {} \".\nThe value should include any needed quoting for the shell.\nCommon values are \"+\" and \"\\\\;\", with the former more efficient\nthan the latter." :version "24.1" :type string find-ls-option #[0 "\3041\305\306\211\211	\307&0\202\210\306\310=\203&\307\n\311=\203#\312\202$\313B\207\314\315\"\316B\207" [find-program null-device system-type find-exec-terminator (error) process-file nil "-ls" 0 berkeley-unix "-gilsb" "-dilsb" format "-exec ls -ld {} %s" "-ld"] 7] "A pair of options to produce and parse an `ls -l'-type list from `find'.\nThis is a cons of two strings (FIND-OPTION . LS-SWITCHES).\nFIND-OPTION is the option (or options) passed to `find' to produce\na file listing in the desired format.  LS-SWITCHES is a set of\n`ls' switches that tell dired how to parse the output of `find'.\n\nThe two options must be set to compatible values.\nFor example, to use human-readable file sizes with GNU ls:\n   (\"-exec ls -ldh {} +\" . \"-ldh\")\n\nTo use GNU find's inbuilt \"-ls\" option to list files:\n   (\"-ls\" . \"-dilsb\")\nsince GNU find's output has the same format as using GNU ls with\nthe options \"-dilsb\"." (cons (string :tag "Find Option") (string :tag "Ls Switches")) find-ls-subdir-switches #[0 "\301\302A\"\203\n\303\207\304\207" [find-ls-option string-match "-[a-z]*b" "-alb" "-al"] 3] "`ls' switches for inserting subdirectories in `*Find*' buffers.\nThis should contain the \"-l\" switch.\nUse the \"-F\" or \"-b\" switches if and only if you also use\nthem for `find-ls-option'." find-grep-options #[0 "\302=\204
\303\304	\"\203\305\207\306\207" [system-type system-configuration berkeley-unix string-match "solaris2" "-s" "-q"] 3] "Option to grep to be as silent as possible.\nOn Berkeley systems, this is `-s'; on Posix, and with GNU grep, `-q' does it.\nOn other systems, the closest you can come is to use `-l'." find-name-arg #[0 "\203\301\207\302\207" [read-file-name-completion-ignore-case "-iname" "-name"] 1] "Argument used to specify file name pattern.\nIf `read-file-name-completion-ignore-case' is non-nil, -iname is used so that\nfind also ignores case.  Otherwise, -name is used." "22.2"] 10)
#@50 Last arguments given to `find' by \[find-dired].
(defvar find-args nil (#$ . 3338))
(defvar find-args-history nil)
#@278 Run `find' and go into Dired mode on a buffer of the output.
The command run (after changing into DIR) is essentially

    find . \( ARGS \) -ls

except that the car of the variable `find-ls-option' specifies what to
use in place of "-ls" as the final argument.

(fn DIR ARGS)
(defalias 'find-dired #[514 "\306\307!!\262\310!\204\311\312\"\210\313\314\315!!\210\316p!\211\203R\317!\320=\2031\321\322\323!!\203L\3241D\325!\210\326\327!\210\330!0\202H\210\202R\210\202R\311\331\332 \"\210\210~\210\333 \210\334\335 \210\211\f\336\337\230\203m\337\202y\340\341!\342\342\340\343!\342\260\344\345
@\"\203\221\346\347\350\327
@\"\340\351!@$\202\223
@R\262\352\353Pp\"\210\354
A\"\210\355 \356\357 \"\210\360\361\362#\210\363!\266\364\365!\210\3665\364\367!\210\370\371\372EE7\373\374!\203\326\374 \210\202\341\364\375!\210\n\376 BC=\364\377!\210A?\334\201C\201D\261\210`\201C\201E\261\210\201F`\"\266\366\316p!\201G\201H\"\210\201I\201J\"\210\201K!`p\223\266\201L\211B)\207" [dired-buffers buffer-read-only default-directory find-args find-program find-ls-option file-name-as-directory expand-file-name file-directory-p error "find-dired needs a directory: %s" switch-to-buffer get-buffer-create "*Find*" get-buffer-process process-status run yes-or-no-p format-message "A `find' process is running; kill it? " (error) interrupt-process sit-for 1 delete-process "Cannot have two processes in `%s' at once" buffer-name kill-all-local-variables nil erase-buffer " . " "" shell-quote-argument "(" " " ")" string-match "\\`\\(.*\\) {} \\(\\\\;\\|+\\)\\'" format "%s %s %s" match-string "{}" shell-command "&" dired-mode make-sparse-keymap set-keymap-parent current-local-map define-key "" kill-find use-local-map make-local-variable dired-sort-inhibit t revert-buffer-function lambda (ignore-auto noconfirm) find-dired fboundp dired-simple-subdir-alist dired-subdir-alist point-min-marker dired-subdir-switches find-exec-terminator find-ls-subdir-switches mode-line-process "  " ":\n" "\n" dired-insert-set-properties set-process-filter find-dired-filter set-process-sentinel find-dired-sentinel process-mark (":%s")] 10 (#$ . 3460) (byte-code "\301\302\303\304\305$\306\307\310#D\207" [find-args read-directory-name "Run find in directory: " nil "" t read-string "Run find (with args): " (find-args-history . 1)] 5)])
#@56 Kill the `find' process running in the current buffer.
(defalias 'kill-find #[0 "\300p!\211\205$\301!\302=\205$\303!\304=\205$\3051\"\306!0\202$\210\307\207" [get-buffer-process process-status run process-filter find-dired-filter (error) delete-process nil] 3 (#$ . 5848) nil])
#@333 Search DIR recursively for files matching the globbing pattern PATTERN,
and run Dired on those files.
PATTERN is a shell wildcard (not an Emacs regexp) and need not be quoted.
The default command run (after changing into DIR) is

    find . -name \='PATTERN\=' -ls

See `find-name-arg' to customize the arguments.

(fn DIR PATTERN)
(defalias 'find-name-dired #[514 "\301\302\303!Q\"\207" [find-name-arg find-dired " " shell-quote-argument] 8 (#$ . 6141) "DFind-name (directory): \nsFind-name (filename wildcard): "])
(defalias 'lookfor-dired 'find-grep-dired)
#@364 Find files in DIR that contain matches for REGEXP and start Dired on output.
The command run (after changing into DIR) is

  find . \( -type f -exec `grep-program' `find-grep-options' \
    -e REGEXP {} \; \) -ls

where the first string in the value of the variable `find-ls-option'
specifies what to use in place of "-ls" as the final argument.

(fn DIR REGEXP)
(defalias 'find-grep-dired #[514 "\302\303\304	\305\306!\304\306\307!\304\306\310!\260\n\"\207" [grep-program find-grep-options find-dired "-type f -exec " " " " -e " shell-quote-argument "{}" ";"] 15 (#$ . 6711) "DFind-grep (directory): \nsFind-grep (grep regexp): "])
#@20 

(fn PROC STRING)
(defalias 'find-dired-filter #[514 "\303!\304\305!\203\262r\211q\210\212\214~\210\306d	:\205\307\310	A\"\311b\210c\210b\210\312\313!\2044\314y\210\312\313!\203C\315c\210\314y\210\2024\316Zb\210\317\320\306\304#\203Y``\321Z|\210\202H\203\214b\210\322 b\210\323\306\304#\203\214\324\325\326\327\314!\"\306\211\211\314%\210\324\325\330\327\321!\"\306\211\211\321%\210\314y\210\202ddb\210\331\332\333	!\304#\205\253\334\333!`T\"\210\333!`T\306\223)\266\204+\202\265\335!)\207" [inhibit-read-only find-ls-option buffer-read-only process-buffer t buffer-name nil string-match "l" "^ +[^ 	
\n]+\\( +[^ 	
\n]+\\) +[^ 	
\n]+ +[^ 	
\n]+\\( +[0-9]+\\)" looking-at "^" 1 "  " 3 search-forward " ./" 2 line-beginning-position re-search-forward replace-match format "%4s" match-string "%9s" search-backward "\n" process-mark dired-insert-set-properties delete-process] 13 (#$ . 7354)])
#@19 

(fn PROC STATE)
(defalias 'find-dired-sentinel #[514 "\303!\304\305!\205Br\211q\210\306\212db\210`\307\261\210\310u\210\311\312 \313\314O\261\210\315`\"\266\316\317\320!!P\321!\210\322 \210*\323\324p\"))\207" [inhibit-read-only buffer-read-only mode-line-process process-buffer t buffer-name nil "\n  find " -1 " at " current-time-string 0 19 dired-insert-set-properties ":" symbol-name process-status delete-process force-mode-line-update message "find-dired %s finished."] 8 (#$ . 8282)])
(provide 'find-dired)