;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@36 emms-source-file.el version string (defvar emms-source-file-version "0.2 $Revision: 1.30 $" (#$ . 87)) (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\302!\210\304\305\306\307\310\311\312\313&\210\314\315\316\317\320DD\321\322\323%\210\314\324\316\317\325DD\326\322\317\327\330&\210\314\331\316\317\332DD\333\322\334%\210\314\335\316\317\336DD\337\322\340%\210\314\341\316\317\342DD\343\322\344%\210\345\346\347\350!\203f\350\202g\351\"\207" [require emms dired locate custom-declare-group emms-source-file nil "*Sources for EMMS that use the file system." :prefix "emms-source-file-" :group emms-source custom-declare-variable emms-source-file-default-directory funcall function #[0 "\300\207" [nil] 1] "The default directory to look for media files." :type (choice (const :tag "None" nil) file) emms-source-file-directory-tree-function #[0 "\300\207" [emms-source-file-directory-tree-internal] 1] "*A function to call that searches in a given directory all files\nthat match a given regex. DIR and REGEX are the only arguments passed\nto this function.\nYou have two build-in options:\n`emms-source-file-directory-tree-internal' will work always, but might\nbe slow.\n`emms-source-file-directory-tree-find' will work only if you have GNU\nfind, but it's faster." :options (emms-source-file-directory-tree-internal emms-source-file-directory-tree-find) emms-source-file-exclude-regexp #[0 "\300\207" ["\\`\\(#.*#\\|.*,v\\|.*~\\|\\.\\.?\\|\\.#.*\\|,.*\\)\\'\\|/\\(CVS\\|RCS\\|\\.arch-ids\\|{arch}\\|,.*\\|\\.svn\\|_darcs\\)\\(/\\|\\'\\)"] 1] "A regexp matching files to be ignored when adding directories.\n\nYou should set case-fold-search to nil before using this regexp\nin code." regexp emms-source-file-gnu-find #[0 "\300\207" [#1="find"] 1 #1#] "The program name for GNU find." string emms-source-file-directory-hint-p #[0 "\300\207" [t] 1] "When non-nil, guess the directory based on a track at point." boolean defalias emms-read-directory-name fboundp read-directory-name read-file-name] 8) (defalias 'emms-source-file-directory-hint #[0 "\203! \203!\303 \203!\304\303 \305\"\304\303 \306\"\211\307=\205 \310!\207\n\207" [emms-source-file-directory-hint-p emms-playlist-buffer-p emms-source-file-default-directory emms-playlist-track-at emms-track-get name type file file-name-directory] 4]) #@86 An EMMS source for a single file - either FILE, or queried from the user. (fn FILE) (defalias 'emms-source-file #[257 "\300!\203\n\301!\207\302\303\304\305!\"!\207" [file-directory-p emms-source-directory emms-playlist-insert-track emms-track file expand-file-name] 6 (#$ . 2411)]) #@86 An EMMS source for a single file - either FILE, or queried from the user. (fn FILE) (defalias 'emms-play-file #[257 "\203\f\301\302\303\")\207\304\303\"\207" [current-prefix-arg nil emms-source-add emms-source-file emms-source-play] 4 (#$ . 2704) (byte-code "\301\302\303 \304$C\207" [emms-source-file-default-directory read-file-name "Play file: " emms-source-file-directory-hint t] 5)]) #@86 An EMMS source for a single file - either FILE, or queried from the user. (fn FILE) (defalias 'emms-add-file #[257 "\203\f\301\302\303\")\207\304\303\"\207" [current-prefix-arg nil emms-source-play emms-source-file emms-source-add] 4 (#$ . 3106) (byte-code "\301\302\303 \304$C\207" [emms-source-file-default-directory read-file-name "Play file: " emms-source-file-directory-hint t] 5)]) #@86 An EMMS source for a single file - either FILE, or queried from the user. (fn FILE) (defalias 'emms-insert-file #[257 "\300\301\"\207" [emms-source-insert emms-source-file] 4 (#$ . 3507) (byte-code "\301\302\303 \304$C\207" [emms-source-file-default-directory read-file-name "Play file: " emms-source-file-directory-hint t] 5)]) #@93 An EMMS source for a whole directory tree - either DIR, or queried from the user. (fn DIR) (defalias 'emms-source-directory #[257 "\300\301\302\303\304 #\"\207" [mapc #[257 "\302\303 \")\206 \304!?\205\305\306\307\310!\"!\207" [case-fold-search emms-source-file-exclude-regexp nil string-match file-directory-p emms-playlist-insert-track emms-track file expand-file-name] 6 "\n\n(fn FILE)"] directory-files t emms-source-file-regex] 7 (#$ . 3845)]) #@93 An EMMS source for a whole directory tree - either DIR, or queried from the user. (fn DIR) (defalias 'emms-play-directory #[257 "\203\f\301\302\303\")\207\304\303\"\207" [current-prefix-arg nil emms-source-add emms-source-directory emms-source-play] 4 (#$ . 4309) (byte-code "\301\302\303 \304$C\207" [emms-source-file-default-directory emms-read-directory-name "Play directory: " emms-source-file-directory-hint t] 5)]) #@93 An EMMS source for a whole directory tree - either DIR, or queried from the user. (fn DIR) (defalias 'emms-add-directory #[257 "\203\f\301\302\303\")\207\304\303\"\207" [current-prefix-arg nil emms-source-play emms-source-directory emms-source-add] 4 (#$ . 4743) (byte-code "\301\302\303 \304$C\207" [emms-source-file-default-directory emms-read-directory-name "Play directory: " emms-source-file-directory-hint t] 5)]) #@93 An EMMS source for a whole directory tree - either DIR, or queried from the user. (fn DIR) (defalias 'emms-insert-directory #[257 "\300\301\"\207" [emms-source-insert emms-source-directory] 4 (#$ . 5176) (byte-code "\301\302\303 \304$C\207" [emms-source-file-default-directory emms-read-directory-name "Play directory: " emms-source-file-directory-hint t] 5)]) #@123 An EMMS source for multiple directory trees - either DIR, or the value of `emms-source-file-default-directory'. (fn DIR) (defalias 'emms-source-directory-tree #[257 "\301\302!\303 \"\304\305 \210\306\307\")\207" [case-fold-search emms-source-file-directory-tree expand-file-name emms-source-file-regex nil emms-playlist-ensure-playlist-buffer mapc #[257 "\302\"?\205 \303\304\"!\207" [emms-source-file-exclude-regexp emms-playlist-insert-track-function string-match emms-track file] 5 "\n\n(fn FILE)"]] 5 (#$ . 5547)]) #@123 An EMMS source for multiple directory trees - either DIR, or the value of `emms-source-file-default-directory'. (fn DIR) (defalias 'emms-play-directory-tree #[257 "\203\f\301\302\303\")\207\304\303\"\207" [current-prefix-arg nil emms-source-add emms-source-directory-tree emms-source-play] 4 (#$ . 6082) (byte-code "\301\302\303 \304$C\207" [emms-source-file-default-directory emms-read-directory-name "Play directory tree: " emms-source-file-directory-hint t] 5)]) #@123 An EMMS source for multiple directory trees - either DIR, or the value of `emms-source-file-default-directory'. (fn DIR) (defalias 'emms-add-directory-tree #[257 "\203\f\301\302\303\")\207\304\303\"\207" [current-prefix-arg nil emms-source-play emms-source-directory-tree emms-source-add] 4 (#$ . 6562) (byte-code "\301\302\303 \304$C\207" [emms-source-file-default-directory emms-read-directory-name "Play directory tree: " emms-source-file-directory-hint t] 5)]) #@123 An EMMS source for multiple directory trees - either DIR, or the value of `emms-source-file-default-directory'. (fn DIR) (defalias 'emms-insert-directory-tree #[257 "\300\301\"\207" [emms-source-insert emms-source-directory-tree] 4 (#$ . 7041) (byte-code "\301\302\303 \304$C\207" [emms-source-file-default-directory emms-read-directory-name "Play directory tree: " emms-source-file-directory-hint t] 5)]) #@118 An EMMS source that will find files in DIR or `emms-source-file-default-directory' that match REGEX. (fn DIR REGEX) (defalias 'emms-source-find #[514 "\300\301\302\303!\"\"\207" [mapc #[257 "\302\303 \")?\205\304\305\306\"!\207" [case-fold-search emms-source-file-exclude-regexp nil string-match emms-playlist-insert-track emms-track file] 5 "\n\n(fn FILE)"] emms-source-file-directory-tree expand-file-name] 7 (#$ . 7457)]) #@118 An EMMS source that will find files in DIR or `emms-source-file-default-directory' that match REGEX. (fn DIR REGEX) (defalias 'emms-play-find #[514 "\203 \301\302\303#)\207\304\303#\207" [current-prefix-arg nil emms-source-add emms-source-find emms-source-play] 6 (#$ . 7897) (byte-code "\301\302\211\303$\304\305!D\207" [emms-source-file-default-directory emms-read-directory-name "Find in directory: " t read-from-minibuffer "Find files matching: "] 5)]) #@118 An EMMS source that will find files in DIR or `emms-source-file-default-directory' that match REGEX. (fn DIR REGEX) (defalias 'emms-add-find #[514 "\203 \301\302\303#)\207\304\303#\207" [current-prefix-arg nil emms-source-play emms-source-find emms-source-add] 6 (#$ . 8370) (byte-code "\301\302\211\303$\304\305!D\207" [emms-source-file-default-directory emms-read-directory-name "Find in directory: " t read-from-minibuffer "Find files matching: "] 5)]) #@118 An EMMS source that will find files in DIR or `emms-source-file-default-directory' that match REGEX. (fn DIR REGEX) (defalias 'emms-insert-find #[514 "\300\301#\207" [emms-source-insert emms-source-find] 6 (#$ . 8842) (byte-code "\301\302\211\303$\304\305!D\207" [emms-source-file-default-directory emms-read-directory-name "Find in directory: " t read-from-minibuffer "Find files matching: "] 5)]) #@43 Return all marked files of a dired buffer (defalias 'emms-source-dired #[0 "\301\302rq\210\303 )\"\207" [emms-source-old-buffer mapc #[257 "\300!\203\n\301!\207\302!\207" [file-directory-p emms-source-directory-tree emms-source-file] 3 "\n\n(fn FILE)"] dired-get-marked-files] 3 (#$ . 9251)]) #@43 Return all marked files of a dired buffer (defalias 'emms-play-dired #[0 "\203 \301\302\303!)\207\304\303!\207" [current-prefix-arg nil emms-source-add emms-source-dired emms-source-play] 2 (#$ . 9555) nil]) #@43 Return all marked files of a dired buffer (defalias 'emms-add-dired #[0 "\203 \301\302\303!)\207\304\303!\207" [current-prefix-arg nil emms-source-play emms-source-dired emms-source-add] 2 (#$ . 9772) nil]) #@43 Return all marked files of a dired buffer (defalias 'emms-insert-dired #[0 "\300\301!\207" [emms-source-insert emms-source-dired] 2 (#$ . 9988) nil]) #@135 Return a list of all files under DIR that match REGEX. This function uses `emms-source-file-directory-tree-function'. (fn DIR REGEX) (defalias 'emms-source-file-directory-tree #[514 "\301\302!\210\303\"\304\"\301\305!\210\207" [emms-source-file-directory-tree-function message "Building playlist..." sort string< "Building playlist...done"] 6 (#$ . 10145)]) #@140 Return a list of all files under DIR that match REGEX. This function uses only emacs functions, so it might be a bit slow. (fn DIR REGEX) (defalias 'emms-source-file-directory-tree-internal #[514 "\300C\211\203j\301@!\203N\302\303@\"\204,\304@!\211\205'\305\306!O\230\262\2033\211A\262\202\3071F\310A\311@\312\300\312$\"0\202I\210\211A\262\202\302@\"\203c\211@B\262\211A\262\202\211A\262\202\207" [nil file-directory-p string-match "/\\.\\.?$" file-symlink-p 0 string-width (error) append directory-files t] 11 (#$ . 10514)]) #@191 Return a list of all files under DIR that match REGEX. This function uses the external find utility. The name for GNU find may be supplied using `emms-source-file-gnu-find'. (fn DIR REGEX) (defalias 'emms-source-file-directory-tree-find #[514 "\301\302\303\"r\211q\210\304\305\"\216\306\307\303\307\310\311 !\312\313\314\315\f\316Q&\n\210\317\320\321ed{\322\"\"*\207" [emms-source-file-gnu-find generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] call-process nil "-L" expand-file-name "-type" "f" "-iregex" ".*\\(" "\\).*" delete "" split-string "\n"] 16 (#$ . 11084)]) #@74 Run BODY while excluding DIRECTORY-LIST. (fn DIRECTORY-LIST &rest BODY) (defalias 'emms-with-excluded-directories '(macro . #[385 "\301\300\302\303\304BB\305\303\306D\307BB\310BBBBDCBB\207" [emms-source-file-exclude-regexp let concat or (#1="") "\\|\\(" regexp-opt (#1#) ("\\)")] 10 (#$ . 11726)])) #@84 Return a regexp that matches everything any player (that supports files) can play. (defalias 'emms-source-file-regex #[0 "\301\302\303#\207" [emms-player-list mapconcat #[257 "\300\301\"\206\302\207" [emms-player-get regex ""] 4 "\n\n(fn PLAYER)"] "\\|"] 4 (#$ . 12036)]) #@75 Search for REGEXP and display the results in a locate buffer (fn REGEXP) (defalias 'emms-locate #[257 "\301\302!\210\303 \304\305\"\216\306\307!q\210\310 \210\311 \210\312\313\314\"\"\210\315!\210)\210\316 \307\230\204/\317\307!\210\320\321!\210\322\323!\207" [emms-source-file-default-directory require locate current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] get-buffer-create "*EMMS Find*" locate-mode erase-buffer mapc #[257 "\300\236A\301\261\207" [name "\n"] 3 "\n\n(fn ELT)"] emms-source-find locate-do-setup buffer-name switch-to-buffer-other-window run-hooks dired-mode-hook dired-next-line 2] 7 (#$ . 12318) "sRegexp to search for: "]) #@67 An EMMS source for an URL - for example, for streaming. (fn URL) (defalias 'emms-source-url #[257 "\300\301\302\"!\207" [emms-playlist-insert-track emms-track url] 5 (#$ . 13023)]) #@67 An EMMS source for an URL - for example, for streaming. (fn URL) (defalias 'emms-play-url #[257 "\203\f\301\302\303\")\207\304\303\"\207" [current-prefix-arg nil emms-source-add emms-source-url emms-source-play] 4 (#$ . 13212) "sPlay URL: "]) #@67 An EMMS source for an URL - for example, for streaming. (fn URL) (defalias 'emms-add-url #[257 "\203\f\301\302\303\")\207\304\303\"\207" [current-prefix-arg nil emms-source-play emms-source-url emms-source-add] 4 (#$ . 13467) "sPlay URL: "]) #@67 An EMMS source for an URL - for example, for streaming. (fn URL) (defalias 'emms-insert-url #[257 "\300\301\"\207" [emms-source-insert emms-source-url] 4 (#$ . 13721) "sPlay URL: "]) #@88 An EMMS source for streaming playlists (usually URLs ending in .pls). (fn STREAMLIST) (defalias 'emms-source-streamlist #[257 "\300\301\302\"!\207" [emms-playlist-insert-track emms-track streamlist] 5 (#$ . 13912)]) #@88 An EMMS source for streaming playlists (usually URLs ending in .pls). (fn STREAMLIST) (defalias 'emms-play-streamlist #[257 "\203\f\301\302\303\")\207\304\303\"\207" [current-prefix-arg nil emms-source-add emms-source-streamlist emms-source-play] 4 (#$ . 14136) "sPlay streamlist URL: "]) #@88 An EMMS source for streaming playlists (usually URLs ending in .pls). (fn STREAMLIST) (defalias 'emms-add-streamlist #[257 "\203\f\301\302\303\")\207\304\303\"\207" [current-prefix-arg nil emms-source-play emms-source-streamlist emms-source-add] 4 (#$ . 14437) "sPlay streamlist URL: "]) #@88 An EMMS source for streaming playlists (usually URLs ending in .pls). (fn STREAMLIST) (defalias 'emms-insert-streamlist #[257 "\300\301\"\207" [emms-source-insert emms-source-streamlist] 4 (#$ . 14737) "sPlay streamlist URL: "]) (provide 'emms-source-file)