From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/116488 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rik Kabel via ntg-context Newsgroups: gmane.comp.tex.context Subject: \autoinsertedspace fails following \nbsp under LMTX Date: Thu, 17 Nov 2022 00:43:04 -0500 Message-ID: <9f078782-3709-6296-3798-dab13a7208f9@rik.users.panix.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7872816655270164730==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5374"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.4.0 Cc: Rik Kabel To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 17 06:43:54 2022 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovXgn-00019Q-PP for gctc-ntg-context-518@m.gmane-mx.org; Thu, 17 Nov 2022 06:43:53 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 966362A4C23; Thu, 17 Nov 2022 06:43:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aiGzBUmcoPHw; Thu, 17 Nov 2022 06:43:14 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 205512A4A9A; Thu, 17 Nov 2022 06:43:14 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 75FE22A4960 for ; Thu, 17 Nov 2022 06:43:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cqfQ6OS0r8zc for ; Thu, 17 Nov 2022 06:43:11 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=166.84.1.89; helo=mailbackend.panix.com; envelope-from=context@rik.users.panix.com; receiver= Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 73DAB2A4954 for ; Thu, 17 Nov 2022 06:43:11 +0100 (CET) Original-Received: from [192.168.1.106] (cpe-69-204-136-231.nycap.res.rr.com [69.204.136.231]) by mailbackend.panix.com (Postfix) with ESMTPSA id 4NCTNC5880z4HNJ for ; Thu, 17 Nov 2022 00:43:07 -0500 (EST) Content-Language: en-US X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:116488 Archived-At: This is a multi-part message in MIME format. --===============7872816655270164730== Content-Type: multipart/alternative; boundary="------------h07kfbgmATDjrYrPuAASEr5i" Content-Language: en-US This is a multi-part message in MIME format. --------------h07kfbgmATDjrYrPuAASEr5i Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit ConTeXt  ver: 2022.11.14 22:58 LMTX on W11 x64 I have been testing the recently added \autoinsertedspace, and I found an odd failure. The following compiles with \nbsp commented as shown, but once that line is active, the compilation fails: lua error:         callback error: ...MTX/tex/texmf-context/tex/context/base/mkxl/font-hsh.lmt:151: table index is nil It fails differently in MkIV (but it is nice to see that the new command has been backported): luatex warning  > node filter: error: ...MTX/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:380: Attempt to node.direct.remove() a non-existing node %<------------------------------------------------------ \starttexdefinition unexpanded New   \dodoublegroupempty   \doNew \stoptexdefinition \starttexdefinition doNew #1#2    \removeunwantedspaces    \ (#1|–|#2)    \autoinsertedspace \stoptexdefinition \starttext   ABC 0\New{123}{456} 789   ABC % \nbsp   0\New{123}{456} 789 \stoptext Am I doing something wrong here? \nbsp is needed to prevent improper line breaks. -- Rik --------------h07kfbgmATDjrYrPuAASEr5i Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

ConTeXt  ver: 2022.11.14 22:58 LMTX on W11 x64

I have been testing the recently added \autoinsertedspace, and I found an odd failure.

The following compiles with \nbsp commented as shown, but once that line is active, the compilation fails:

lua error:
        callback error: ...MTX/tex/texmf-context/tex/context/base/mkxl/font-hsh.lmt:151: table index is nil

It fails differently in MkIV (but it is nice to see that the new command has been backported):

luatex warning  > node filter: error: ...MTX/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:380: Attempt to node.direct.remove() a non-existing node

%<------------------------------------------------------

\starttexdefinition unexpanded New
  \dodoublegroupempty
  \doNew
\stoptexdefinition
\starttexdefinition doNew #1#2
   \removeunwantedspaces
   \ (#1|–|#2)
   \autoinsertedspace
\stoptexdefinition

\starttext

  ABC 0\New{123}{456} 789

  ABC
% \nbsp
  0\New{123}{456} 789

\stoptext

Am I doing something wrong here? \nbsp is needed to prevent improper line breaks.

--
Rik

--------------h07kfbgmATDjrYrPuAASEr5i-- --===============7872816655270164730== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cHM6Ly93d3cubnRnLm5sL21haWxtYW4v bGlzdGluZm8vbnRnLWNvbnRleHQKd2VicGFnZSAgOiBodHRwczovL3d3dy5wcmFnbWEtYWRlLm5s IC8gaHR0cDovL2NvbnRleHQuYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHBzOi8vYml0YnVja2V0 Lm9yZy9waGcvY29udGV4dC1taXJyb3IvY29tbWl0cy8Kd2lraSAgICAgOiBodHRwczovL2NvbnRl eHRnYXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============7872816655270164730==--