unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 1/3] lisp/mpc.el (mpc-file-local-copy): check more config locations
@ 2015-09-07 23:31 Mark Oteiza
  2015-09-07 23:31 ` [PATCH 2/3] lisp/mpc.el (mpc-file-local-copy): check for absolute path Mark Oteiza
  2015-09-07 23:31 ` [PATCH 3/3] lisp/mpc.el (mpc--proc-connect): use file-name-absolute-p Mark Oteiza
  0 siblings, 2 replies; 5+ messages in thread
From: Mark Oteiza @ 2015-09-07 23:31 UTC (permalink / raw)
  To: emacs-devel; +Cc: Mark Oteiza

---
Updated according to mpd(1) of mpd version 0.19.10

 lisp/mpc.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/mpc.el b/lisp/mpc.el
index fdc5aee..740b865 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -910,7 +910,11 @@ If PLAYLIST is t or nil or missing, use the main playlist."
   ;; Try to set mpc-mpd-music-directory.
   (when (and (null mpc-mpd-music-directory)
              (string-match "\\`localhost" mpc-host))
-    (let ((files '("~/.mpdconf" "/etc/mpd.conf"))
+    (let ((files `(,(let ((xdg (getenv "XDG_CONFIG_HOME")))
+                      (concat (if (and xdg (file-name-absolute-p xdg))
+                                  xdg "~/.config")
+                              "/mpd/mpd.conf"))
+                   "~/.mpdconf" "~/.mpd/mpd.conf" "/etc/mpd.conf"))
           file)
       (while (and files (not file))
         (if (file-exists-p (car files)) (setq file (car files)))
-- 
2.5.1




^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-08  1:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-07 23:31 [PATCH 1/3] lisp/mpc.el (mpc-file-local-copy): check more config locations Mark Oteiza
2015-09-07 23:31 ` [PATCH 2/3] lisp/mpc.el (mpc-file-local-copy): check for absolute path Mark Oteiza
2015-09-07 23:31 ` [PATCH 3/3] lisp/mpc.el (mpc--proc-connect): use file-name-absolute-p Mark Oteiza
2015-09-08  1:16   ` Stefan Monnier
2015-09-08  1:57     ` Mark Oteiza

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).