From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Linking Emacs with libxml2 Date: Thu, 09 Sep 2010 19:00:09 +0200 Message-ID: References: <8A20526E-44B3-4434-9D40-54A36F976CD6@mit.edu> <4C85892B.5080105@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1284051716 5662 80.91.229.12 (9 Sep 2010 17:01:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Sep 2010 17:01:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 09 19:01:55 2010 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.69) (envelope-from ) id 1OtkVW-0001eT-Ca for ged-emacs-devel@m.gmane.org; Thu, 09 Sep 2010 19:01:54 +0200 Original-Received: from localhost ([127.0.0.1]:36632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtkVV-0002iU-Un for ged-emacs-devel@m.gmane.org; Thu, 09 Sep 2010 13:01:53 -0400 Original-Received: from [140.186.70.92] (port=54630 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtkVQ-0002hP-9A for emacs-devel@gnu.org; Thu, 09 Sep 2010 13:01:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtkVP-00078C-6e for emacs-devel@gnu.org; Thu, 09 Sep 2010 13:01:48 -0400 Original-Received: from impaqm5.telefonica.net ([213.4.138.5]:47324) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtkVP-00077e-10 for emacs-devel@gnu.org; Thu, 09 Sep 2010 13:01:47 -0400 Original-Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm5.telefonica.net with bizsmtp id 4WUU1f00K2h2L9m3Rh0B3e; Thu, 09 Sep 2010 19:00:11 +0200 Original-Received: from ceviche.home ([83.61.36.43]) by IMPmailhost3.adm.correo with BIZ IMP id 4h091f00T0vquEj1jh0Aim; Thu, 09 Sep 2010 19:00:11 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id A9864660D2; Thu, 9 Sep 2010 19:00:09 +0200 (CEST) In-Reply-To: (Andreas Schwab's message of "Wed, 08 Sep 2010 23:51:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.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:129826 Archived-At: >> + string = make_buffer_string (BEGV, Z, 0); > Z is the real buffer end, you want ZV. Of course, even better would be passing the buffer text as 2 byte arrays without copying it into a string. If you have to construct an intermediate string, then you might as well expose a parse-html-string function and let the Elisp code do a buffer-string call, which will provide a lot more flexibility. Stefan