Essentially, is there a function in Emacs like

text-currently-displayed-in-window --> returns two integer

The integers represents the position interval that is currently being displayed on screen in the selected window.

1 Answer 1


You can use window-start and window-end to get the buffer positions of the portion that is visible in a window.

  • Thank you! That was exactly it.
    – Alan
    Jan 20, 2022 at 14:44

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.