bugGNU Common Lisp - Bugs: bug #7935, Pathname keywords for 2.7.x

 
 

bug #7935: Pathname keywords for 2.7.x

Submitter:  Mike Thomas <mjthomas>
Submitted:  Sat 28 Feb 2004 12:22:20 AM UTC
   
 
Category:  None Severity:  1 - Wish
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 21 Dec 2021 04:15:36 PM UTC, comment #1: 

Greetings, and thanks for your report!  Fixed starting in Version_2_6_13pre.

Camm Maguire <camm>
Group administrator
Sat 28 Feb 2004 12:22:20 AM UTC, original submission:  

Greetings, and thanks for this!  OK, this is a straightforward change
in keyword names from what we have now.  I'll put this on the list for
early 2.7.x.  Please don't let me forget.

Take care,

Dennis Decker Jensen <> writes:

> Hi Camm
>
> Sorry for putting up new thread, but I deleted your mail by
> mistake.
>
> I've been playing with pathnames in CLisp and SBCL to find out
> more from other actual implementations, and there are notable
> differences in how it can be done.
>
> I will not go into too much details.  The most significant
> difference to GCL's old (CLTL2?) implementation is in the
> pathname-directory component of a pathname.
>
> In ANSI the directory component (a list) must start with either
> the symbol RELATIVE or the symbol ABSOLUTE.  From there only
> strings and the symbols UP or BACK are allowed.  The difference
> between the latter and the former is a matter of syntactic or
> semantic behaviour.
>
> How the namestrings are constructed depends upon the
> implementation.  SBCL don't accept BACK at the moment when
> constructing namestrings, while CLisp has both UP and BACK
> taking semantic behaviour.  SBCL does't touch it's pathnames,
> while CLisp does at creation time as you can see below in the
> examples.
>
> GCL currently uses symbols as well as strings with the special
> symbols ROOT, CURRENT and PARENT which has special meanings.
> I gather this is the CLTL2 way.  None of this is ANSI anyway.
>
> There are further constraints on some of the other components,
> but I don't think it is all needed at once judged by the other
> implementations and the diversity among them.
>
> Examples:
>
> <<<CLisp>>>
>
> ;; Dribble of #<IO TERMINAL-STREAM> started 2004-02-27 14:07:39
> #<OUTPUT BUFFERED FILE-STREAM CHARACTER #P"clisp.pathnames">
> [2]> (make-pathname :directory '(:relative "a" "b" "c"))
> #P"a/b/c/"
> [3]> (make-pathname :directory '(:absolute "a" "b" "c"))
> #P"/a/b/c/"
> [4]> (make-pathname :directory '(:absolute "a" "b" :up "c"))
> #P"/a/c/"
> [5]> (make-pathname :directory '(:absolute "a" "b" :back "c"))
> #P"/a/c/"
> [6]> (pathname-directory (make-pathname :directory '(:absolute "a" "b" :back "c")))
> (:ABSOLUTE "a" "c")
> [7]> (pathname-directory #P"/a/b/../c/")
> (:ABSOLUTE "a" "c")
> [8]> (pathname-directory #P"/a/b/c/")
> (:ABSOLUTE "a" "b" "c")
> [9]> (pathname-directory #P"/a/b/c")
> (:ABSOLUTE "a" "b")
> [10]> (dribble)
> ;; Dribble of #<IO TERMINAL-STREAM> finished 2004-02-27 14:10:07
>
> ;; Dribble of #<IO TERMINAL-STREAM> started 2004-02-27 14:28:08
> #<OUTPUT BUFFERED FILE-STREAM CHARACTER #P"clisp.pathnames">
> [2]> (make-pathname :directory '("a" "b" "c"))
>
> * - MAKE-PATHNAME: illegal :DIRECTORY argument ("a" "b" "c")
> Break 1 [3]> :q
>
> [4]> (make-pathname :directory '(:relative "a" "b" "c"))
> #P"a/b/c/"
> [5]> (make-pathname :directory '(:relative "a" "b" :parent "c"))
>
> * - MAKE-PATHNAME: illegal :DIRECTORY argument (:RELATIVE "a" "b" :PARENT "c")
> Break 1 [6]> :q
>
> [7]> (make-pathname :directory '(:relative "a" "b" :current "c"))
>
> * - MAKE-PATHNAME: illegal :DIRECTORY argument (:RELATIVE "a" "b" :CURRENT "c")
> Break 1 [8]> :q
>
> [9]> (dribble)
> ;; Dribble of #<IO TERMINAL-STREAM> finished 2004-02-27 14:29:01
>
>
> <<<SBCL>>>
> * (make-pathname :directory '(:relative "a" "b" "c"))
>
> #P"a/b/c/"
> * (make-pathname :directory '(:absolute "a" "b" "c"))
>
> #P"/a/b/c/"
> * (make-pathname :directory '(:absolute "a" "b" :up "c"))
>
> #P"/a/b/../c/"
> * (make-pathname :directory '(:absolute "a" "b" :back "c"))
>
> #<PATHNAME
>   (with no namestring)
>   :HOST #<SB-IMPL::UNIX-HOST {505D1B9}>
>   :DEVICE NIL
>   :DIRECTORY (:ABSOLUTE "a" "b" :BACK "c")
>   :NAME NIL
>   :TYPE NIL
>   :VERSION NIL>
> * (pathname-directory (make-pathname :directory '(:absolute "a" "b" :up "c")))
>
> (:ABSOLUTE "a" "b" :UP "c")
> * (pathname-directory #P"/a/b/../c/")
>
> (:ABSOLUTE "a" "b" :UP "c")
> * (pathname-directory #P"/a/b/c/")
>
> (:ABSOLUTE "a" "b" "c")
> * (pathname-directory #P"/a/b/c")
>
> (:ABSOLUTE "a" "b")
> * (pathname-directory #P"a/b/c/")
>
> (:RELATIVE "a" "b" "c")
> * (pathname-directory #P"../../")
>
> (:RELATIVE :UP :UP)
> * (pathname-directory (parse-namestring "/a/b/../c/"))
>
> (:ABSOLUTE "a" "b" :UP "c")
>
> * (make-pathname :directory '("a" "b" "c"))
>
> #<PATHNAME
>   (with no namestring)
>   :HOST #<SB-IMPL::UNIX-HOST {505D1B9}>
>   :DEVICE NIL
>   :DIRECTORY ("a" "b" "c")
>   :NAME NIL
>   :TYPE NIL
>   :VERSION NIL>
> * (make-pathname :directory '(:relative "a" "b" "c"))
>
> #P"a/b/c/"
> * (make-pathname :directory '(:relative "a" "b" :parent "c"))
>
> debugger invoked on a SIMPLE-ERROR in thread 31541:
>   :PARENT is not allowed as a directory component.
>
> * (make-pathname :directory '(:relative "a" "b" :current "c"))
>
> debugger invoked on a SIMPLE-ERROR in thread 31541:
>   :CURRENT is not allowed as a directory component.
>
> >>>
>
> I haven't looked at logical pathnames which is whole topic
> itself.
>
> Hope it made things a little clearer.
>
> --
> Dennis Decker Jensen
>
>
>

===============
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah



Mike Thomas <mjthomas>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by camm (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-12-21 camm StatusNone Fixed
        Open/ClosedOpen Closed
    2008-07-09 None Attached File- Added get_mysql_80x15_2.png, #16060
    2004-02-28 mjthomas Carbon-Copy- Added ddj --AT-- gyxi --DOT-- dk

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code