I want to optionally perform some functions on the data in buffer
*WL:Message* right after I access and view it.
For example, when first viewing a new message in the
*WL:Message* buffer via
wl-summary-enter-handler, I'd like to perform the following logic (pseudo-code) ...
Enter the *WL:Message* buffer IF *WL:Message* buffer contains images THEN Scroll down to the first image Do a (recenter 1) to position this image at the top of the window ENDIF
I know how to write the elisp code to do all of this. The problem is knowing when to issue this code. I haven't been able to find a hook that runs right as the
*WL:Message* buffer is being displayed.
I tried to use advice around various existing wanderlust
wl-message functions, but I haven't found a reliable way to do what I want. Sometimes (seemingly at random), the
wl-message-buffer variable is not set, or that buffer's window is not live (it needs to be a live window in order for
(recenter 1) to work).
Does anyone know of the proper place I can insert my code so that it always reliably runs whenever I first view a new message in the