[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lisp code to expand /~ and // but not env vars?
From: |
Peter Dyballa |
Subject: |
Re: Lisp code to expand /~ and // but not env vars? |
Date: |
Mon, 3 Oct 2005 12:50:03 +0200 |
Am 03.10.2005 um 02:03 schrieb Drew Adams:
Function `expand-file-name' does not replace "//" and "/~" as
`substitute-in-file-name' does.
// is in UNIX nonsense. The root is / and does not get more root when
written as '//' -- this only has in ancient (Apollo) Domain OS a
meaning (Domain OS could create ad-hoc networks and // was the root of
the individual members in the network). '//' is created as a text in
mini-buffer when you either try to find a file or try to dired. The
right means to handle such strings would be to substitute everything
from the beginning to // with /.
'/~' probably in every OS is nonsense. / is the root; ~ is, when
followed by a /, my home directory; ~, when followed by a user's login
name, means that user's home directory. The sequence '/~' happens to
appear in mini-buffer when you either try to find a file or try to
dired. The right means to handle such strings would be to substitute
everything from the beginning to /~ with ~.
The routines in dired or find-file that handle such 'input' handle it
already right.
--
Greetings
Pete
There's no sense in being precise when you don't
even know what you're talking about.
-- John von Neumann
RE: Lisp code to expand /~ and // but not env vars?, Drew Adams, 2005/10/03