Ok, I made it work. But three things.
[1]
I had to alter the code because for reason unknown no unit was retrieved when using
getCreatureAtPos(getxyz)
and yes, the cursor was on a dwarf, and he was the unique entity of the tile.
So I altered it with
unit=getSelectedUnit()
using V to select a dwarf, it worked.
Do you know why there was a problem?
[2]
Second, using the command is quite convoluted. For people wanting to use it and want a step by step, you have to activate DFusion by typing DFusion in the DFHack console. Then you are presented with a menu, the new command is in tools, so your type (2). Then you have a list of available commands, warp is (6) for me, so I type (6). And then I can operate the command... Once the command activates, I'm back to the first menu...
Any possibility to have a less convoluted way of using the command, ideally like just typing 'warp' in DFHack, or at worse when DFusion is active?
In any case, big thanks to you, this will change my life... Now if there is a stuck dorf, I can unstuck him.
[3]
About the glitch, a data not cleared on occupancy, is the glitch on the source tile or the target tile? If on the target tile, I can always use the same destination tile, knowing the tile is now 'screwed', this will be my 'dump tile'... If on the source, this can be more problematic indeed.