6

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?

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

1 Answer 1

5

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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