From: Slava Akhmechet
Subject: Inverse of merge-pathnames
Date: 
Message-ID: <87zm139rea.fsf@gmail.com>
Is there a standard function that does something akin to an inverse of
'merge-pathnames'? I need to find a pathname of one directory relative
to another:

(split-pathnames "/home/user/projects/my-project"
                 "projects/my-project")
  => "/home/user"

I can't seem to find a portable way to do this.

-- 
Regards,
Slava Akhmechet.

From: Harald Hanche-Olsen
Subject: Re: Inverse of merge-pathnames
Date: 
Message-ID: <pcod4xzmczs.fsf@shuttle.math.ntnu.no>
+ Slava Akhmechet <·········@gmail.com>:

| Is there a standard function that does something akin to an inverse of
| 'merge-pathnames'? I need to find a pathname of one directory relative
| to another:
|
| (split-pathnames "/home/user/projects/my-project"
|                  "projects/my-project")
|   => "/home/user"
|
| I can't seem to find a portable way to do this.

Have you looked at ENOUGH-NAMESTRING?

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell
From: Slava Akhmechet
Subject: Re: Inverse of merge-pathnames
Date: 
Message-ID: <87vebr9pof.fsf@gmail.com>
Harald Hanche-Olsen <······@math.ntnu.no> writes:

> Have you looked at ENOUGH-NAMESTRING?
Thanks!

-- 
Regards,
Slava Akhmechet.