fix stack_pop and auto_action

stack_pop would edit the file N instead of (re)opening buffer N
auto_action would not open the file if the match field was blank
new stack_next and stack_prev functions