[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Portable dir-path separator?
From: |
Thorsten Jolitz |
Subject: |
Re: Portable dir-path separator? |
Date: |
Wed, 26 Jun 2013 20:31:24 +0200 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) |
Rustom Mody <rustompmody@gmail.com> 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