From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/56376 Path: news.gmane.org!not-for-mail From: Yanrui Li Newsgroups: gmane.comp.tex.context Subject: Can not register the callback functions in MkIV Date: Fri, 19 Feb 2010 15:04:49 +0800 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1303121629==" X-Trace: ger.gmane.org 1266563122 23134 80.91.229.12 (19 Feb 2010 07:05:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Feb 2010 07:05:22 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 19 08:05:20 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 1NiMvP-0001Uy-2e for gctc-ntg-context-518@m.gmane.org; Fri, 19 Feb 2010 08:05:19 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7D66EC9CAB; Fri, 19 Feb 2010 08:05:05 +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 RJFzmKKfQ5-S; Fri, 19 Feb 2010 08:05:05 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3A1BEC9CBA; Fri, 19 Feb 2010 08:04:57 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EB940C9CBA for ; Fri, 19 Feb 2010 08:04:55 +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 P7C03SKxQ02a for ; Fri, 19 Feb 2010 08:04:50 +0100 (CET) Original-Received: from mail-pw0-f41.google.com (mail-pw0-f41.google.com [209.85.160.41]) by balder.ntg.nl (Postfix) with ESMTP id 6C7F9C9CB7 for ; Fri, 19 Feb 2010 08:04:50 +0100 (CET) Original-Received: by pwj7 with SMTP id 7so1595852pwj.14 for ; Thu, 18 Feb 2010 23:04:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=GtD+Y9iiBHZlgfJx3BrebqmFCQb4YdHxm5h7eBRQHc4=; b=VGfrZzZZMv/5YmHpCT7J+A/mWabtNCIAUYd45lh76WvrX4LDOVw1+neGT/3v8t6mXN TlXoLtw7QC+VEKid4la2e0o13CFtMlnp/UuxP0mtsFsRrBi5WPnW+6vThBCtFom+r9a8 wdzYWZwcCXsM064HGfTuY+yMoPnkInRorr+Yg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=OU0aP1D78qELufyXlfpRThhy1fYldkDvC2gXzc/C0aFS4DFB5FM4H7Ozpt/MsbQ8cU 0FwLcS8liHpfDWaUh52biSsvreSfZkdaIbBEjtiE55+bF0DBJDhuClYbJP0AnD8sjzWa C0FyUq+5meivlNw8U6UYEaBzyOGApBEkUktK4= Original-Received: by 10.115.24.12 with SMTP id b12mr7289004waj.118.1266563089236; Thu, 18 Feb 2010 23:04:49 -0800 (PST) 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:56376 Archived-At: --===============1303121629== Content-Type: multipart/alternative; boundary=0016367b6c3a05050f047feeb3d2 --0016367b6c3a05050f047feeb3d2 Content-Type: text/plain; charset=UTF-8 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 --0016367b6c3a05050f047feeb3d2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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
--0016367b6c3a05050f047feeb3d2-- --===============1303121629== 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 ___________________________________________________________________________________ --===============1303121629==--