Book logo xindy

A Flexible Indexing System


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xindy 1.2.1 and Allegro Common-Lisp (was: Xindy and Allegro Common-Lisp)



Roger Kehr <kehr@iti.informatik.th-darmstadt.de> wrote:
: Bernd Raichle wrote:
[...]
: > Can you explain what the differences beetwen ``:input'' and
: > ``:input-immutable'' are?
: 
: I borrowed this from the implementation of function `load' int the
: CLISP-source :) I never asked if it is standard.

Bad practice!  Better change the :direction option of `open' option to
the standard `:input'.


[...]
: > - "markup.lsp"
: >
: >   When opening the `logfile' in function `do-startup' add the
: >   keyword/value
: >         :if-exists :overwrite
: >   to the `open' function call.  The default for :if-exists is :error,
: >   i.e. signal an error if file to be written exists.
: >
: >   Same change needed when opening the `output' file in this function.
: 
: CLISP did never report an error :)

This is a bug in CLISP (or the Lisp standard has changed once more?).
Allegro CL reports an error if the log file existed which is the
standard behaviour.



[...]
: > [...]
: > ;  Note: Closure (:INTERNAL SPLIT-LIST 1) will be stack allocated.
: > ;  Note: Closure (:INTERNAL SPLIT-LIST 0) will be stack allocated.
: > [...]
: 
: Are these messages something important or can they be ignored?

These are only notices---no warning, no errors.
(Look in CLtL2 for more about "stack allocation".)


[...]
: What about the (system::getenv "XINDY_SEARCHPATH") call in
: set-searchpath-by-environment? Does it work on Allegro?

Ugh, no.

Allegro has a `getenv' function in package `sys', i.e.
(sys:getenv "XINDY_SEARCHPATH") will work.



: > %%%%%%%%%%%%%%%%%%%%
: >
: > After compiling all files and fixed these two remaining bugs, I tried
: > the test again:
[...]
: > ERROR:
: > Syntax Error in
: >        (MARKUP-RANGE :CLASS "follows" :OPEN "\\folone{" :CLOSE "}f." :LENGTH 1
: >                      :IGNORE-END).; killing "Editor Server"
: > ; Exiting Lisp
: >
: >
: > Any hints?  Any hints how to trace/debug Xindy to find this bug?
: 
: Hm. Best would be to directly trace the (markup-trace)-macro.
: 
: This error message is generated by the
: (desctructuring-swith-bind)-macro in idxstyle.lsp (intface.nw). It
: preprocesses a macro-call and removes any switches (&switch) form the
: lambda-list. The remaining-list is simply passed to a
: (destructuring-bind) that for some reason has failed.
: 
: Try the following:
: 
: (LET
:     ((<DESTRUCTURING-SWITCH-FORM>
:       '(:CLASS "follows" :OPEN "folone{" :CLOSE "}f." :LENGTH 1
: 	:IGNORE-END
: 	))   )
:   (LET ((IGNORE-END (FIND :IGNORE-END <DESTRUCTURING-SWITCH-FORM>)))
:     (DESTRUCTURING-BIND (&KEY OPEN CLOSE SEP CLASS LENGTH)
: 	(SET-DIFFERENCE <DESTRUCTURING-SWITCH-FORM> '(:IGNORE-END))
:       (LIST OPEN CLOSE SEP CLASS LENGTH
: 	    IGNORE-END))))
: 
: if it returns
: 
: -> ("folone{" "}f." NIL "follows" 1 :IGNORE-END)

No, it signals the following error (if done in the IDXSTYLE package):


Error: keyword list (1 :LENGTH "}f." :CLOSE "folone{" :OPEN "follows" :CLASS)
       should only contain keys (:LENGTH :CLASS :SEP :CLOSE :OPEN)
  [condition type: PROGRAM-ERROR]

which seems to be the cause of the bug.
Something has reversed the given keyword list....


: Then you can try interactively
: 
: (macroexpand
:  '(intface:destructuring-switch-bind (&key
: 				      open close sep class length
: 				      &switch ignore-end)
:    '(:class "follows" :open "\folone{" :close "}f."
:      :length 1 :ignore-end)
:    (list open close sep class length ignore-end)))
: 
: if it returns the above expansion.

It returns

(LET ((<DESTRUCTURING-SWITCH-FORM>
       '(:CLASS "follows" :OPEN "folone{" :CLOSE "}f." :LENGTH 1
         :IGNORE-END)))
  (LET ((IGNORE-END (FIND :IGNORE-END <DESTRUCTURING-SWITCH-FORM>)))
    (HANDLER-CASE (DESTRUCTURING-BIND (&KEY OPEN CLOSE SEP CLASS LENGTH)
                                      (SET-DIFFERENCE
                                       <DESTRUCTURING-SWITCH-FORM>
                                       '(:IGNORE-END))
                                      (LIST
                                       OPEN
                                       CLOSE
                                       SEP
                                       CLASS
                                       LENGTH
                                       IGNORE-END))
                  (ERROR (COND) (DECLARE (IGNORE COND))
                         (ERROR "~&Syntax Error in ~S." WHOLE)))))

which is almost the same as your shown code except of the additional
`handler-case'.

-bernd