*default-pathname-defaults* ? 
Author Message
 *default-pathname-defaults* ?

Another question for the CL-wizards:

Should operations like OPEN, PROBE-FILE, ... call
(MERGE-PATHNAMES the-file *DEFAULT-PATHNAME-DEFAULTS*)?

MCL and ACL are doing it, LispWorks and CMU-CL not.

This can be quite confusing!

Rainer Joswig



Fri, 10 Nov 1995 17:09:18 GMT  
 *default-pathname-defaults* ?

   Another question for the CL-wizards:

   Should operations like OPEN, PROBE-FILE, ... call
   (MERGE-PATHNAMES the-file *DEFAULT-PATHNAME-DEFAULTS*)?

   MCL and ACL are doing it, LispWorks and CMU-CL not.

   This can be quite confusing!

This is one of the biggest problems I have found in portability!

Lucid and Allegro seem to use *default-pathname-defaults* for
just about all file operations. This means that setting it with
a (setf *default-pathname-defaults* (pathname ...)) works
just about like a Unix chdir. All file operations then use
this as the default pathname.

MCL doesn't do this. One must both setf *default-pathname-defaults*
AND call something like set-default-mac-directory.

Unlike their Allegro product, Franz Allegro CL/PC doesn't seem to
use *defualt-pathname-defaults very completely. The biggest offender
seems to be in load and compile-file. These won't work unless
*default-pathname-defaults* has been set to not only the directory,
but also to a file name of *.FSL and *.LSP respectively.

An then there is CLOE whose save-program takes the file name from
a symbol, and doesn't seem to look at *default-pathname-defaults*
at all.

The ANSI X3J13 group did such a good job that the few places where
they left things too fuzzy really shows up.

My Opinion: The vendors should make sure that the Lisp pathname
stuff is fully implemented and supported consistently. Functions
like set-mac-default-directory should not exist! Setting the
variable *default-pathname-defaults* should let all file operations
work with that as a default with no other work. Load and compile-file
should merge the pathname with the appropriate filename (*.lisp e.g.)

                                        Skip Egdorf



Sat, 11 Nov 1995 01:08:37 GMT  
 *default-pathname-defaults* ?

Quote:
>Should operations like OPEN, PROBE-FILE, ... call
>(MERGE-PATHNAMES the-file *DEFAULT-PATHNAME-DEFAULTS*)?

>MCL and ACL are doing it, LispWorks and CMU-CL not.

>This can be quite confusing!

The dpANS doesn't say that any of these functions should automatically
merge pathnames.  COMPILE-FILE and LOAD specifically say that they merge
the defaults.

--
Barry Margolin
System Manager, Thinking Machines Corp.




Sat, 11 Nov 1995 01:46:08 GMT  
 *default-pathname-defaults* ?

   Path: harlequin.com!uunet!think.com!barmar

   Newsgroups: comp.lang.lisp
   Date: 24 May 1993 17:46:08 GMT
   Organization: Thinking Machines Corporation, Cambridge MA, USA
   Lines: 17

   NNTP-Posting-Host: telecaster.think.com


   >Should operations like OPEN, PROBE-FILE, ... call
   >(MERGE-PATHNAMES the-file *DEFAULT-PATHNAME-DEFAULTS*)?
   >
   >MCL and ACL are doing it, LispWorks and CMU-CL not.
   >
   >This can be quite confusing!

   The dpANS doesn't say that any of these functions should automatically
   merge pathnames.  COMPILE-FILE and LOAD specifically say that they merge
   the defaults.

The dpANS says, in section 19.2.2.3:

A relative directory in the pathname argument to a function
such as open is merged with *default-pathname-defaults* before accessing the
file system.

The fact that Lispworks doesn't do this is a bug, which is fixed in the
next release (or contact customer support if you need a patch)

                                                Andy Latto



Sat, 11 Nov 1995 05:59:56 GMT  
 *default-pathname-defaults* ?

Quote:

>Lucid and Allegro seem to use *default-pathname-defaults* for
>just about all file operations. This means that setting it with
>a (setf *default-pathname-defaults* (pathname ...)) works
>just about like a Unix chdir. All file operations then use
>this as the default pathname.

What happens if the default is /a/b/c/ and I use the name d/e?

Do I get /a/b/c/d/e or d/e or what?

I ought to get /a/b/c/d/e, because (pathname-directory "d/e")
should be (:relative "d"), but this is not what happens in all
Lisps.

In many cases, strings are more portable than pathnames if
you know the OS.  For instance, I know I can concatenate
/a/b/c/ and d/e to get what I want; merge-pathnames is less
reliable.  Unfortunately.

-- jd



Mon, 20 Nov 1995 03:02:39 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. pathname defaulting

2. make-pathname :defaults

3. Newbie question: How to set a default pathname for cmucl as Emacs inferior-lisp

4. make-pathname and :defaults

5. dict.get(key, default): conditional default evaluation

6. pathname-directory when pathname is a directory

7. Franz ACL (defsystem ... (:default-pathname ...) ...)

8. default focus

9. Default Package in V5.03

10. New to Dolphin - Default view ???

11. Default Package

12. set default font in DolphinPro5

 

 
Powered by phpBB® Forum Software