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

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

bug#23675: 30.0.50: make count-lines optionally ignore invisible lines


From: J.P.
Subject: bug#23675: 30.0.50: make count-lines optionally ignore invisible lines
Date: Sun, 06 Aug 2023 06:03:38 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: emacs-erc@gnu.org, rsw@gnu.org
>> From: "J.P." <jp@neverwas.me>
>> Date: Fri, 04 Aug 2023 17:35:27 -0700
>> 
>> Perhaps I'm not understanding how the `ignore-invisible-lines' parameter
>> for `count-lines' is supposed to work, but it doesn't seem to make the
>> function consider `invisible' text properties that have lists as values.
>> I bring this up because ERC will likely be needing a line-counting
>> function that's list-aware, at least in the manner shown in the attached
>> tests. The change to `count-lines' accompanying these tests was merely
>> lifted from `forward-visible-line' to make them pass, but it's quite
>> possibly flawed and/or incomplete. If a proper solution ever emerges to
>> address this, hopefully it'll come at the hands of someone better
>> informed than I in the ways of Emacs invisibility. In the meantime
>> (2023), ERC will likely be doing its own subpar rendition unless someone
>> takes up the challenge for 30.1 (and Compat agrees to adopt it). Thanks.
>
> This is OK for master, but please don't use cl-incf in simple.el, as
> there's no real need to do so there.

Actually, it's looking like `count-screen-lines' will suit ERC's needs.
Thanks anyway for taking a peek, and apologies for the noise.





reply via email to

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