From: sickfaichezi
Subject: Slime and Reloading files
Date: 
Message-ID: <1133398706.124057.113320@g49g2000cwa.googlegroups.com>
I seem to have this problem, which I can't figure out.

I'm able to load files once use C-c C-k in slime/Emacs. Then I'll go to
the REPL buffer and call all the functions just fine.

Afterwards I'll make some modifications to the buffer and/or add some
functions. C-c C-k again, but the new definitions won't take. I can't
seem to access the modified files, even though it seems to compile just
fine

(notes about unused variables and a warning about

;   (DEFUN GET-PROPERTIES (CONTACT-ID))
; Warning: Definition has one arg, but the previous declaration has
two.

)

but anyways none of the new definitions or modifications take within
the REPL.

This seems to happen over time, when I start emacs up, everything seems
fine. but after a while my loads just stop working. Could it be that
because of the warning slime isn't loading the file?

I'm not sure what to do, but it sure does make development a pain...

any help appreciated. Thanx.

From: sickfaichezi
Subject: Re: Slime and Reloading files
Date: 
Message-ID: <1133399011.485928.126160@g49g2000cwa.googlegroups.com>
Also,

I tried to perform a manual (load file) at the REPL and this is what I
get

Attempt to modify the locked package COMMON-LISP, by
   redefining function GET-PROPERTIES
   [Condition of type LISP::PACKAGE-LOCKED-ERROR]

Restarts:
  0: [CONTINUE] Ignore the lock and continue
  1: [UNLOCK-PACKAGE] Disable package's definition-lock, then continue
  2: [UNLOCK-ALL] Disable all package locks, then continue
  3: [CONTINUE] Return NIL from load of "EmailSurveys.lisp".
  4: [ABORT-REQUEST] Abort handling SLIME request.
  5: [ABORT] Return to Top-Level.
From: sickfaichezi
Subject: Re: Slime and Reloading files
Date: 
Message-ID: <1133399199.269980.186230@g44g2000cwa.googlegroups.com>
Okay,

so I commented out the function get-properties from my file, and now
C-c C-k works to load the file, but my question now is why doesn't it
tell me that it didn't load the file? And does this mean I can't define
a function named get-properties, even though its in my own package?
From: Peter Seibel
Subject: Re: Slime and Reloading files
Date: 
Message-ID: <m264q9vcbr.fsf@gigamonkeys.com>
"sickfaichezi" <············@gmail.com> writes:

> Okay,
>
> And does this mean I can't define a function named get-properties,
> even though its in my own package?

You can but you need to define your package so that it has its own
GET-PROPERTIES symbol, for instance:

  (defpackage :my-package
    (:use :common-lisp)
    (:shadow :get-properties))

The :use clause gives you access to all the exported symbols of the
COMMON-LISP package and the :shadow clause causes a new symbol with
the name "GET-PROPERTIES" to be created and added to the package so it
will shadow the symbol named "GET-PROPERTIES" that would otherwise be
inherited from the COMMON-LISP package.

-Peter

-- 
Peter Seibel           * ·····@gigamonkeys.com
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp  * http://www.gigamonkeys.com/book/
From: sickfaichezi
Subject: Re: Slime and Reloading files
Date: 
Message-ID: <1133400487.342641.105600@o13g2000cwo.googlegroups.com>
The wierd thing is I don't export that symbol; so why should I have to
shadow it?

Heres my defpackage statement:

defpackage :mypackage
  (:use :common-lisp :cl-ppcre :clsql :net.post-office)
  (:export :send-mails
           :process-bounces))
From: Bill Atkins
Subject: Re: Slime and Reloading files
Date: 
Message-ID: <1133404683.466518.91590@g43g2000cwa.googlegroups.com>
GET-PROPERTIES is a standard function defined in the COMMON-LISP
package.  Since you're using that package, CL-USER has a symbol named
GET-PROPERTIES from the CL package.  So when you define your own
function with that name, a conflict arises.

You can either choose a different name, or, as Peter recommended, just
shadow that symbol in MYPACKAGE.

hth,
Bill
From: Peter Seibel
Subject: Re: Slime and Reloading files
Date: 
Message-ID: <m2zmnlgzam.fsf@gigamonkeys.com>
"sickfaichezi" <············@gmail.com> writes:

> The wierd thing is I don't export that symbol; so why should I have
> to shadow it?

Exporting and shadowing are completely different. Exporting a symbol
has to do with other packages that :use your package gain access to
the symbol (or whether you can refer to the symbol with a single-colon
qualified name like foo:bar). Shadowing controls where the reader
finds the symbol when it reads a name. When you :use :common-lisp
then, absent any shadowing, when the reader reads the name
"GET-PROPERTIES" with your package as *PACKAGE* it find the symbol
COMMON-LISP:GET-PROPERTIES because it's exported from COMMON-LISP and
your package use COMMON-LISP. Since you want the reader to find a
different symbol, you need to explicitly say so. Shadowing is how you
say so.

-Peter

-- 
Peter Seibel           * ·····@gigamonkeys.com
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp  * http://www.gigamonkeys.com/book/