Questions tagged [lines]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
1answer
27 views

How to get line number for a given buffer position in a performant way?

I have list of buffer positions and I want to get the numbers of the lines at those positions. Is there a better way to do that then using with-current-buffer, goto-point and get-thing-at-point 'line? ...
3
votes
3answers
135 views

Delete duplicate lines, with partial match

Sample text: This is first line.a This is over_second line. This is over_fourth line. This is third line. This is over_fourth delete it. This is over_fourth and one more. This is over_second with ...
0
votes
1answer
37 views

Is arbitrary buffer position at the beginning of a line?

What's the simplest way to check whether a given point value p is at the beginning of some line or not? Is there anything simpler than (save-excursion (goto-char p) (= p (point-at-bol))) or (member (...
3
votes
1answer
2k views

How to count the number of lines in the region?

Is there a command similar to count-words-region to count the total number of lines of a selected region?