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? Commented Nov 3, 2016 at 17:10
  • @sds whoops typo, I fixed it, thanks for pointing it out :) Commented 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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.