From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "J.P." Newsgroups: gmane.emacs.bugs Subject: bug#23675: 30.0.50: make count-lines optionally ignore invisible lines Date: Sun, 06 Aug 2023 06:03:38 -0700 Message-ID: <87350wtj9x.fsf__31433.4686425113$1691327064$gmane$org@neverwas.me> References: <87ttteuy0g.fsf@neverwas.me> <83v8dut2x1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12747"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-erc@gnu.org, Stefan Monnier , 23675@debbugs.gnu.org, rsw@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 06 15:04:17 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qSdQe-00034L-8t for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Aug 2023 15:04:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSdQR-0007jV-R5; Sun, 06 Aug 2023 09:04:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSdQQ-0007is-Nj for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2023 09:04:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qSdQQ-0007T8-Fy for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2023 09:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qSdQQ-0006ms-2N for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2023 09:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Aug 2023 13:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23675 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed Original-Received: via spool by 23675-submit@debbugs.gnu.org id=B23675.169132703126072 (code B ref 23675); Sun, 06 Aug 2023 13:04:02 +0000 Original-Received: (at 23675) by debbugs.gnu.org; 6 Aug 2023 13:03:51 +0000 Original-Received: from localhost ([127.0.0.1]:58771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSdQF-0006mS-02 for submit@debbugs.gnu.org; Sun, 06 Aug 2023 09:03:51 -0400 Original-Received: from mail-108-mta9.mxroute.com ([136.175.108.9]:36235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSdQ9-0006mF-Us for 23675@debbugs.gnu.org; Sun, 06 Aug 2023 09:03:49 -0400 Original-Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta9.mxroute.com (ZoneMTA) with ESMTPSA id 189caf2466b00023b6.001 for <23675@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 06 Aug 2023 13:03:42 +0000 X-Zone-Loop: bf995b26e346d5a159a3c3315f811bbfb894d86b7228 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=7YxMA1R+bf29ury7mqwGIkVrzwuGNirZWBPli6jDI2k=; b=f0hM3sVSCdjij2OkdaddJwN6BD JKwF9g0zEeWi5xtN7sixui9KcLcOAEuiWyYt6Ik9FcGbabobECBZTgTPDzYSAaEGq9UD3u3il4JXd poLwIJCvSp7LQErDQVhAdYa3UqLKQ2OM1lqw5vZyT/RYql6Xs3G7+h/T9yIHzBPmcJGJYbg4Dfb0x LNbBJCs2GfLixW3RQV4YNdQTioZT8Vlyxdm5Ryaxrb/vS71o0QwTjexXdT52gP0MZqE9aww4Qs5wt h3CBMZ9PDIhDIBKQpzqTX6Kx20Nt/ilMbTIrIco9h3UERDhA0zclIkZ0oWhWfKByLhC7wFiBAFYeL 4fwIXS8w==; In-Reply-To: <83v8dut2x1.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 05 Aug 2023 09:32:26 +0300") X-Authenticated-Id: masked@neverwas.me X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266852 Archived-At: Eli Zaretskii writes: >> Cc: emacs-erc@gnu.org, rsw@gnu.org >> From: "J.P." >> 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.