use buffer_set_head