From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.devel Subject: [PATCH 1/3] lisp/mpc.el (mpc-file-local-copy): check more config locations Date: Mon, 7 Sep 2015 19:31:20 -0400 Message-ID: <1441668682-21988-1-git-send-email-mvoteiza@udel.edu> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1441668716 18745 80.91.229.3 (7 Sep 2015 23:31:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2015 23:31:56 +0000 (UTC) Cc: Mark Oteiza To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 08 01:31:42 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZZ5sz-0008Pp-CA for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 01:31:41 +0200 Original-Received: from localhost ([::1]:59244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ5sy-0007IU-J1 for ged-emacs-devel@m.gmane.org; Mon, 07 Sep 2015 19:31:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ5sv-0007IA-Le for emacs-devel@gnu.org; Mon, 07 Sep 2015 19:31:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZ5ss-00050u-C5 for emacs-devel@gnu.org; Mon, 07 Sep 2015 19:31:37 -0400 Original-Received: from mail-qg0-f45.google.com ([209.85.192.45]:35800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ5ss-00050q-99 for emacs-devel@gnu.org; Mon, 07 Sep 2015 19:31:34 -0400 Original-Received: by qgt47 with SMTP id 47so70361627qgt.2 for ; Mon, 07 Sep 2015 16:31:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4b9rSrUfmCiTgZoj4jaAhkMZrYaVPF4Jm1MuP4pWRo4=; b=TmhcAl+Bw1Q+sdTnKTXX5Czu3Y3FTpCQTjAcQQoCMPdcJULf9LCouAUqC1++rpmj7w Ns55IR2oPF3TDELLee0Q/9RuZr1LSVFIG4oQrrnzLuSPV0dayMPo5PQOi7TnH+HmlFhz Jxb3NZ0smM26CWx6rShGcqLrrCiY4kumfEuk2mGTKHihKpp3Wb3dGAkqSwrSMvJKeQM+ CXagPqWY9sAvz6OMbqIigBxfA0OT3lD/QIM9p7ohljbWL5iWB1vnaOXKKPB3tONFOsyp ApxXhGhdmKjDVuAy/B3f5FSEof32Rmrq4nbm7tlq8idneSohHdmJbfLIf7aPGPgHa6hA yInw== X-Gm-Message-State: ALoCoQn3hYaJbbWJviUdCw9LVMvbMZwomajvyIJQTnomXD3qBOmPrOKggkb1QVHguGadfttfx1gN X-Received: by 10.140.150.213 with SMTP id 204mr30833446qhw.104.1441668693638; Mon, 07 Sep 2015 16:31:33 -0700 (PDT) Original-Received: from holos.localdomain (c-73-172-248-173.hsd1.md.comcast.net. [73.172.248.173]) by smtp.gmail.com with ESMTPSA id z19sm711916qge.38.2015.09.07.16.31.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Sep 2015 16:31:33 -0700 (PDT) Original-Received: by holos.localdomain (Postfix, from userid 1000) id C974B68971; Mon, 7 Sep 2015 19:31:32 -0400 (EDT) X-Mailer: git-send-email 2.5.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.192.45 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189686 Archived-At: --- 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