Halogen-bonding-induced hydrogen transfer to C═N bond with Hantzsch ester.