From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: ndame Newsgroups: gmane.emacs.bugs Subject: bug#39908: 26.2; flush-lines and keep-lines should say how many lines were flushed Date: Thu, 5 Mar 2020 10:47:10 +0100 (CET) Message-ID: References: <83fteovz7g.fsf@gnu.org> <87wo7zso7f.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7769_68191972.1583401236773" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="84407"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "39908@debbugs.gnu.org" <39908@debbugs.gnu.org> To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 05 10:48:19 2020 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 1j9n75-000Lsu-3p for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Mar 2020 10:48:19 +0100 Original-Received: from localhost ([::1]:45914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9n74-0007VP-3y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Mar 2020 04:48:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35860) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9n6q-0007Ni-BV for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2020 04:48:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9n6p-0005HN-1P for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2020 04:48:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36202) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j9n6o-0005H5-UM for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2020 04:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j9n6o-000410-Sm for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2020 04:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ndame Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Mar 2020 09:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39908 X-GNU-PR-Package: emacs Original-Received: via spool by 39908-submit@debbugs.gnu.org id=B39908.158340163915365 (code B ref 39908); Thu, 05 Mar 2020 09:48:02 +0000 Original-Received: (at 39908) by debbugs.gnu.org; 5 Mar 2020 09:47:19 +0000 Original-Received: from localhost ([127.0.0.1]:42171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9n67-0003zl-IO for submit@debbugs.gnu.org; Thu, 05 Mar 2020 04:47:19 -0500 Original-Received: from fmfe27.onbox.hu ([46.107.16.232]:19668 helo=web-out.onbox.hu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9n65-0003zW-0p for 39908@debbugs.gnu.org; Thu, 05 Mar 2020 04:47:17 -0500 X-fm-smtp-source: yes Original-Received: from localhost (localhost [84.236.63.111]) by web-out.onbox.hu (Postfix) with SMTP id 48Y5WL3ntwz15Lc; Thu, 5 Mar 2020 10:47:10 +0100 (CET) In-Reply-To: <87wo7zso7f.fsf@mail.linkov.net> X-AccountId: 57978162 X-Originating-Ip: 84.236.63.111 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedruddutddgtdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpucfhtffggffotefknfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvkfgjfhfugggtihffsegrtdersgdttddunecuhfhrohhmpehnuggrmhgvuceovghmrggtshhushgvrhesfhhrvggvmhgrihhlrdhhuheqnecukfhppeekgedrvdefiedrieefrdduuddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheppdhinhgvthepkeegrddvfeeirdeifedrudduuddpmhgrihhlfhhrohhmpegvmhgrtghsuhhsvghrsehfrhgvvghmrghilhdrhhhupdhrtghpthhtohepjhhurhhisehlihhnkhhovhdrnhgvth X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" Xref: news.gmane.io gmane.emacs.bugs:176892 Archived-At: ------=_Part_7769_68191972.1583401236773 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =C2=A0 > keep-lines can't say how many lines it removed, because it doesn't know t= he number. > And reimplementing it to count the number of removed lines will make it s= lower. keep-lines has two=C2=A0delete-region calls in two separate cases. Even cou= nting only these deletions and saying "x deletions were performed" is more informative= than saying nothing. It doesn't have to say "number of lines". I guess most users use it to remove whole lines most of the time, so the ma= tch is usually not split across lines, therefore the number of deletions in the= se cases is equal to the number of deleted lines. =C2=A0 ------=_Part_7769_68191972.1583401236773 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit  
> keep-lines can't say how many lines it removed, because it doesn't know the number.
> And reimplementing it to count the number of removed lines will make it slower.

keep-lines has two delete-region calls in two separate cases. Even counting only
these deletions and saying "x deletions were performed" is more informative than
saying nothing. It doesn't have to say "number of lines".

I guess most users use it to remove whole lines most of the time, so the match
is usually not split across lines, therefore the number of deletions in these cases is
equal to the number of deleted lines.

  ------=_Part_7769_68191972.1583401236773--