Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7924297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:41:28+00:00 2026-06-03T17:41:28+00:00

I’m attempting to save the output of (ql:system-apropos regex) to a variable by using

  • 0

I’m attempting to save the output of (ql:system-apropos "regex") to a variable by using multiple-value-bind, but I only the nil. However, it seems that this command only prints text to REPL and does not return any variables, so doesn’t seem to work. In that case, is there any way to get the output of ql:system-apropos as a list or as an array, especially the package names returned by it.

This basic multiple-value-bind code works:

* (multiple-value-bind (first-var second-var) (floor 5 3) (defparameter *first-var* first-var) (defparameter *second-var* second-var))

*SECOND-VAR*
* *first-var*

1
* *second-var*

2
*

But this does not (if there is nothing to bind for multiple-value-bind ?) :

* (multiple-value-bind (first-var second-var) (ql:system-apropos "regex") (defparameter *first-var* first-var) (defparameter *second-var* second-var))
#<SYSTEM com.informatimago.common-lisp.regexp / com.informatimago-20120407-git / quicklisp 2012-04-07>
#<SYSTEM lispbuilder-regex / lispbuilder-20110619-svn / quicklisp 2012-04-07>
#<SYSTEM recursive-regex / recursive-regex-20120407-git / quicklisp 2012-04-07>
#<SYSTEM recursive-regex-test / recursive-regex-20120407-git / quicklisp 2012-04-07>
#<SYSTEM regex / regex-1 / quicklisp 2012-04-07>
*SECOND-VAR*
* *first-var*

NIL
* *second-var*

NIL
*

So it seems that ql:system-apropos only prints text on screen by using format or some other printing command?

The purpose of this would be to extract the package names of output by using some string handling commands (probably some regex) and automate the installing or re-installing of all packages returned by ql:system-apropos, for example:

(defparameter *package-name-string* "lispbuilder")
(multiple-value-bind (lispbuilder-packages-list) (ql:system-apropos *package-name-string*) (defparameter *lispbuilder-packages-list* lispbuilder-packages-list))

Any other way to get quicklisp package names using partial names or some regex as input would also be a working solution (even getting the current complete list of packages would be useful). Is there any viable solution to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T17:41:34+00:00Added an answer on June 3, 2026 at 5:41 pm

    Your interaction with Common Lisp looks much too complicated.

    You ask: storing the package names returned by ql:system-apropos into a variable.

    Does it actually return anything? Or does it only print something?

    You can easily find out. I’m using in my example CL:APROPOS:

    CL-USER 141 > (apropos "plist" "CL")
    SYMBOL-PLIST (defined)
    MAPLIST (defined)
    

    Just describe the return value:

    CL-USER 142 > (describe (apropos "plist" "CL"))
    SYMBOL-PLIST (defined)
    MAPLIST (defined)
    NIL is a NULL
    NAME          "NIL"
    VALUE         NIL
    FUNCTION      #<unbound function>
    PLIST         (TYPE::DIRECT-TYPE-PREDICATE TYPE::RETURN-FALSE)
    PACKAGE       #<The COMMON-LISP package, 2/4 internal, 978/1024 external>
    

    There is nothing. APROPOS just prints something.

    Common Lisp uses output streams. Just rebind the variable which holds the output stream:

    CL-USER 143 > (with-output-to-string (*standard-output*)
                    (apropos "plist" "CL"))
    "SYMBOL-PLIST (defined)
    MAPLIST (defined)"
    

    Now you got a string, which you can parse.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.