Lisp HUG Maillist Archive

last evaluated result..

Hi List,

I would like to evaluate the contents of a text buffer that I created  
(editor::make-buffer) independently from an editor pane, and to get  
the last evaluated result.

The following code evaluates the contents of the buffer :

(editor::with-point ((p1 (editor::buffers-start textbuffer))
                            (p2 (editor::buffers-end textbuffer)))
         (editor::region-eval textbuffer p1 p2 :print t))


... but it returns nil, as well as the variable  editor::*last- 
evaluate-result*

Does anyone knows how to find this last result ?

Many thanks,

Jean


Re: last evaluated result..

On Tue, Mar 18, 2008 at 02:56:25PM +0100, Jean Bresson wrote:
> I would like to evaluate the contents of a text buffer that I
> created (editor::make-buffer) independently from an editor pane, and
> to get the last evaluated result.
> 
> The following code evaluates the contents of the buffer :
> 
> (editor::with-point ((p1 (editor::buffers-start textbuffer))
>                      (p2 (editor::buffers-end textbuffer)))
>    (editor::region-eval textbuffer p1 p2 :print t))
> 
> .. but it returns nil, as well as the variable editor::*last-
> evaluate-result*
> 
> Does anyone knows how to find this last result ?

Don't have time to play with this just at the moment, but one thing
that might work is: make a string out of the buffer, wrap a (PROGN
....) around it, read-from-string, and eval.  Just a thought.

-- L


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