Hey, I guess this is OT.

I'm trying to advice org-mime-org-buffer-htmlize so that it returns to the org buffer when its done. I want to do something like this:

(let ((thisbuffer (current-buffer))
 (advice-add
     'mu4e-sent-handler
     :after (lambda (docid props)
              (switch-to-buffer thisbuffer)
              (advice-remove 'mu4e-sent-handler 'om-sent-advice)
              ) '((name . 'om-sent-advice)))

but by the time the hook is run, the (let) has long since lapsed, and thisbuffer is no longer defined. Can I force evaluation of the variable during definition?

Thanks,
m