From: David Golden
Subject: nested presentations
Date: 
Message-ID: <Rip1h.15390$j7.332875@news.indigo.ie>
Hi,

I have a vague memory of a criticism on someone's part
of both SLIME and McCLIM, about neither supporting 
nested presentations.  I'm trying to find a description
of how such nested presentations worked traditionally.

But I can't find the criticism now with google (maybe 
just having a bout of long-weekend searching incompetence),
so was just wondering if anyone had such an explanation
handy?

From: Rainer Joswig
Subject: Re: nested presentations
Date: 
Message-ID: <joswig-324C70.18011730102006@news-europe.giganews.com>
In article <·····················@news.indigo.ie>,
 David Golden <············@oceanfree.net> wrote:

> Hi,
> 
> I have a vague memory of a criticism on someone's part
> of both SLIME and McCLIM, about neither supporting 
> nested presentations.  I'm trying to find a description
> of how such nested presentations worked traditionally.
> 
> But I can't find the criticism now with google (maybe 
> just having a bout of long-weekend searching incompetence),
> so was just wondering if anyone had such an explanation
> handy?


Example:

If you have a CLIM Listener and you type:

? (list 'foo 'bar 'baz)

The system responds with the resulting list.

(foo bar baz)

Next the Listener again expects a command or an expression.

If you move the mouse over the result list, the list should be
mouse sensitive. But if the mouse cursor is over a symbol
in that list, only the symbol should be mouse sensitive.

So, accept (in general not just in this Listener example)
should look for the smallest applicable presentation
within nested presentations. This is how it worked in
the commercial CLIM and also with DW (Dynamic Windows).
This also means that when you 'present' something,
you should not only record this presentation, but also
presentations of sub-items...

Regards,

Rainer
From: Rainer Joswig
Subject: Re: nested presentations
Date: 
Message-ID: <joswig-4DE9C2.01273431102006@news-europe.giganews.com>
In article <····························@news-europe.giganews.com>,
 Rainer Joswig <······@lisp.de> wrote:

> In article <·····················@news.indigo.ie>,
>  David Golden <············@oceanfree.net> wrote:
> 
> > Hi,
> > 
> > I have a vague memory of a criticism on someone's part
> > of both SLIME and McCLIM, about neither supporting 
> > nested presentations.  I'm trying to find a description
> > of how such nested presentations worked traditionally.
> > 
> > But I can't find the criticism now with google (maybe 
> > just having a bout of long-weekend searching incompetence),
> > so was just wondering if anyone had such an explanation
> > handy?
> 
> 
> Example:
> 
> If you have a CLIM Listener and you type:
> 
> ? (list 'foo 'bar 'baz)
> 
> The system responds with the resulting list.
> 
> (foo bar baz)
> 
> Next the Listener again expects a command or an expression.
> 
> If you move the mouse over the result list, the list should be
> mouse sensitive. But if the mouse cursor is over a symbol
> in that list, only the symbol should be mouse sensitive.
> 
> So, accept (in general not just in this Listener example)
> should look for the smallest applicable presentation
> within nested presentations. This is how it worked in
> the commercial CLIM and also with DW (Dynamic Windows).
> This also means that when you 'present' something,
> you should not only record this presentation, but also
> presentations of sub-items...
> 
> Regards,
> 
> Rainer

plus:

DW and CLIM 2 are doing this for all kinds of presentations
that have subcomponents. Not just for lists. Also
for arrays, structures, objects and so on. You
also don't need to call PRESENT yourself on those
subcomponents, standard CL printing
routines are sufficient. Those will use the presentation
mechanism to recursively print and present compound
things.

In DW's listener you can also list a directory and
refer to the whole directory listing or to the
individual files/subdirectories.

DW also comes with the added feature that you can edit
the subcomponents in place. Means you can
click on any subitem and change its printing
environment or the item itself.

Having subcomponents mouse sensitive also works
in Zmacs when you point to content in an editor buffer.
From: GP lisper
Subject: Re: nested presentations
Date: 
Message-ID: <slrnekh1kr.91n.spambait@phoenix.clouddancer.com>
On Mon, 30 Oct 2006 18:01:17 +0200, <······@lisp.de> wrote: 
>
> This is how it worked in DW (Dynamic Windows).

Is DW generally available?  Lisp Machine only?

TIA


-- 
Reply-To email is ignored.

-- 
Posted via a free Usenet account from http://www.teranews.com
From: Paolo Amoroso
Subject: Re: nested presentations
Date: 
Message-ID: <87bqnrgyh3.fsf@plato.moon.paoloamoroso.it>
GP lisper <········@CloudDancer.com> writes:

> Is DW generally available?  Lisp Machine only?

You might have a look at Express Windows:

  http://www.scs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/gui/ew/0.html


Paolo
-- 
Why Lisp? http://wiki.alu.org/RtL%20Highlight%20Film
The Common Lisp Directory: http://www.cl-user.net
From: Robert Strandh
Subject: Re: nested presentations
Date: 
Message-ID: <6wbqntgktv.fsf@serveur5.labri.fr>
David Golden <············@oceanfree.net> writes:

> I have a vague memory of a criticism on someone's part
> of both SLIME and McCLIM, about neither supporting 
> nested presentations.  I'm trying to find a description
> of how such nested presentations worked traditionally.

McCLIM does support nested presentations.  To see that, fire up the
listener and type something like:

  (in-package :clim-user)

  (with-output-as-presentation (*standard-output* 123 'number)
    (princ "hello")
    (with-output-as-presentation (*standard-output* 456 'integer)
      (princ "hi"))
    (princ "there"))

and you will see:

  hellohithere

Now, type:

  (accept 'number)

You will be prompted for a number.  If you drag the pointer over the
middle "hi" of the output, you will see only those two letters
highlighted, and clicking there will accept the number 456.  If,
instead, you drag the pointer over some other part of the output, the
entire output will be highlighted, and 123 will be accepted. 

Typing:

  (accept 'integer)

will make only the "hi" part sensitive as expected. 
-- 
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------
From: Matthias Koeppe
Subject: Re: nested presentations
Date: 
Message-ID: <uw5fyd3fl8r.fsf@merkur.math.uni-magdeburg.de>
David Golden <············@oceanfree.net> writes:

> I have a vague memory of a criticism on someone's part
> of both SLIME and McCLIM, about neither supporting 
> nested presentations.  I'm trying to find a description
> of how such nested presentations worked traditionally.

Actually, SLIME does support nested presentations since August 2005.

By default, however, SLIME's present.lisp only installs
presentation-producing printers for #<unreadable> objects and
pathnames, which are rarely nested.

If you install a printer function for CONSes, for instance, that
produces nested presentations, then SLIME will handle them correctly.
Here is portable code that installs such a pretty-printer function:

    (defparameter *nested-pprint-dispatch-table* (copy-pprint-dispatch))
    
    (set-pprint-dispatch 'cons 
    		     (lambda (stream object) 
    		       (swank::presenting-object object stream 
    						 (pprint-logical-block (stream object :prefix "(" :suffix ")")
    						   (loop 
    						      (pprint-exit-if-list-exhausted) 
    						      (prin1 (pprint-pop) stream)
    						      (pprint-exit-if-list-exhausted)
    						      (princ " " stream)
    						      (pprint-newline :fill stream)))))
    		     0 *nested-pprint-dispatch-table*)

(One would need implementation-dependent code to modify the non-pretty
printer accordingly.)

If you now print a nested list,
    
    (let ((*print-pprint-dispatch* *nested-pprint-dispatch-table*)) 
      (pprint '((1 2 (3 4) (5 (6 7)) 8)))),
    
you can pick the individual sublists like (3 4) with the mouse,

    (eq '(3 4) '(3 4))
    ==> T

Regards,
-- 
Matthias Koeppe -- http://www.math.uni-magdeburg.de/~mkoeppe