2

I'd like to have the following code in my library:

(when (not (buffer-visible-p es-results-buffer))
  (delete-other-windows)
  (view-buffer-other-window es-results-buffer))

However, I haven't been able to find a function for buffer-visible-p. Is there such a function?

  • results-buffer or es-results-buffer? – sds Nov 3 '16 at 17:10
  • @sds whoops typo, I fixed it, thanks for pointing it out :) – Lee H Nov 3 '16 at 17:12
3

You are looking for get-buffer-window, or you can iterate over the list of all visible windows yourself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.