all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark Oteiza <mvoteiza@udel.edu>
To: <emacs-devel@gnu.org>
Cc: Mark Oteiza <mvoteiza@udel.edu>
Subject: [PATCH 2/3] lisp/mpc.el (mpc-file-local-copy): check for absolute path
Date: Mon,  7 Sep 2015 19:31:21 -0400	[thread overview]
Message-ID: <1441668682-21988-2-git-send-email-mvoteiza@udel.edu> (raw)
In-Reply-To: <1441668682-21988-1-git-send-email-mvoteiza@udel.edu>

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

diff --git a/lisp/mpc.el b/lisp/mpc.el
index 740b865..643aa0e 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -909,7 +909,8 @@ If PLAYLIST is t or nil or missing, use the main playlist."
 (defun mpc-file-local-copy (file)
   ;; Try to set mpc-mpd-music-directory.
   (when (and (null mpc-mpd-music-directory)
-             (string-match "\\`localhost" mpc-host))
+             (or (string-match "\\`localhost" mpc-host)
+                 (file-name-absolute-p mpc-host)))
     (let ((files `(,(let ((xdg (getenv "XDG_CONFIG_HOME")))
                       (concat (if (and xdg (file-name-absolute-p xdg))
                                   xdg "~/.config")
-- 
2.5.1




  reply	other threads:[~2015-09-07 23:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Mark Oteiza [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441668682-21988-2-git-send-email-mvoteiza@udel.edu \
    --to=mvoteiza@udel.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.