From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#73005: [REGRESSION, BISECTED]: line numbers disappear when pressing `df` in evil-mode Date: Wed, 04 Sep 2024 16:02:27 +0300 Message-ID: References: <378550cb5821f2a459742bb78b960280024ee30a.camel@yandex.ru> <86a5go7o1r.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19942"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.52.4 Cc: 73005@debbugs.gnu.org, da_vid@orange.fr To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 04 15:03:14 2024 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 1slpfE-0004yF-Pi for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Sep 2024 15:03:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slpf5-000740-Fv; Wed, 04 Sep 2024 09:03:04 -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 1slpf1-0006re-Ox for bug-gnu-emacs@gnu.org; Wed, 04 Sep 2024 09:02:59 -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 1slpf1-0007TG-GQ for bug-gnu-emacs@gnu.org; Wed, 04 Sep 2024 09:02:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=ySdnb18bgh5OZw4UXk3frNKH/5O4wWR5GyAunoD7YyI=; b=Z/Jc3K6UTU502Q0TWDEiVOjgPSNcuAitzNw51UcddR8ec5sZVP+6rWtfI2On/EodUv/51GBzDZ7cq52ic6PyagLuczFOZZ4r9OVRy8r5ZxZHRVEqQAu/tuT8AVM/jKsLkDw1kyZmCcXsZUv+sHlttIrmUYJJsNaXtCLEDr98+PdPMiDgGE3JYfDvIwXjYTyJ4dAiQbgXrMJ1cWD2hWYyGeEC/Phr3ZNWS0n4CBvOClUVD5lVUyLy9Tu1c3y9/UqJvySAmscDvQLpwKGoqKV4U1eaBqMtuN25HKmJ5nGbqtMuOla4nMc9REjOUNTZG6bPu6UwBQBAxTLsvvHbodl85Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1slpg3-0000gA-2Z for bug-gnu-emacs@gnu.org; Wed, 04 Sep 2024 09:04:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Sep 2024 13:04:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73005 X-GNU-PR-Package: emacs Original-Received: via spool by 73005-submit@debbugs.gnu.org id=B73005.17254550202574 (code B ref 73005); Wed, 04 Sep 2024 13:04:03 +0000 Original-Received: (at 73005) by debbugs.gnu.org; 4 Sep 2024 13:03:40 +0000 Original-Received: from localhost ([127.0.0.1]:33844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slpfg-0000fR-5g for submit@debbugs.gnu.org; Wed, 04 Sep 2024 09:03:40 -0400 Original-Received: from forward501d.mail.yandex.net ([178.154.239.209]:47946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slpfb-0000f1-2S for 73005@debbugs.gnu.org; Wed, 04 Sep 2024 09:03:37 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-19.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-19.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:3143:0:640:c03:0]) by forward501d.mail.yandex.net (Yandex) with ESMTPS id E7714612EF; Wed, 4 Sep 2024 16:02:28 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-19.klg.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id R2cEwu5Z3a60-9MjlCTaH; Wed, 04 Sep 2024 16:02:28 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1725454948; bh=ySdnb18bgh5OZw4UXk3frNKH/5O4wWR5GyAunoD7YyI=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=v7xGuLH88rNuubmzbblZW7QWRm9bz2UxvyKccR907CyI0Fn0yvYTD7fp5YQyENjCz 4UW44QTcn9J/JbGX5SZVQlcgauUEqVFdjQTj3qzWGKgo2cePEQbnnpen1i/xicpkjS A1Dent2JaHUtXmMJZP4h6YutJDQgt0ihj1kYPaxk= Authentication-Results: mail-nwsmtp-smtp-production-main-19.klg.yp-c.yandex.net; dkim=pass header.i=@yandex.ru In-Reply-To: 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:291198 Archived-At: On Tue, 2024-09-03 at 19:18 +0300, Konstantin Kharlamov wrote: > On Tue, 2024-09-03 at 18:30 +0300, Eli Zaretskii wrote: > > > Cc: da_vid@orange.fr > > > From: Konstantin Kharlamov > > > Date: Tue, 03 Sep 2024 17:46:09 +0300 > > >=20 > > > CCing the commit author. > > >=20 > > > Sorry for using external plugin, but master has two separate > > > unrelated > > > critical regressions (the other one is going via link in *Help* > > > buffer > > > and getting Emacs locked up with 100% CPU and quickly increasing > > > memory > > > usage, which complicates reducing the steps), and since there's a > > > clear > > > commit that introduced the problem I decided to report it as is. > > >=20 > > > # Steps to reproduce > > >=20 > > > 1. Make sure you're in the Emacs repository and > > > `./build/src/emacs` > > > is > > > the built binary > > > 2. Execute `git clone --depth 1 > > > https://github.com/emacs-evil/evil > > > /tmp/evil` > > > 3. Execute `PATH=3D"$(pwd)/build/src/:$PATH" make -C /tmp/evil > > > emacs` > > > (Emacs with Evil loaded will start) > > > 4. Press `n` to refuse running tests > > > 5. Turn line numbers on by evaluating: (setq-default display- > > > line- > > > numbers 'visual) > > > 6. Press `df` > >=20 > > What does "df" do? >=20 > "df" is triggering the action "delete text up to" and it will wait > for > the third key, the symbol to "delete text up to". But for the problem > to appear pressing the third key is not required. >=20 > As a matter of fact, sometimes it gets reproduced by just pressing > "f" > which stands for "go to next symbol" (and it would similarly wait a > keypress to define a symbol to go to), but for some reason it happens > much less compared to pressing "df". >=20 > > =C2=A0 Does it somehow end up calling string-pixel-width? >=20 > It seems it doesn't. I used a `M-x debug-on-entry string-pixel-width` > and then pressed "df" which made line numbers disappear, but debugger > wasn't triggered. >=20 > > IOW, please show how string-pixel-width is related to the above. >=20 > Offhand I don't know. I would reduce steps, but I can't use *Help* > for > reasons mentioned in my 1st email, and I still didn't find a commit > which does not hang upon following *Help* buffer, because 1000 > commits > before dffdbc1f1fd6 Emacs fails to compile with some native- > compilation > errors and `make clean` doesn't help. I presume finding the culprit > for > this problem will take some time. >=20 > I don't know if it's of any help, but upon pressing "df" the caret > turns from a rectangle to a square (half the rectangle size). This is > indicating that Emacs is waiting for the next keypress, perhaps this > indication somehow triggers the problem=E2=80=A6 So FWIW, I'm not really clear how to debug it further.=C2=A0The problem seems to only reproduce interactively. I tried calling manually various functions like `(evil-find-char 1 ?f)`, `(evil-operator-range)`, `(evil-delete 1 3)` but it didn't trigger the problem. In particular, `(evil-operator-range)` is the one that makes caret turn to a square waiting for input, but problem doesn't reproduce like this. However, I found an alternative way to reproduce it, unfortunately still requiring Evil: 1. Press f (it will wait for next character) 2. Press C-g to cancel the action 3. Press M-: Result: line numbers disappear along with minibuffer popping up. Another interesting point: after line numbers disappeared, if I evaluate `display-line-numbers` (i.e. just to see its value), line numbers immediately appear back. ---------- Regarding the unrelated hang, I more or less figured that out. It turned out to be in another plugin, but it didn't look like a plugin bug because usually when ELisp hangs you can stop a loop with C-g or even just quit emacs with ^C or killall, but for some reason occasionally only SIGKILL worked, which made me think it's a hang in C code. But it wasn't.