Is there a convenient way to count the number of lines between two points?

While I could search for \n in a loop and limit it to one of the points, this seems like an overly verbose way of doing it.


There is a function to count lines.

(count-lines beg end)

Found this soon after posting.

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.