Function to execute CoffeScript code in a buffer or region