mmontone / lisp-system-browser

Smalltalk-like system browser for Common Lisp.
69 stars 5 forks source link

How to hide system packages (e.g. Alexandria / ASDF) #8

Closed ashok-khanna closed 3 years ago

ashok-khanna commented 3 years ago

First of all - WOW! This is simply amazing, it really takes the Lisp IDE experience in Emacs to the next level, so, so good - thank you!

One question I had was how to hide all the 'common' packages in the package list such as

etc

It seems like everything is being loaded in (I think because of QuickLisp // the libraries I am using), but I would like to only see my packages and not the ones that I am using in my work?

Is that possible as a switch somewhere (sometimes it is good to dig into the broader set of packages, so having that option would also be nice)

Congrats again and I hope you keep working on it - this with SLIME & PAREDIT, has the potential to be masterpiece package!

mmontone commented 3 years ago

The packages you see are all the available CL packages in the loaded Lisp image.

Not possible atm to filter them, but someone else already proposed something similar. And I'm welcoming feedback and ideas, as this is expermiental work, and will need user testing to be as useful as possible.

So, perhaps we can develop the idea of "bookmarking" or "filtering" packages, in this issue.

ashok-khanna commented 3 years ago

Thanks for the clarification. It is a very minor point. I will play around with it more and let you know any further ideas I have on my end around this.

mmontone commented 3 years ago

Have a look at M-x system-browser-browse-system command, that limits the packages list to some ASDF system.

If you enter an empty ASDF system name (just press enter), then you go back to the full packages list.

mmontone commented 3 years ago

And if you run the command with a prefix argument, then the ASDF system direct dependencies packages are included in the browser list.

ashok-khanna commented 3 years ago

Hi mmontone, sorry for the late response, was very busy.

Also I am a super noob, I tried the following:

M-x lisp-system-browser

M-x system-browser-browse-system >> [No Match]

Where am I meant to run that command?

mmontone commented 3 years ago

What you've tried is correct. Have you git pull ?

El lun., 9 ago. 2021 17:40, Ashok Khanna @.***> escribió:

Hi mmontone, sorry for the late response, was very busy.

Also I am a super noob, I tried the following:

M-x lisp-system-browser

M-x system-browser-browse-system >> [No Match]

Where am I meant to run that command?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mmontone/lisp-system-browser/issues/8#issuecomment-895526119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADKPDWFTHQBPQIVAHJAECDT4A4KVANCNFSM5BNOXRUQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

mmontone commented 3 years ago

Have you tried pressing tab for ASDF system name completion when running the system-browser-browse-system command?

The ASDF system needs to be loaded on Lisp image already in order to be able to browse it.

mmontone commented 3 years ago

I've pushed a change so that ASDF systems are automatically loaded when you want to browse them.

git pull and try again. Perhaps that helps.

ashok-khanna commented 3 years ago

I downloaded the latest version. Then I started a fresh Emacs, did the following:

M-x lisp-system-browser Select yes to start SLIME sessions M-x system-browser-browse-system

I get the following: Symbol's function definition is void: slime-read-system-name

It's not a big issue, I don't mind having all the package names in the sidebar - but just sharing the above. Thanks again for a great package, I will try using it more and more and will read through the code as well.

mmontone commented 3 years ago

I think that's a bug. So, thanks for the report.

I've made another push. Can you git pull, then restart Emacs and try again?

ashok-khanna commented 3 years ago

Works really well :)

Couple of follow-on questions, so basically I should start using systems vs. using individual packages? I think that makes sense as it will load all the relevant packages (but its something new for me, I usually just work in packages)

Also is there a way to add a command on the startup of lisp-system-browser to choose which system to load so that it:

I think that would be a great quality of life feature.

mmontone commented 3 years ago

Works really well :)

Couple of follow-on questions, so basically I should start using systems vs. using individual packages? I think that makes sense as it will load all the relevant packages (but its something new for me, I usually just work in packages)

That's up to you if you want to browse the ASDF package list or the full package list. Note that I'm just filtering the list of packages, so you are still working in packages.

Also is there a way to add a command on the startup of lisp-system-browser to choose which system to load so that it:

* Starts Slime

* Loads the files of the system

* Does system-browser-browse-system on that system?

I think that would be a great quality of life feature.

There's not something like that yet. But I can easily implement. Will do.

So, to summarize:

ashok-khanna commented 3 years ago

Thanks mmontone, much appreciated. I will close this issue now. Thanks!

mmontone commented 3 years ago

@ashok-khanna

I've just added the hook system-browser-start-hook that runs after system-browser starts.

Put this in your .emacs to browse your ASDF system on start:

(add-hook 'system-browser-start-hook
      (lambda ()
            ;; add command prefix if you want dependencies too 
        ;; (setq current-prefix-arg 'deps) 
        (system-browser-browse-system "ASDF system name")))
mmontone commented 3 years ago

@ashok-khanna

Even better after the commit above. Do M-x customize-variable RET esb:asdf-system RET.

Then enter the ASDF system name in Emacs customization buffer.

Then apply and save.

ashok-khanna commented 3 years ago

Great - thanks for this!