[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `concat' a dir and a file (was: Strange `file-name-sans-extension' b
From: |
Richard Stallman |
Subject: |
Re: `concat' a dir and a file (was: Strange `file-name-sans-extension' behavior ) |
Date: |
Fri, 16 Aug 2002 22:51:10 -0600 (MDT) |
The `Subject:' had not been updated, so it was misleading.
The discussion is about whether or not we need a new function
that is like expand-file-name but does not necessarily return
an absolute file name.
I treated that as a subtopic of the issue of what to do with
file-name-sans-extension, and considered it only in reference to that
main topic. Now I will address the new topic
As far as I can see, if you don't insist on an absolute file name,
it is correct to use concat. As far as I can see, Eli's example
is only an issue if you want an absolute file name:
> It means that to produce a full file name from a relative directory
> "c:" and a relative file name "bar", a function should yield
> "c:./bar".
Eli, is c:bar an invalid file name on MSDOS?
So it seems that in the case where you are happy to have
a non-absolute file name as the result, there is no problem.
I've sometimes tried to use
(let ((default-directory nil)) (expand-file-name bar foo))
or
(let ((default-directory "")) (expand-file-name bar foo))
but it prepends "/" or "./" to the result.
Is that what you had in mind when you spoke of appending a slash? It
would follow that these methods are not good ones. However, that
doesn't say anything about whether concat is a good method.
- Re: Strange `file-name-sans-extension' behavior, (continued)
- Re: Strange `file-name-sans-extension' behavior, Richard Stallman, 2002/08/10
- Re: Strange `file-name-sans-extension' behavior, Stefan Monnier, 2002/08/12
- Re: Strange `file-name-sans-extension' behavior, Eli Zaretskii, 2002/08/12
- Re: Strange `file-name-sans-extension' behavior, Andreas Schwab, 2002/08/12
- Re: Strange `file-name-sans-extension' behavior, Richard Stallman, 2002/08/13
- Re: Strange `file-name-sans-extension' behavior, Eli Zaretskii, 2002/08/14
- Re: Strange `file-name-sans-extension' behavior, Richard Stallman, 2002/08/14
- Re: Strange `file-name-sans-extension' behavior, Eli Zaretskii, 2002/08/15
- Re: Strange `file-name-sans-extension' behavior, Richard Stallman, 2002/08/15
- `concat' a dir and a file (was: Strange `file-name-sans-extension' behavior ), Stefan Monnier, 2002/08/16
- Re: `concat' a dir and a file (was: Strange `file-name-sans-extension' behavior ),
Richard Stallman <=
- Re: `concat' a dir and a file (was: Strange `file-name-sans-extension' behavior ), Eli Zaretskii, 2002/08/18
- Re: `concat' a dir and a file (was: Strange `file-name-sans-extension' behavior ), Stefan Monnier, 2002/08/19
- Re: `concat' a dir and a file (was: Strange `file-name-sans-extension' behavior ), Richard Stallman, 2002/08/19
- Re: `concat' a dir and a file (was: Strange `file-name-sans-extension' behavior ), Eli Zaretskii, 2002/08/20
- Re: Strange `file-name-sans-extension' behavior, Richard Stallman, 2002/08/12