Hello, when trying to insert a node using node.insert_before, and if <current> is equal to <head> (to make <new> the new head), the following error is generated: Attempt to node.insert_before() a non-existing node The node I want to insert exists, as well as <head> and <current>. If I manually special-case the code, just like Heiko Oberdiek does in his luacolor package, everything works perfectly. Is this a bug? A feature? I'm using the svn trunk from last friday. Jonathan
Jonathan Sauer wrote:
Hello,
when trying to insert a node using node.insert_before, and if <current> is equal to <head> (to make <new> the new head), the following error is generated:
Attempt to node.insert_before() a non-existing node
The node I want to insert exists, as well as <head> and <current>. If I manually special-case the code, just like Heiko Oberdiek does in his luacolor package, everything works perfectly.
Is this a bug? A feature? I'm using the svn trunk from last friday.
there have been problems with the insertion helpers, so maybe something surfaced again; anyhow, the latest version has other problems so best wait till there is an update, since one never know what interferes. (I use a previous version). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
Jonathan Sauer wrote:
Hello,
when trying to insert a node using node.insert_before, and if <current> is equal to <head> (to make <new> the new head), the following error is generated:
Attempt to node.insert_before() a non-existing node
The node I want to insert exists, as well as <head> and <current>. If I manually special-case the code, just like Heiko Oberdiek does in his luacolor package, everything works perfectly.
Is this a bug? A feature? I'm using the svn trunk from last friday.
It's an oversight, I will fix it in the next release.
there have been problems with the insertion helpers, so maybe something surfaced again; anyhow, the latest version has other problems so best wait till there is an update, since one never know what interferes. (I use a previous version).
Hans means TRUNK has problems. 0.25.3 was fine. Best wishes, Taco
Hello,
when trying to insert a node using node.insert_before, and if
<current>
is equal to <head> (to make <new> the new head), the following error is generated:
Attempt to node.insert_before() a non-existing node
The node I want to insert exists, as well as <head> and <current>. If I manually special-case the code, just like Heiko Oberdiek does in his luacolor package, everything works perfectly.
Is this a bug? A feature? I'm using the svn trunk from last friday.
It's an oversight, I will fix it in the next release.
Great! Just in case, I have prepared the following example (I do not claim that it is the shortest possible ;-): %&luatex \directlua0{\unexpanded{ head = node.new(0) before = node.new(0) after = node.new(0) head = node.insert_after(head, head, after) head = node.insert_before(head, head, before) }} \bye Jonathan
participants (3)
-
Hans Hagen
-
Jonathan Sauer
-
Taco Hoekwater