Discussion:
[emms-help] “emms-source-file-directory-tree-find” does not handle symlinks
Daniel Dehennin
2014-01-12 13:01:05 UTC
Permalink
Hello,

I'm starting to use git-annex[1] to manage my music repository and I
found that git-annex managed files are not loaded by
“emms-add-directory-tree”.

I set:

(setq emms-source-file-directory-tree-function 'emms-source-file-directory-tree-find)

Using “emms-source-file-directory-tree-internal” works.

The problem comes from the options passed to “find”, it looks for
“files” and git-annex use symlinks to its key/value storage.

I made the following patch to make it working:

#+begin_src diff
diff --git a/lisp/emms-source-file.el b/lisp/emms-source-file.el
index 91cd466..12541d5 100644
--- a/lisp/emms-source-file.el
+++ b/lisp/emms-source-file.el
@@ -227,6 +227,8 @@ may be supplied using `emms-source-file-gnu-find'."
nil t nil
(expand-file-name dir)
"-type" "f"
+ "-o"
+ "-type" "l"
"-iregex" (concat ".*\\(" regex "\\).*"))
(delete ""
(split-string (buffer-substring (point-min)
#+end_src

Regards.

Footnotes:
[1] http://git-annex.branchable.com/
--
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF
Loading...