Lisp HUG Maillist Archive

Setting the listener's default package

Hello all,

I have a package that provides a default set of extensions/idioms that I make use of regularly to the point that I generally switch to this package immediately after opening LispWorks. Is there a way to set the listener package other than manually entering (in-package ...) ?

I understand that a saved image solves this in some respects, but I would like to have the option of doing this via regular initialization. Is this possible?

Thank you,
Joerthan

Re: Setting the listener's default package

Unable to parse email body. Email id is 10395

Re: Setting the listener's default package

Yes, I tried a few things. Below is the contents of test init file to reproduce. I assume this is because the init file is being loaded, in which case this behavior is expected.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "CL-USER")

(defpackage :test-user
  (:add-use-defaults t))

;; Either of these lines work in the Listener, not in the file
(in-package "TEST-USER")
(setq *package* (find-package "TEST-USER"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Thanks, Joerthan

On Mon, Jul 12, 2010 at 6:17 PM, Paul Tarvydas <tarvydas@visualframeworksinc.com> wrote:
Have you tried putting the in-package command in the ~/.lispworks file?
pt

Re: Setting the listener's default package

Joerthan Panest wrote:
> Is there a way to set the listener package other than manually entering (in-package ...) ?
> 

While not particularly elegant, the attached seems to work for me.


Mike



Re: Setting the listener's default package

That is particularly nice. Thanks Nick, and everyone else.

Cheers,
Joerthan

On Tue, Jul 13, 2010 at 4:09 AM, Nick Levine <ndl@ravenbrook.com> wrote:
The following works for all subsequent listeners as well:

(defadvice (capi::interactive-pane-top-loop set-frob-package :before)
 (top-level istream)
 (setf *package* (find-package "FROB")))

- n

One man's KW trash?

Hi KnowledgeWorkers,

"One man's trash is another man's treasure."

I'm hoping someone might have some old, disused, (possibly misused!) KnowledgeWorks and/or Common Prolog examples lying around. I've probably gleaned as much as I can from what ships with LW and seeing what others have accomplished would be insightful.

If so, please let me know how you'd prefer to arrange this.

Thankyou.
Brian Connoy



Updated at: 2020-12-10 08:39 UTC