Re: Readline completion example?

Sam Steingold <[email protected]>
Newsgroups gmane.lisp.clisp.general
Message-ID <m1tw7mxe6e.fsf@clr-sds>
> * Jean Louis <[email protected]> [2017-02-21 22:12:20 +0300]:
>
> On Tue, Feb 21, 2017 at 01:33:31PM -0500, Sam Steingold wrote:
>> > * Jean Louis <[email protected]> [2017-02-19 10:08:56 +0300]:
>> >
>> > I did review complete.lisp -- for me is too complex to start with
>> > it. I am rather for user based example, not CLISP based which is for
>> > developers.
>> 
>> I don't see the distinction.
>> You can type "(appe TAB" at CLISP prompt and get it completed to
>> "(append ".
>> Are you a "user" or a "developer"?
>
> I am not a developer of CLISP. You are the one doing it, of course you
> don't see distinction. Teaching requires to estimate the student's
> current level so that he may go to next level on the gradient..

I think I did not express myself clearly (or maybe I misunderstood your
original comment). My apologies.

I was making a "philosophical" point that, wrt software tools, there is
no fundamental difference between "users" and "developers" (as
opposed to, say, the difference between users and developers of a word
processor or a web browser).

This is similar to the "blueprint/spec" and "product" distinction: a
blueprint for a bridge is _not_ a bridge, no matter how clear and
detailed it is.  A very detailed spec for a computer program is, in a
way, _the_ computer program it describes (cf. pseudocode).

Of course I understand CLISP internal better than you do at this time.
However, the readline completion feature is useful to you just as much
as it is useful to me. We are in the same boat, so to speak.

You can start your quest by replacing sys::completion with, say,

(defun sys::completion (string start end)
  (list "foo" "foo1" "foo2"))

Now, whenever you hit TAB, you get "foo" inserted and "foo1" and "foo2"
suggested (or something like that).

The current behavior is described here:
http://clisp.org/impnotes/clisp.html#completion

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504
http://steingoldpsychology.com http://www.childpsy.net http://think-israel.org
http://camera.org https://ffii.org https://jihadwatch.org http://memri.org
XFM: Exit file manager? [Continue] [Cancel] [Abort]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
clisp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.