From: Frank Buss
Subject: File handling and list-unique
Date: 
Message-ID: <cb567p$cd4$1@newsreader2.netcologne.de>
In order to learn Lisp I'm trying to do some small tasks with it. I have 
some files, ending with ".tif" or ".jpg". Sometimes a file can be in tif 
and jpg, e.g. "test.jpg" and "test.tif". Then I want to delete the older 
file. This is my solution:

(setq path "c:/tmp/images/")
(setq names 
      (mapcar #'pathname-name 
        (directory (concatenate 'string path "*"))))
(setq names 
      (sort names #'string<))
(setq unique nil)
(dolist (x names) 
  (if (string/= (car unique) x) 
      (setq unique (cons x unique))))
(dolist (name unique)
  (let ((tif (concatenate 'string path name ".tif"))
        (jpg (concatenate 'string path name ".jpg")))
    (if (and (probe-file jpg) (probe-file tif)) 
        (if (< (file-write-date tif) (file-write-date jpg))
            (delete-file tif)
          (delete-file jpg)
          ))))

Looks a bit complicated, but I think in Java it would be more 
complicated, but in Bash or Perl it would be shorter (but not so easy to 
read). Any comments how to write it better?

-- 
Frank Bu�, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de

From: Pascal Bourguignon
Subject: Re: File handling and list-unique
Date: 
Message-ID: <87isdl69up.fsf@thalassa.informatimago.com>
Frank Buss <··@frank-buss.de> writes:

> In order to learn Lisp I'm trying to do some small tasks with it. I have 
> some files, ending with ".tif" or ".jpg". Sometimes a file can be in tif 
> and jpg, e.g. "test.jpg" and "test.tif". Then I want to delete the older 
> file. This is my solution:
> 
> (setq path "c:/tmp/images/")
> (setq names 
>       (mapcar #'pathname-name 
>         (directory (concatenate 'string path "*"))))
> (setq names 
>       (sort names #'string<))
> (setq unique nil)
> (dolist (x names) 
>   (if (string/= (car unique) x) 
>       (setq unique (cons x unique))))
> (dolist (name unique)
>   (let ((tif (concatenate 'string path name ".tif"))
>         (jpg (concatenate 'string path name ".jpg")))
>     (if (and (probe-file jpg) (probe-file tif)) 
>         (if (< (file-write-date tif) (file-write-date jpg))
>             (delete-file tif)
>           (delete-file jpg)
>           ))))
> 
> Looks a bit complicated, but I think in Java it would be more 
> complicated, but in Bash or Perl it would be shorter (but not so easy to 
> read). Any comments how to write it better?

(defparameter path "c:/tmp/images/")
(dolist (name (delete-duplicates 
                (mapcar (function pathname-name) 
                        (append
                         (directory (concatenate 'string path "*.jpg"))
                         (directory (concatenate 'string path "*.tif"))))))
  (mapcar (function delete-file)
          (cdr (sort (directory (concatenate 'string path name ".*"))
                     (lambda (a b) (>= (file-write-date a)
                                       (file-write-date b)))))))


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

There is no worse tyranny than to force a man to pay for what he does not
want merely because you think it would be good for him. -- Robert Heinlein
From: Edi Weitz
Subject: Re: File handling and list-unique
Date: 
Message-ID: <87hdt5hi5q.fsf@bird.agharta.de>
On Sun, 20 Jun 2004 23:22:33 +0000 (UTC), Frank Buss <··@frank-buss.de> wrote:

> In order to learn Lisp I'm trying to do some small tasks with it. I
> have some files, ending with ".tif" or ".jpg". Sometimes a file can
> be in tif and jpg, e.g. "test.jpg" and "test.tif". Then I want to
> delete the older file. This is my solution:
>
> (setq path "c:/tmp/images/")
> (setq names 
>       (mapcar #'pathname-name 
>         (directory (concatenate 'string path "*"))))
> (setq names 
>       (sort names #'string<))
> (setq unique nil)
> (dolist (x names) 
>   (if (string/= (car unique) x) 
>       (setq unique (cons x unique))))
> (dolist (name unique)
>   (let ((tif (concatenate 'string path name ".tif"))
>         (jpg (concatenate 'string path name ".jpg")))
>     (if (and (probe-file jpg) (probe-file tif)) 
>         (if (< (file-write-date tif) (file-write-date jpg))
>             (delete-file tif)
>           (delete-file jpg)
>           ))))
>
> Looks a bit complicated, but I think in Java it would be more
> complicated, but in Bash or Perl it would be shorter (but not so
> easy to read). Any comments how to write it better?

Looks OK. Here are some remarks:

1. Don't use top-level SETQ because this is asking for undefined
   behaviour. Use DEFPARAMETER or DEFVAR instead.

2. Global special variables are usually named with asterisks around
   them, i.e. to follow this convention you'd use *PATH* instead of
   PATH and so on.

3. There are functions REMOVE-DUPLICATES/DELETE-DUPLICATES so you
   don't need SORT and the first DOLIST.

4. Depending on your implementation DIRECTORY might return pathnames
   which have a NIL pathname component (e.g. for files like ".emacs")
   which is not a string, so you might get an error if you call SORT
   with #'STRING<.

5. In (STRING/= (CAR UNIQUE) X) the first argument will be NIL if
   UNIQUE is still empty. NIL is not a string so you get undefined
   behaviour again.

6. Don't create pathnames from other pathnames with string operations,
   this is how you'd do it in Perl. Use CL's pathname operations like
   MAKE-PATHNAME.

7. FILE-WRITE-DATE will return a universal time, i.e. if you're out of
   luck you might delete the JPG file although it's some milliseconds
   younger than the TIF file. If you need a better resolution than
   seconds you'll need to resort to non-portable functionality
   provided by your implementation.

Here's my take:

  (defun foo (path)
    (let* ((names
             (mapcar #'pathname-name 
                     (directory (make-pathname :name :wild :type :wild
                                               :defaults path))))
           (unique
             (delete nil
                     (delete-duplicates names
                                        :test #'equal))))
      (loop for name in unique
            for tif = (make-pathname :name name :type "tif"
                                     :defaults path)
            for jpg = (make-pathname :name name :type "jpg"
                                     :defaults path)
            when (and (probe-file tif)
                      (probe-file jpg))
              do (delete-file (if (< (file-write-date tif)
                                     (file-write-date jpg))
                                tif jpg)))))

Edi.
From: Frank Buss
Subject: Re: File handling and list-unique
Date: 
Message-ID: <cb793u$d3a$1@newsreader2.netcologne.de>
Edi Weitz <···@agharta.de> wrote:

> Looks OK. Here are some remarks:
> 
> 1. Don't use top-level SETQ because this is asking for undefined
>    behaviour. Use DEFPARAMETER or DEFVAR instead.

ok, if I understand the CL standard correctly, SETF (and SETQ) does a 
lexical binding, like LET, but DEFVAR and DEFPARAMETER a special binding. 
In CMUCL I got a warning that a variable set with SETQ is declared 
special, so I assume it doesn't make sense to make a lexical variable 
binding in global namespace, but I don't understand it fully.

> 3. There are functions REMOVE-DUPLICATES/DELETE-DUPLICATES so you
>    don't need SORT and the first DOLIST.

Thanks, perhaps I should skim all functions in the CL standard to know 
that there is something if I need something, but there are so many 
functions.

> 4. Depending on your implementation DIRECTORY might return pathnames
>    which have a NIL pathname component (e.g. for files like ".emacs")
>    which is not a string, so you might get an error if you call SORT
>    with #'STRING<.

this is not possible in my case, because I have no files with "." at 
start and ".jpg" or ".tif" at end.

> 5. In (STRING/= (CAR UNIQUE) X) the first argument will be NIL if
>    UNIQUE is still empty. NIL is not a string so you get undefined
>    behaviour again.

yes, this could be true. Looks like NIL works like the greates possible 
string ((string< "foo" nil) returns t for all "foo"s), but I didn't found 
this behaviour in the standard.

> 6. Don't create pathnames from other pathnames with string operations,
>    this is how you'd do it in Perl. Use CL's pathname operations like
>    MAKE-PATHNAME.

Yes, MAKE-PATHNAME is better, I didn't understand the usage, but now I 
do.

> Here's my take:

Yes, that's my algorithm, written more Lisp-like, but I think Bj�rn's 
algorithm is better, because it leads to a shorter implementation and is 
easy to understand. Pascal's code is short, but not so easy to understand 
and I think it could caused problems, if there were files like 
"foo.tif.old" (which is not the case).

-- 
Frank Bu�, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Matthew Danish
Subject: Re: File handling and list-unique
Date: 
Message-ID: <Pine.LNX.4.58-035.0406211532280.4923@unix45.andrew.cmu.edu>
On Mon, 21 Jun 2004, Frank Buss wrote:
> Edi Weitz <···@agharta.de> wrote:
>
> > Looks OK. Here are some remarks:
> >
> > 1. Don't use top-level SETQ because this is asking for undefined
> >    behaviour. Use DEFPARAMETER or DEFVAR instead.
>
> ok, if I understand the CL standard correctly, SETF (and SETQ) does a
> lexical binding, like LET, but DEFVAR and DEFPARAMETER a special binding.

Wrong: SETF (and SETQ) are for modifying *existing* bindings.  They do not
have defined semantics for creating new ones.
From: James P. Massar
Subject: Re: File handling and list-unique
Date: 
Message-ID: <gkfed0l6fj1qluoh13puckfjiphaug1n4a@4ax.com>
On Mon, 21 Jun 2004 18:23:58 +0000 (UTC), Frank Buss
<··@frank-buss.de> wrote:

 
>
>> 3. There are functions REMOVE-DUPLICATES/DELETE-DUPLICATES so you
>>    don't need SORT and the first DOLIST.
>
>Thanks, perhaps I should skim all functions in the CL standard to know 
>that there is something if I need something, but there are so many 
>functions.
>
 
You can use the APROPOS function to find functions that might be
what you are looking for.
From: JP Massar
Subject: Re: File handling and list-unique
Date: 
Message-ID: <n7ged0p82umc2am2qdjpbt3k2jss1q5ohl@4ax.com>
On Mon, 21 Jun 2004 20:07:51 GMT, James P. Massar
<······@alum.mit.edu> wrote:

>On Mon, 21 Jun 2004 18:23:58 +0000 (UTC), Frank Buss
><··@frank-buss.de> wrote:
>
> 
>>
>>> 3. There are functions REMOVE-DUPLICATES/DELETE-DUPLICATES so you
>>>    don't need SORT and the first DOLIST.
>>
>>Thanks, perhaps I should skim all functions in the CL standard to know 
>>that there is something if I need something, but there are so many 
>>functions.
>>
> 
>You can use the APROPOS function to find functions that might be
>what you are looking for.

Doing a Google search on

function to remove duplicate elements from a list

finds you the relevant Hyperspec entry, too.
From: Frank Buss
Subject: Re: File handling and list-unique
Date: 
Message-ID: <cbhq7m$pa3$1@newsreader2.netcologne.de>
James P. Massar <······@alum.mit.edu> wrote:

>>Thanks, perhaps I should skim all functions in the CL standard to know 
>>that there is something if I need something, but there are so many 
>>functions.
>  
> You can use the APROPOS function to find functions that might be
> what you are looking for.

Yes, this works. (apropos "duplicate") returns many symbols. But I'll read 
the function list nevertheless, because then I'll discover functions for 
which I don't search, too, like apropos :-)

-- 
Frank Bu�, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Rob Warnock
Subject: Re: File handling and list-unique
Date: 
Message-ID: <_badnZ8rXbR-G0rd4p2dnA@speakeasy.net>
Frank Buss  <··@frank-buss.de> wrote:
+---------------
| Edi Weitz <···@agharta.de> wrote:
| > 1. Don't use top-level SETQ because this is asking for undefined
| >    behaviour. Use DEFPARAMETER or DEFVAR instead.
| 
| ok, if I understand the CL standard correctly, SETF (and SETQ) does a 
| lexical binding, like LET, but DEFVAR and DEFPARAMETER a special binding. 
+---------------

*NO!* SETF/SETQ don't do binding at all! They only *mutate* an existing
variable binding, which can be either lexical or special (depending on
what bindings & declarations are in scope at the point SETF/SETQ are used).

+---------------
| In CMUCL I got a warning that a variable set with SETQ is declared 
| special, so I assume it doesn't make sense to make a lexical variable 
| binding in global namespace, but I don't understand it fully.
+---------------

The Common Lisp standard simply does not specify any way to create a
"global lexical variable", sorry. Specifically, the lexical environment
is disjoint from the global environment. This may be somewhat confusing
given that CLHS "3.1.1.3 Lexical Environments" says:

    Within a given namespace, a name is said to be bound in a lexical
    environment if there is a binding associated with its name in the
    lexical environment or, if not, there is a binding associated with
    its name in the global environment.

But CLHS "3.1.1.1 The Global Environment" makes it clear [by explicitly
listing everything that the global environment includes] that the global
environment does not contain any lexical bindings of variables, or rather,
as CLHS "3.1.1.3.1 The Null Lexical Environment" puts it:

    The null lexical environment is equivalent to the global environment.

*Some* implementations might allow you to SETF/SETQ a variable without
binding or declaring it (particularly in a top-level form in the REPL),
and might (or might not) thereafter treat that variable as a "global
lexical" in the absence of any later global proclamations... but you
can't count on that.


-Rob

p.s Note that much of the effect one typically wants from a "global
lexical variable" can be achieved with some careful DEFINE-SYMBOL-MACRO
macrology.

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Tim Bradshaw
Subject: Re: File handling and list-unique
Date: 
Message-ID: <fbc0f5d1.0406221003.52c1e4d9@posting.google.com>
····@rpw3.org (Rob Warnock) wrote in message news:<······················@speakeasy.net>...

> p.s Note that much of the effect one typically wants from a "global
> lexical variable" can be achieved with some careful DEFINE-SYMBOL-MACRO
> macrology.


As for instance  http://www.tfeb.org/lisp/toys.html#GLEX.

--tim (blowing his own trumpet)
From: Edi Weitz
Subject: Re: File handling and list-unique
Date: 
Message-ID: <87hdt44v36.fsf@bird.agharta.de>
On Mon, 21 Jun 2004 18:23:58 +0000 (UTC), Frank Buss <··@frank-buss.de> wrote:

> yes, this could be true. Looks like NIL works like the greates
> possible string ((string< "foo" nil) returns t for all "foo"s), but
> I didn't found this behaviour in the standard.

I have to correct myself: NIL is a symbol and thus a "string
designator" (see the glossary), so it denotes its name which is, well,
"NIL". Probably not what you want if you also have files with
uppercase characters in their names.

> Yes, that's my algorithm, written more Lisp-like, but I think
> Bj�rn's algorithm is better, because it leads to a shorter
> implementation and is easy to understand.

Yep.
From: Björn Lindberg
Subject: Re: File handling and list-unique
Date: 
Message-ID: <hcs4qp5t913.fsf@knatte.nada.kth.se>
Frank Buss <··@frank-buss.de> writes:

> In order to learn Lisp I'm trying to do some small tasks with it. I have 
> some files, ending with ".tif" or ".jpg". Sometimes a file can be in tif 
> and jpg, e.g. "test.jpg" and "test.tif". Then I want to delete the older 
> file. This is my solution:
> 
> (setq path "c:/tmp/images/")
> (setq names 
>       (mapcar #'pathname-name 
>         (directory (concatenate 'string path "*"))))
> (setq names 
>       (sort names #'string<))
> (setq unique nil)
> (dolist (x names) 
>   (if (string/= (car unique) x) 
>       (setq unique (cons x unique))))
> (dolist (name unique)
>   (let ((tif (concatenate 'string path name ".tif"))
>         (jpg (concatenate 'string path name ".jpg")))
>     (if (and (probe-file jpg) (probe-file tif)) 
>         (if (< (file-write-date tif) (file-write-date jpg))
>             (delete-file tif)
>           (delete-file jpg)
>           ))))
> 
> Looks a bit complicated, but I think in Java it would be more 
> complicated, but in Bash or Perl it would be shorter (but not so easy to 
> read). Any comments how to write it better?

(defun foo (path)
  (let ((jpegs (directory (make-pathname :name :wild :type "jpg"
                                         :defaults path))))
    (dolist (jpeg jpegs)
      (let ((tif (probe-file (merge-pathnames (make-pathname :type "tif") 
                                              file))))
        (when tif
          (if (< (file-write-date tif) (file-write-date jpg))
              (delete-file tif)
              (delete-file jpeg)))))))


Bj�rn
From: Barry Fishman
Subject: Re: File handling and list-unique
Date: 
Message-ID: <m3y8me4aj6.fsf@ecube.site>
·······@nada.kth.se (Björn Lindberg) writes:
>
> (defun foo (path)
>   (let ((jpegs (directory (make-pathname :name :wild :type "jpg"
>                                          :defaults path))))
>     (dolist (jpeg jpegs)
>       (let ((tif (probe-file (merge-pathnames (make-pathname :type "tif") 
>                                               file))))
>         (when tif
>           (if (< (file-write-date tif) (file-write-date jpg))
>               (delete-file tif)
>               (delete-file jpeg)))))))

Isn't is sufficient to do:

       (make-pathname :type "tif" :defaults file)

rather than having to perform an explicit MERGE-PATHNAMES?

-- 
Barry Fishman
From: Frank Buss
Subject: Re: File handling and list-unique
Date: 
Message-ID: <cbhtvt$4vi$1@newsreader2.netcologne.de>
Barry Fishman <·············@att.net> wrote:

>>       (merge-pathnames (make-pathname :type "tif") file)

> Isn't is sufficient to do:
> 
>        (make-pathname :type "tif" :defaults file)
> 
> rather than having to perform an explicit MERGE-PATHNAMES?

yes, looks like this is possible, because the documentation says "After 
the components supplied explicitly by host, device, directory, name, 
type, and version are filled in, the merging rules used by merge-
pathnames are used to fill in any unsupplied components from the defaults 
supplied by defaults".

BTW, there are some spelling errors in Bj�rn's solution, here is the 
right one:

(defun foo (path)
  (let ((jpegs (directory (make-pathname :name :wild :type "jpg"
                                         :defaults path))))
    (dolist (jpg jpegs)
      (let ((tif (probe-file (make-pathname :type "tif" :defaults jpg))))
        (when tif
          (if (< (file-write-date tif) (file-write-date jpg))
              (delete-file tif)
            (delete-file jpg)))))))

Another question: the Allegro CL pretty-print indents the last but one 
line two spaces more than I think it looks ok, what is the idea behind 
this indention rule? Is it more usual to indent like Bj�rn has done it?

-- 
Frank Bu�, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Björn Lindberg
Subject: Re: File handling and list-unique
Date: 
Message-ID: <hcsoen3sttr.fsf@fnatte.nada.kth.se>
Frank Buss <··@frank-buss.de> writes:

> Barry Fishman <·············@att.net> wrote:
> 
> >>       (merge-pathnames (make-pathname :type "tif") file)
> 
> > Isn't is sufficient to do:
> > 
> >        (make-pathname :type "tif" :defaults file)
> > 
> > rather than having to perform an explicit MERGE-PATHNAMES?
> 
> yes, looks like this is possible, because the documentation says "After 
> the components supplied explicitly by host, device, directory, name, 
> type, and version are filled in, the merging rules used by merge-
> pathnames are used to fill in any unsupplied components from the defaults 
> supplied by defaults".

Yes, my mistake.

> BTW, there are some spelling errors in Bj�rn's solution, here is the 
> right one:
> 
> (defun foo (path)
>   (let ((jpegs (directory (make-pathname :name :wild :type "jpg"
>                                          :defaults path))))
>     (dolist (jpg jpegs)
>       (let ((tif (probe-file (make-pathname :type "tif" :defaults jpg))))
>         (when tif
>           (if (< (file-write-date tif) (file-write-date jpg))
>               (delete-file tif)
>             (delete-file jpg)))))))
> 
> Another question: the Allegro CL pretty-print indents the last but one 
> line two spaces more than I think it looks ok, what is the idea behind 
> this indention rule? Is it more usual to indent like Bj�rn has done it?

I /think/ it is more common to ident the consequent and alterantive
clauses equally. In Emacs, the default is the way you show above, but
if you set the indentation function to the CL one, it is indented like
I did. But IF in elisp wraps an implicit progn around the else clause,
so that you may write several expressions[1]. For lisps such as that it
may make sense to indent the consequent clause specially. In CL, since
you can only have one expression for consequent and alternative
respectively, I prefer indenting them equally to emphasize their equal
importance.

  [1] The following is valid elisp but not CL:
      (if (zerop 1)
          (foo)
        (bar)
        (baz))


Bj�rn
From: Frank Buss
Subject: OT: XEmacs CL setup for Windows
Date: 
Message-ID: <cc4cr9$ovp$1@newsreader2.netcologne.de>
·······@nada.kth.se (Bj�rn Lindberg) wrote:

> I /think/ it is more common to ident the consequent and alterantive
> clauses equally. In Emacs, the default is the way you show above, but
> if you set the indentation function to the CL one, it is indented like
> I did. 

I've tried XEmacs, but I'm working mostly on Windows, so it was a little 
shock not to use a plug-and-play program. After some hours reading 
manuals now I've managed to install slime and added some keyboard 
mappings I've found in the web which are more Windows-like.

Addionally I wanted to try slime. The checkout with the FAIRLY-STABLE-tag 
was no problem, because I'm working all the day with CVS, but the 
installation was not so easy, because of spaces in my path. The manual 
how to start slime at http://home.comcast.net/~bc19191/blog/040315.html 
was too complicated, too, because I want simply type one command, not two 
with host and port, so I've added a slime-start function. Below is my 
init.el file (I'm using clisp at the moment) and now I can type C-a C-i 
and I have the same functionality like C-a, context-menu-pretty-print in 
Allegro CL, but now it does the right formatting :-)

Some time ago I've read in this newsgroup that someone has packaged Emacs 
and Lisp for Mac in a one-click-to-install package. Would be nice to have 
such a setup-program for Windows, with special Windows configuration of 
Emacs, to lower the hurdle for the impatient Lisp newbie.


; load special common lisp indention
(load "cl-indent")
(setq lisp-indent-function (function common-lisp-indent-function))

; some window-like keyboard mappings
(global-set-key [(control s)] 'save-buffer)
(global-set-key [(control o)] 'find-file)
(global-set-key [(control g)] 'goto-line)
(global-set-key [(control i)] 'indent-region)
(global-set-key [(control f)] 'isearch-forward)
(global-set-key [(control b)] 'isearch-backward)
(global-set-key [(control r)] 'redo)
(global-set-key [(control z)] 'undo)
(global-set-key [(control w)] 'kill-this-buffer)
(global-set-key [(control a)] 'mark-whole-buffer)
(global-set-key [(control k)] 'kill-line)
(global-set-key [(control end)] 'end-of-buffer)
(global-set-key [(control home)] 'beginning-of-buffer)

; SLIME Setup

(setq load-path (append (list "C:/Program Files/slime")
                        load-path))
(require 'slime)
(add-hook 'lisp-mode-hook (lambda () (slime-mode t)))
(add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))
;; If you don't want eldoc-like behavior, comment out the following line
(slime-autodoc-mode)

(defun clisp-start ()
  (interactive)
  (shell-command (concat "c:/clisp/full/lisp.exe "
			 "-B c:/clisp/full/ "
			 "-M c:/clisp/full/lispinit.mem "
			 "-i c:/.slime.lisp "
			 "-ansi -q&")))

(defun slime-start ()
  (interactive)
  (clisp-start)
  (slime-connect "localhost" 4005))


-- 
Frank Bu�, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Alan Shutko
Subject: Re: OT: XEmacs CL setup for Windows
Date: 
Message-ID: <87n02i2mpj.fsf@wesley.springies.com>
Frank Buss <··@frank-buss.de> writes:

> The manual how to start slime at
> http://home.comcast.net/~bc19191/blog/040315.html was too
> complicated, too, because I want simply type one command, not two
> with host and port, so I've added a slime-start function.

Actually, if you just want a single lisp implementation, you can do
something like

(setq inferior-lisp-program "c:\\clisp-2.32\\full\\lisp -ansi -I -M c:\\clisp-2.32\\full\\lispinit.mem")

and just M-x slime.  Poof, everything is started.

Bill Clementson's setup is complicated by the fact that he has
multiple CL implementations he plays with, and Allegro is a Win32
Windows executable and can't be launched from an inferior lisp within
emacs.[1]  But CLISP is a Win32 console app, and works fine launched
as inferior lisp.  That's how I use it on Windows.


Footnotes: 
[1]  http://home.comcast.net/~bc19191/blog/040303.html

-- 
Alan Shutko <···@acm.org> - I am the rocks.
What does your Rice Crispies say to you? "Help! I'm drowning!"
From: Frank Buss
Subject: Re: OT: XEmacs CL setup for Windows
Date: 
Message-ID: <cc4kt3$cr1$1@newsreader2.netcologne.de>
Alan Shutko <···@acm.org> wrote:

> Actually, if you just want a single lisp implementation, you can do
> something like
> 
> (setq inferior-lisp-program "c:\\clisp-2.32\\full\\lisp -ansi -I -M
> c:\\clisp-2.32\\full\\lispinit.mem") 
> 
> and just M-x slime.  Poof, everything is started.

Yes, this works and I've found it in the slime.pdf documentation, too, but 
I ignored it first, because of the words "On Unix-like systems", thinking 
that a special Windows installation manual would be better.

-- 
Frank Bu�, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Matthew Danish
Subject: Re: OT: XEmacs CL setup for Windows
Date: 
Message-ID: <Pine.LNX.4.58-035.0407021944130.2607@unix45.andrew.cmu.edu>
You might want to check out Lisp in a Box emacs init files (in particular,
98slime.el).  It handles spaces in pathnames, choosing between several
implementations, starting Allegro properly, etc.

http://www.common-lisp.net/project/lispbox/