[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/3] lisp/mpc.el (mpc--proc-connect): use file-name-absolute-p
From: |
Mark Oteiza |
Subject: |
[PATCH 3/3] lisp/mpc.el (mpc--proc-connect): use file-name-absolute-p |
Date: |
Mon, 7 Sep 2015 19:31:22 -0400 |
---
make-network-process doesn't do tilde expansion, so the "absolute path" needs
to be expanded
lisp/mpc.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/mpc.el b/lisp/mpc.el
index 643aa0e..33a807c 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -268,7 +268,10 @@ defaults to 6600 and HOST defaults to localhost."
(if (string-match "[^[:digit:]]" v)
(string-to-number v)
v)))))
- (when (string-prefix-p "/" host) ;FIXME: Use file-name-absolute-p?
+ (when (file-name-absolute-p host)
+ ;; Expand file name because `file-name-absolute-p'
+ ;; considers paths beginning with "~" as absolute
+ (setq host (expand-file-name host))
(setq local t))
(mpc--debug "Connecting to %s:%s..." host port)
--
2.5.1