From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Remove the magic portion of a remote file name Date: Wed, 16 Apr 2014 16:11:30 +0200 Message-ID: <871twxpdnx.fsf@gmx.de> References: <66E6635733884E56A1359EAADADF5763@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1397657517 9523 80.91.229.3 (16 Apr 2014 14:11:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Apr 2014 14:11:57 +0000 (UTC) Cc: emacs-devel To: Bozhidar Batsov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 16 16:11:50 2014 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 1WaQZ3-0003Cf-TM for ged-emacs-devel@m.gmane.org; Wed, 16 Apr 2014 16:11:50 +0200 Original-Received: from localhost ([::1]:54742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaQZ3-00081c-15 for ged-emacs-devel@m.gmane.org; Wed, 16 Apr 2014 10:11:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaQYv-00081L-59 for emacs-devel@gnu.org; Wed, 16 Apr 2014 10:11:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WaQYp-00073y-5J for emacs-devel@gnu.org; Wed, 16 Apr 2014 10:11:40 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:59154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaQYo-00073n-Rv for emacs-devel@gnu.org; Wed, 16 Apr 2014 10:11:35 -0400 Original-Received: from detlef.gmx.de ([93.202.48.111]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MN748-1WcdTw1WRM-006gPS; Wed, 16 Apr 2014 16:11:32 +0200 In-Reply-To: <66E6635733884E56A1359EAADADF5763@gmail.com> (Bozhidar Batsov's message of "Wed, 16 Apr 2014 16:38:27 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V03:K0:YVCTMz3hCwRRxDvHyl5149g25aduNDzL0fvHKTlNZ+kXFx7vl3W xJjl/ifqk5mvO9KPK7T8Nw1KI61QgzH3b0rOhEsTmEUnycnzs+CojibRjJ1iyd2UICH89bJ eLfxH15n5HxxvShyxUh/bLJgmvsKMq3K1aW5DEfNnmOhdTxSDMtuHOp2F/8Q/CTJGLysetQ PYlaKSfnWwXsKBVheKNNg== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.19 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:171454 Archived-At: Bozhidar Batsov writes: > Hi guys,=20 Hi Bozhidar, > I wonder what's the authoritative way to obtain the local file name > portion > of a remote file name? I=E2=80=99m looking for a function that would turn > "/ssh:root@192.168.1.1:/some/path/file" into "/some/path/file". (file-remote-p "/ssh:root@192.168.1.1:/some/path/file" 'localname) > I know of `tramp-dissect-file-name', but I wonder if there's a better > way, that doesn=E2=80=99t involve requiring tramp. Internally, it could use Tramp, but you don't need to require it. Best regards, Michael.