Some variants of NetHack have an autoexplore command, bound to v by default, that automatically explores until it finds something interesting or is interrupted (by a monster, trap, or similar effect). Known variants that include this feature are AceHack, DynaHack, FIQhack, Fourk, NetHack4, and UnNetHack.
In Fourk and FIQhack, travel (and thus automatic exploration) is not halted by floor engravings or items that the player has already seen.
In UnNetHack, sessile monsters don't interrupt autoexplore.
Variants that haven't been updated recently (Dynahack, Nethack4, Acehack) tend to exhibit buggy behavior when a level has been significantly affected by digging. Common reasons include a rock mole that ran amok, or a player who hunted for a vault with a pickaxe and didn't know where to look. In such areas, Autoexplore and Travel may veer off-course and send you in an unexpected direction. (This can also happen with travel in general, especially in 3.4.3, so the problem may lie outside the scope of autoexplore.)