Do you know ghouls from goblins and ghosts?
Latin, literally "for this (specific purpose)."
Contrived purely for the purpose in hand rather than planned carefully in advance. E.g. "We didn't know what to do about the sausage rolls, so we set up an ad-hoc committee".