From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Newsgroups: gmane.emacs.bugs Subject: bug#34520: delete-matching-lines should report how many lines it deleted Date: Mon, 18 Feb 2019 08:35:08 +0800 Message-ID: <87o97aq6gz.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="259976"; mail-complaints-to="usenet@blaine.gmane.org" To: 34520@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 18 02:52:16 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvY6Q-0015Ps-9M for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Feb 2019 02:52:14 +0100 Original-Received: from localhost ([127.0.0.1]:49300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvY6P-00053m-Bz for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Feb 2019 20:52:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvY6F-00053X-6A for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 20:52:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvY6E-0000aX-BA for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 20:52:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52603) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gvY6E-0000aM-4W for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 20:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gvY6D-00088b-Vg for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 20:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Feb 2019 01:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34520 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.155045468131201 (code B ref -1); Mon, 18 Feb 2019 01:52:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Feb 2019 01:51:21 +0000 Original-Received: from localhost ([127.0.0.1]:51881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvY5Z-00087B-4Y for submit@debbugs.gnu.org; Sun, 17 Feb 2019 20:51:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvY5W-00086y-Sk for submit@debbugs.gnu.org; Sun, 17 Feb 2019 20:51:19 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:47436) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gvY5R-0000I9-Hu for submit@debbugs.gnu.org; Sun, 17 Feb 2019 20:51:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvY5P-0004zp-SZ for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 20:51:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvY5O-0000HS-7W for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 20:51:11 -0500 Original-Received: from ladybird.maple.relay.mailchannels.net ([23.83.214.98]:22639) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gvY5N-0000Fw-RZ for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 20:51:10 -0500 X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 77B2F5C3C07 for ; Mon, 18 Feb 2019 01:51:05 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a67.g.dreamhost.com (unknown [100.96.36.160]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 18BDD5C3CA8 for ; Mon, 18 Feb 2019 01:51:05 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Original-Received: from pdx1-sub0-mail-a67.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Mon, 18 Feb 2019 01:51:05 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@jidanni.org X-MailChannels-Auth-Id: dreamhost X-Slimy-Occur: 0f8ed5e40d3880b6_1550454665194_729498865 X-MC-Loop-Signature: 1550454665194:61733942 X-MC-Ingress-Time: 1550454665193 Original-Received: from pdx1-sub0-mail-a67.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a67.g.dreamhost.com (Postfix) with ESMTP id B0BC080AB4 for ; Sun, 17 Feb 2019 17:51:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=jidanni.org; bh=oXHAK+YUAF5SZzB1XB Norwrnv3I=; b=jbFDVCg3G64KQQyQk6Zvx69SUhuoL9nyM6nyL/YwBR4ZWFUNFT //KtiPIrzZfQ3+9zJ/3iXH4bfGPPehIY9V0oMBSPMGD/wZl2AxDLD+nf9YEjFyFM Hfyivv6fadmQn+vJBwFjf4FTt5boiYf99zkNtyyIpbtCoU2CWgpXJOqyE= Original-Received: from jidanni.org (114-41-7-45.dynamic-ip.hinet.net [114.41.7.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by pdx1-sub0-mail-a67.g.dreamhost.com (Postfix) with ESMTPSA id 4281E8228D for ; Sun, 17 Feb 2019 17:51:04 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a67 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrudduvddggeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtgfesthekredttddtjeenucfhrhhomhepnjjnnjcuffgrnhculfgrtghosghsohhnuceojhhiuggrnhhnihesjhhiuggrnhhnihdrohhrgheqnecuffhomhgrihhnpegvlhdrihhtnecukfhppeduudegrdeguddrjedrgeehnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehjihgurghnnhhirdhorhhgpdhinhgvthepuddugedrgedurdejrdeghedprhgvthhurhhnqdhprghthheppeeruhhtfhdqkeerueerheeimhfphefnihehhegsveekreepucffrghnucflrggtohgsshhonhcuoehjihgurghnnhhisehjihgurghnnhhirdhorhhgqedpmhgrihhlfhhrohhmpehjihgurghnnhhisehjihgurghnnhhirdhorhhgpdhnrhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155484 Archived-At: delete-matching-lines is an alias for =E2=80=98flush-lines=E2=80=99 in =E2= =80=98replace.el=E2=80=99. It works great... or does it? Can't often tell. That's because well, if there are matching lines off the screen, you won't really know, so you have to go down there to have a look... and well, need eagle eyes often too depending on the pattern and how many similar lines there still are. Got an idea!: Simply keep a count of how many lines were deleted, and report that in the minibuffer, if using interactively. What if there were no matching lines? Then say Deleted 0 matching lines. Or beep "No matching lines!" Try this with matching lines all below the visible part of the buffer: C-x h [mark-whole-buffer] M-x delete-matching-lines zzzzz See the feeling (felt nothing, did it work in the first place one wonders= ?)