emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] access a let* value whe ndefining a function?


From: Matt Price
Subject: [O] access a let* value whe ndefining a function?
Date: Tue, 23 Oct 2018 13:40:19 -0400

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]