From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: Portable dir-path separator? Date: Wed, 26 Jun 2013 20:31:24 +0200 Message-ID: <87wqpgenb7.fsf@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1372271513 3060 80.91.229.3 (26 Jun 2013 18:31:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Jun 2013 18:31:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 26 20:31:54 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1UruVW-0007sp-2e for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Jun 2013 20:31:54 +0200 Original-Received: from localhost ([::1]:37781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UruVV-0007ld-JJ for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Jun 2013 14:31:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UruVI-0007iQ-6H for help-gnu-emacs@gnu.org; Wed, 26 Jun 2013 14:31:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UruVG-00040S-DS for help-gnu-emacs@gnu.org; Wed, 26 Jun 2013 14:31:40 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:42351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UruVG-00040K-7J for help-gnu-emacs@gnu.org; Wed, 26 Jun 2013 14:31:38 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UruVE-0007Yj-Lo for help-gnu-emacs@gnu.org; Wed, 26 Jun 2013 20:31:36 +0200 Original-Received: from g231233094.adsl.alicedsl.de ([92.231.233.94]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Jun 2013 20:31:36 +0200 Original-Received: from tjolitz by g231233094.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Jun 2013 20:31:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231233094.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:a1XNSz8wJ5zV3PXX03g8SUc77s0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91746 Archived-At: Rustom Mody writes: > On Wednesday, June 26, 2013 11:31:15 PM UTC+5:30, Thorsten Jolitz wrote: >> Hi List, >> >> is it portable to split absolute file names in Emacs Lisp with "/" as >> separator? I searched for a related variable that abstracts away the >> slash vs. backslash issue, but did not find one (`path-separator' is ':' >> under GNU/Linux and probably not what I'm looking for). >> > > Maybe you want things like file-name-directory from > (info "(elisp)File Name Components") > > ? No, I rather want to do something like ,------------------------------------------------------ | (split-string (expand-file-name file-name) separator) `------------------------------------------------------ I'm on GNU/Linux and would use '/' as separator, but what if this code is used on Windows or so? I thought there must be some OS independent variable for this in Emacs - but did not find it yet. -- cheers, Thorsten