help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Most efficient way of getting position of visual-line?


From: Emanuel Berg
Subject: Re: Most efficient way of getting position of visual-line?
Date: Tue, 06 Jul 2021 11:16:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Thomas F. K. Jorna wrote:

> (let ((vl-list '(0))
>       (n 10))
>   (save-excursion
>     (goto-line (point-min))
>     (dotimes (line (/ (count-screen-lines) n))
>       (vertical-motion n)
>       (setq vl-list (append vl-list (list (point))))))
>
> Perhaps not the most elegant written [...]

Ah, good enough for government work...

But you can replace "line" with `_' otherwise the
byte-compiler will complain it isn't used...

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]