From: "A. Soare" <alinsoar@voila.fr>
To: "Stephen J. Turnbull" <turnbull@sk.tsukuba.ac.jp>
Cc: "Emacs Dev \[emacs-devel\]" <emacs-devel@gnu.org>
Subject: Re: C-code : printing into a buffer
Date: Fri, 29 May 2009 11:13:36 +0200 (CEST) [thread overview]
Message-ID: <21709273.2012831243588416702.JavaMail.www@wwinf4622> (raw)
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 xemacs-beta@xemacs.org.
>
>
>
____________________________________________________
Découvrez le nouveau Voila.fr et apprenez à maîtriser le web 2.0 sur http://voila.fr
next reply other threads:[~2009-05-29 9:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-29 9:13 A. Soare [this message]
2009-06-01 1:57 ` C-code : printing into a buffer Stephen J. Turnbull
2009-06-01 14:31 ` Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2009-05-29 7:49 A. Soare
2009-05-29 6:43 A. Soare
2009-05-29 7:16 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=21709273.2012831243588416702.JavaMail.www@wwinf4622 \
--to=alinsoar@voila.fr \
--cc=emacs-devel@gnu.org \
--cc=turnbull@sk.tsukuba.ac.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.