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: Stefan Monnier
Subject: Re: C-code : printing into a buffer
Date: Mon, 01 Jun 2009 10:31:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

> 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.

If you want to `printf' to a buffer, what I recommend is to use a trick like:
- create a dummy Emacs process (start-process "lstream" <buffer> "cat").
- fprintf (XPROCESS (proc)->outfd, "toto %d titi", ...);


        Stefan




reply via email to

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