Re: (expand-file-name "/..")
Marcus Harnisch <[email protected]>
| Newsgroups | gmane.emacs.xemacs.beta |
|---|---|
| Message-ID | <[email protected]> |
Marcus Harnisch <[email protected]> writes: > "Stephen J. Turnbull" <[email protected]> writes: > >> If you want to pursue this, I think you need to ask on emacs-devel. > > Not worth bothering. A docstring fix would be sufficient. Not that I changed my mind about this (actually doing some experimenting to find a suitable doc string amendment), but just for the record: (expand-file-name "/../foo/") => "/../foo/" (expand-file-name "/../../foo/") => "/foo/" (expand-file-name "/../../../foo/") => "/../foo/" (expand-file-name "/../../../../foo/") => "/foo/" (expand-file-name "/foo/../") => "/" (expand-file-name "/foo/../../") => "/../" (expand-file-name "/foo/../../../") => "/" (expand-file-name "/foo/../../../../") => "/../" I think you are getting the even/odd pattern. Beware of path names that have parent references beyond root! This oscillating pattern is particularly annoying when you traversing directory trees to find project root directories or similar tasks. Kindly Marcus