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 3/3] lisp/mpc.el (mpc--proc-connect): use file-name-absolute-p Date: Mon, 7 Sep 2015 19:31:22 -0400 Message-ID: <1441668682-21988-3-git-send-email-mvoteiza@udel.edu> References: <1441668682-21988-1-git-send-email-mvoteiza@udel.edu> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1441668730 19159 80.91.229.3 (7 Sep 2015 23:32:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2015 23:32:10 +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:58 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 1ZZ5tA-0000BY-BI for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 01:31:52 +0200 Original-Received: from localhost ([::1]:59245 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ5t9-0007SD-J4 for ged-emacs-devel@m.gmane.org; Mon, 07 Sep 2015 19:31:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ5t1-0007Mz-0Y for emacs-devel@gnu.org; Mon, 07 Sep 2015 19:31:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZ5sz-000567-Sv for emacs-devel@gnu.org; Mon, 07 Sep 2015 19:31:42 -0400 Original-Received: from mail-qg0-f45.google.com ([209.85.192.45]:33251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ5sz-00055d-Pu for emacs-devel@gnu.org; Mon, 07 Sep 2015 19:31:41 -0400 Original-Received: by qgev79 with SMTP id v79so70363898qge.0 for ; Mon, 07 Sep 2015 16:31:41 -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:in-reply-to :references; bh=HvuPaefCoMpNH3n4YZRlxO3mCBNjIcYH1aJULJ4h0FM=; b=bzz7iCjJUn32KkGQSnLIsGN9NO1+qJpBiNqmRhP3KoULDeHQeuCJhSLQyWLvAKaO/+ b3mGS1PCMYE0vuCbTdi0jKF6XvfeJHhGCM47A+BPPgGPPWTJYDWIONCFn9lnsIc0lrMd jNRQIhZ3LoPG+FolSkcOq9xI/hYCpso3CpS5D7mXR1HBbrZqWf0+CsKmvuNkuyXicnBu DuQAZQQvZNiDJ42Rvo9oexxeS93XGGGrtbUJREcHK4ZkoF8nAs3qxsphRn9aUPdZEFvL FcPxb4mf4Rb66k+FzHRtu/68E1+jXs07wsLTi8biIE9WWPto7KT5tTEIxa+GZPIv2BYI WK6A== X-Gm-Message-State: ALoCoQlNPkXITtDUldGQjdz34CoWEJso2Q3EDcSKlycV1hpf33UOs4T4KFvcqWVy5/oQHmS5883j X-Received: by 10.140.39.168 with SMTP id v37mr30516413qgv.24.1441668701533; Mon, 07 Sep 2015 16:31:41 -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 f86sm764808qkf.0.2015.09.07.16.31.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Sep 2015 16:31:41 -0700 (PDT) Original-Received: by holos.localdomain (Postfix, from userid 1000) id EA2F468971; Mon, 7 Sep 2015 19:31:40 -0400 (EDT) X-Mailer: git-send-email 2.5.1 In-Reply-To: <1441668682-21988-1-git-send-email-mvoteiza@udel.edu> 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:189688 Archived-At: --- 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