From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/56379 Path: news.gmane.org!not-for-mail From: Yanrui Li Newsgroups: gmane.comp.tex.context Subject: Re: Can not register the callback functions in MkIV Date: Fri, 19 Feb 2010 20:21:31 +0800 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1998470674==" X-Trace: ger.gmane.org 1266582126 14763 80.91.229.12 (19 Feb 2010 12:22:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Feb 2010 12:22:06 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 19 13:22:01 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NiRrt-0003O8-Dv for gctc-ntg-context-518@m.gmane.org; Fri, 19 Feb 2010 13:22:01 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2BFB0C9CD5; Fri, 19 Feb 2010 13:21:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id M0-Z2Z0y6G2z; Fri, 19 Feb 2010 13:21:55 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9FECDC9CBA; Fri, 19 Feb 2010 13:21:55 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6FB49C9CBA for ; Fri, 19 Feb 2010 13:21:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Nl4yas4QEc-W for ; Fri, 19 Feb 2010 13:21:33 +0100 (CET) Original-Received: from mail-px0-f176.google.com (mail-px0-f176.google.com [209.85.216.176]) by balder.ntg.nl (Postfix) with ESMTP id DBBD9C9CB7 for ; Fri, 19 Feb 2010 13:21:32 +0100 (CET) Original-Received: by pxi6 with SMTP id 6so2052pxi.14 for ; Fri, 19 Feb 2010 04:21:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=ZVBLiNSR6+9Y0gpdmormunfCd/54kHtDU5TMf9OkRVU=; b=DNu3Z0AOhMqRlHnV64ikQ58BnjEvJ7+zv48Mbv4ZmHAQUUx0gNsuDDu2QcqyxO4xzv QPNA7jPT5T9qRSVdZZu0Dlk7kvBDOrAGQpjapSqhGqmUtbZugLfvkbKna7xuyUhJpKlR J/o+wH0A50ShXJ89FWVrN7my6bOB/hvyFyY6g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=EOFIjxUYPOKOWLl6zI3yu+A0BZYcBzXnycl1P/mxTS59P35J3dFlothsZgXSJVfkov AvPVCuCD/MKN3r1ZQ8FweQqL6Rc3Tjl157/WbOUZBZP2D4VgN0QiDY1JFKU41qTbJUBY K+u5EiS9W6YT7AvrSLNjpjKPlvv1dZO24BO34= Original-Received: by 10.114.189.10 with SMTP id m10mr7471690waf.94.1266582091162; Fri, 19 Feb 2010 04:21:31 -0800 (PST) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:56379 Archived-At: --===============1998470674== Content-Type: multipart/alternative; boundary=0016e64dbba89f6758047ff31fac --0016e64dbba89f6758047ff31fac Content-Type: text/plain; charset=UTF-8 2010/2/19 Yanrui Li > Hi, > > Now it seems that we have not allowed to register the callback functions > since beta 2010.02.18. > > For example: > > \startluacode > > local old_pre_linebreak_filter = callback.find ('pre_linebreak_filter') > > local function my_pre_linebreak_filter (head, groupcode) > if old_pre_linebreak_filter then > old_pre_linebreak_filter (head, groupcode) > end > print ('This is my pre_linebreak_callback') > return true > end > > callback.register ('pre_linebreak_filter', my_pre_linebreak_filter) > > \stopluacode > > \starttext > > This is just a test! > > \stoptext > > The 'my_pre_linebreak_filter' function can not work again. Is this a bug? > > -- > Best regards, > > Li Yanrui > I see. The 'pre_linebreak_filter' callback function is frozen. -- Best regards, Li Yanrui --0016e64dbba89f6758047ff31fac Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

2010/2/19 Yanrui Li &l= t;liyanrui.m2@gmail.com>
Hi,

Now it seems that we have not allowed to register the callback f= unctions since beta 2010.02.18.

For example:

\startluacode
local old_pre_linebreak_filter =3D callback.find ('pre_linebreak_f= ilter')

local function my_pre_linebreak_filter (head, groupcode)
=C2=A0=C2= =A0=C2=A0 if old_pre_linebreak_filter then
=C2=A0=C2=A0=C2=A0 old_pre_l= inebreak_filter (head, groupcode)
=C2=A0=C2=A0=C2=A0 end
=C2=A0=C2=A0= =C2=A0 print ('This is my pre_linebreak_callback')
=C2=A0=C2=A0=C2=A0 return true
end

callback.register ('pre_li= nebreak_filter', my_pre_linebreak_filter)

\stopluacode

\s= tarttext

This is just a test!

\stoptext

The 'my_pr= e_linebreak_filter' function can not work again. Is this a bug?

--
Best regards,

Li Yanrui

I see. The 'pre_linebreak_filter' cal= lback function is frozen.

--
Best regards,
Li Yanrui
--0016e64dbba89f6758047ff31fac-- --===============1998470674== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1998470674==--