[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Efficiently getting the line at point
From: |
Nordlöw |
Subject: |
Efficiently getting the line at point |
Date: |
Fri, 18 Sep 2009 07:30:19 -0700 (PDT) |
User-agent: |
G2/1.0 |
How do I efficiently get the current line at a given position?
Is line-number-at-pos() the best candidate?
This function in turn calls count-lines().
Why? --- I thought Emacs had an internal O(1) lookup table for the
positions of line beginnings of a buffer or file.
Thanks in advance,
Per Nordlöw
- Efficiently getting the line at point,
Nordlöw <=