emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C-code : printing into a buffer


From: A. Soare
Subject: Re: C-code : printing into a buffer
Date: Fri, 29 May 2009 11:13:36 +0200 (CEST)

IStreams, as far as I see, create a pipe, such that the lisp functions inside 
are redirected to a new-created stream. But the lisp functions print messages 
via a lisp function like (message), and this function know the pipe where to 
print.

If you call printf from the C-level of the emacs-lisp evaluator, printf does 
not know nothing about lisp level. So the problem would be beyond the lisp 
evaluator. The problem is about the linux system... and from the lisp code to 
redirect the printf output temporary to an emacs buf.

The Istreams concept is also explained in SICP. Nothing unusual.

Alin.








> 
> A. Soare writes:
> 
>  > > > My problem is to define a buffer in emacs such that in the
>  > > > moment when I call this function via a pointer, all its output
>  > > > to be discarged in that buffer, not in the terminal of emacs.
> 
> In XEmacs you could do this fairly straightforwardly with an lstream,
> I think (an lstream is the internal XEmacs primitive used to deal with
> anything that can be thought of as a sequence of bytes or characters).
> 
> I don't think Emacs has a corresponding facility.  If not, and you
> really need this badly, feel free to ask at address@hidden
> 
> 
> 

____________________________________________________

Découvrez le nouveau Voila.fr et apprenez à maîtriser le web 2.0 sur 
http://voila.fr






reply via email to

[Prev in Thread] Current Thread [Next in Thread]