From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "A. Soare" Newsgroups: gmane.emacs.devel Subject: Re: C-code : printing into a buffer Date: Fri, 29 May 2009 11:13:36 +0200 (CEST) Message-ID: <21709273.2012831243588416702.JavaMail.www@wwinf4622> Reply-To: alinsoar@voila.fr NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1243588532 10830 80.91.229.12 (29 May 2009 09:15:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 May 2009 09:15:32 +0000 (UTC) Cc: "Emacs Dev \[emacs-devel\]" To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 29 11:15:27 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M9yBS-0007Ld-Oh for ged-emacs-devel@m.gmane.org; Fri, 29 May 2009 11:15:27 +0200 Original-Received: from localhost ([127.0.0.1]:58556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M9yBR-0005bl-Dm for ged-emacs-devel@m.gmane.org; Fri, 29 May 2009 05:15:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M9y9n-0005Fa-EA for emacs-devel@gnu.org; Fri, 29 May 2009 05:13:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M9y9i-0005D0-Dv for emacs-devel@gnu.org; Fri, 29 May 2009 05:13:42 -0400 Original-Received: from [199.232.76.173] (port=55987 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M9y9i-0005Ct-99 for emacs-devel@gnu.org; Fri, 29 May 2009 05:13:38 -0400 Original-Received: from smtp3.voila.fr ([193.252.22.173]:61217 helo=smtp1.voila.fr) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M9y9h-0003Od-Td for emacs-devel@gnu.org; Fri, 29 May 2009 05:13:38 -0400 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf4922.voila.fr (SMTP Server) with ESMTP id BC8D870000A6; Fri, 29 May 2009 11:13:36 +0200 (CEST) Original-Received: from wwinf4622 (wwinf4622 [10.232.13.46]) by mwinf4922.voila.fr (SMTP Server) with ESMTP id AE8707000084; Fri, 29 May 2009 11:13:36 +0200 (CEST) X-ME-UUID: 20090529091336714.AE8707000084@mwinf4922.voila.fr X-Originating-IP: [91.201.80.240] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:111186 Archived-At: IStreams, as far as I see, create a pipe, such that the lisp functions insi= de are redirected to a new-created stream. But the lisp functions print mes= sages via a lisp function like (message), and this function know the pipe w= here to print. If you call printf from the C-level of the emacs-lisp evaluator, printf doe= s not know nothing about lisp level. So the problem would be beyond the lis= p evaluator. The problem is about the linux system... and from the lisp cod= e to redirect the printf output temporary to an emacs buf. The Istreams concept is also explained in SICP. Nothing unusual. Alin. >=20 > A. Soare writes: >=20 > > > > 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. >=20 > 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). >=20 > 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. >=20 >=20 >=20 ____________________________________________________ D=C3=A9couvrez le nouveau Voila.fr et apprenez =C3=A0 ma=C3=AEtriser le web= 2.0=C2=A0sur http://voila.fr