Hi!

When choosing `emms-source-file-directory-tree-find' as the function to
perform file discovery with the following snippet in my .emacs:

--8<---------------cut here---------------start------------->8---
(require 'emms-setup)
(emms-all)
(emms-default-players)
(setq emms-source-file-directory-tree-function
      #'emms-source-file-directory-tree-find)
(setq emms-source-file-default-directory "~/Music/")
--8<---------------cut here---------------end--------------->8---

Then when using M-x emms-add-directory-tree RET ~/Music/ RET, symlinks
are not followed (I have a symlink pointing to a music collection on
external storage). This was reported in 2014[1] but it seems that it
failed to be noticed/merged (as of EMMS 4.3).

The attached trivial (one line) patch adds the -L option to the
find command and enables the use of symlinks in a music collection
directory.

Thanks for this useful of software!

Maxim

[1]  https://lists.gnu.org/archive/html/emms-help/2014-01/msg00003.html

>From 86e25b300f2375af17fcb3dc3ad1e07db6cc593f Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <[email protected]>
Date: Wed, 13 Sep 2017 13:47:10 -0400
Subject: [PATCH] lisp: Follow symlinks when using GNU find.

This fixes a problem which was initially reported by Daniel Dehennin
in 2014. (See:
https://lists.gnu.org/archive/html/emms-help/2014-01/msg00003.html)

* lisp/emms-source-file.el (emms-source-file-directory-tree-find): Add
"-L" argument to the `find' command.
---
 lisp/emms-source-file.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/emms-source-file.el b/lisp/emms-source-file.el
index 660cbd5..8677c22 100644
--- a/lisp/emms-source-file.el
+++ b/lisp/emms-source-file.el
@@ -228,6 +228,7 @@ may be supplied using `emms-source-file-gnu-find'."
   (with-temp-buffer
     (call-process emms-source-file-gnu-find
                   nil t nil
+		  "-L"			;follow symlinks
                   (expand-file-name dir)
                   "-type" "f"
                   "-iregex" (concat ".*\\(" regex "\\).*"))
-- 
2.14.1

_______________________________________________
Emms-help mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/emms-help

Reply via email to