When I try to get the current active buffer (by saving p_buf_name) in a timer callback, it returns ".command".
This is not helpful because in the timer callback, I sometimes activate a tool window (Output window), but then I want to restore focus to the active buffer that is under edit. So before activating the tool window, I save p_bufname (origBuf = p_bufname), then activate the tool window, then when I call "edit(origBuf)" I end up seeing the .command buffer instead of the real active buffer.