From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#59919: 28.1.50; "kill-matching-lines" takes forever Date: Fri, 09 Dec 2022 09:23:38 +0000 Message-ID: <574c1ceba8a3945384ac@heytings.org> References: <87sfhpm07t.fsf@u018594.mail-host-address-is-not-set> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3434"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59919@debbugs.gnu.org To: "a.soroa" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 09 10:24:26 2022 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 1p3ZcI-0000jq-BD for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Dec 2022 10:24:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3Zc5-00017y-MX; Fri, 09 Dec 2022 04:24:14 -0500 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 1p3Zbv-00017e-PC for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2022 04:24:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p3Zbv-0007AT-B3 for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2022 04:24:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3Zbu-00059n-5q for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2022 04:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Dec 2022 09:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59919 X-GNU-PR-Package: emacs Original-Received: via spool by 59919-submit@debbugs.gnu.org id=B59919.167057782319810 (code B ref 59919); Fri, 09 Dec 2022 09:24:02 +0000 Original-Received: (at 59919) by debbugs.gnu.org; 9 Dec 2022 09:23:43 +0000 Original-Received: from localhost ([127.0.0.1]:34822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Zbb-00059S-9D for submit@debbugs.gnu.org; Fri, 09 Dec 2022 04:23:43 -0500 Original-Received: from heytings.org ([95.142.160.155]:50104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3ZbY-00059M-HJ for 59919@debbugs.gnu.org; Fri, 09 Dec 2022 04:23:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1670577819; bh=J8abx+IAXHs5EP/Bba1BoxXAAmXyvVaYK+adG42WF1M=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=FBlpkdIeSiQGMJane69wNFEpT7rjly/7icX4UHSHy0vH+DNDsvnu63Z8gllgFYwkQ p+5OEwKCM7A2MYSPJPFsFoBiPZPTboJ+6B0g7d8nBftMoFrCc2aIbaRtgrMN8+a1FM OGzqth7O1kQJgxc7OjcHe8frSsStITAmqVJLtkiKuRwbpg/75b9jkhrTzAF5bwANmB e9zQP7HOX0IMLazjTyOWNploZTOcTObbdn1n4eGGDCbIzHUR0ltRol+mTlelMG21pJ zr7JYZpq6lKmy1CQEhvVoO4hKQmxasATtAPs/dzt4mDjCjbypQjpD5jzVu9vJ9H52r LkFC/5kJ7ZNNw== In-Reply-To: <87sfhpm07t.fsf@u018594.mail-host-address-is-not-set> 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:250369 Archived-At: > > The kill-matching-lines function takes far too long. Trying to kill > lines matching the "ssh" regexp in the attached file takes minutes to > complete. The actual file I'm working on is much bigger, and emacs just > hangs. Reciple to reproduce: > > $ bunzip2 log.txt.bz2 > $ emacs -Q log.txt > M-x kill-matching-lines > Kill lines containing match for regexp: ssh > Are you sure you actually want to _kill_ ("cut" in modern parlance) those lines? In the file you attach, all 10000 lines match "ssh", so it means that Emacs "cuts" each of those lines one by one, which of course takes (quite) some time. If you use a regexp that does not match all lines, say "109.106.244.80", the effect is almost instantaneous. Note that there is also a command "flush-lines", is that not the one you actually need here?