Updated with fix for damp walls (didn't check the up z level) also made an alternative designation mode. file with _exp at the end is with that mode. Highly experimental should work more like mouse designation, but could crash DF.
Ah. sorry I didn't realise that there was a distinction between wet and damp walls. I reran my test with a copper vein on the same level as the water in an underground river and it worked perfectly.
I've tried the new experimental mode and on the few tests I've performed it worked almost perfectly. All designated tiles were mined without odd stops. There was one issue however. It appears that when the end of the vein is reached some tiles are not revealed correctly.
---- - or + Revealed natural wall
-..---x . Dug out section
-....+X X or x Unrevealed natural wall
----..x
--.+X
-...X
---..X
-....X
-....-x
I've identified that this is happening at the boundary between the 48x48 embark tile. All those xs and Xs are on the 49th tile from the map edge.
If I then designate the natural walls marked + to be dug, then the unrevealed X tiles are revealed although the diagonal x tiles are not still not revealed, although they can be designated for digging.
I haven't tried the new regular file as yet.
It might be an idea to include a config file or config settings within the console window so that checking for damp or wet tiles can be toggled.
I can see situations where I would want wet tiles not dug but to have damp tiles dug and others where I want both not dug.