Automatically switch back to headers buffer after mu4e-headers-view-message?

27 views
Skip to first unread message

Hippo Man

unread,
Nov 24, 2016, 1:02:15 PM11/24/16
to mu-discuss
I'm trying to write a function similar to `mu4e-headers-view-message' which will select the message but then switch back to the headers buffer. This way, I could "preview" messages while scrolling through the headers buffer.

However, I can't figure out how to automatically switch back to the headers buffer if I perform the operations from `mu4e-headers-view-message'. There seems to be some sort of race condition, and I have to wait a little while before `select-window' will send me back to the headers buffer.

Does anyone know how I can accomplish what I want to do?

Thank you!

Message has been deleted

Hippo Man

unread,
Nov 24, 2016, 1:17:42 PM11/24/16
to mu-discuss
Well, I now realize that I have most of what I want with `mu4e-view-headers-next'. However, it will only "preview" the messages if I have already opened up one message in the view window and switched back to the headers buffer.

I still want to be able to do the initial step automatically, i.e., to view the current message and switch back automatically to the headers buffer.

Any ideas of how I can do this?

Thank you.

Hippo Man

unread,
Nov 24, 2016, 2:10:26 PM11/24/16
to mu-discuss
OK. I figured it out.

I just need to add the following to mu4e-view-mode-hook ...

(select-window (get-buffer-window mu4e~headers-buffer-name))


Reply all
Reply to author
Forward
0 new messages