GNU bug report logs - #34520
delete-matching-lines should report how many lines it deleted

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Mon, 18 Feb 2019 01:52:01 UTC

Severity: wishlist

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: bug#34520: closed (Re: bug#34520: delete-matching-lines should
 report how many lines it deleted)
Date: Thu, 28 Feb 2019 21:34:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#34520: delete-matching-lines should report how many lines it deleted

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 34520 <at> debbugs.gnu.org.

-- 
34520: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34520
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34520-done <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#34520: delete-matching-lines should report how many lines it
 deleted
Date: Thu, 28 Feb 2019 23:33:10 +0200
>> +    (when interactive (message "Deleted %d matching line%s"
>> +			       count
>> +			       (if (= count 1) "" "s")))
>> +    count))
>
> The concatenation of "s" trick works only in English, so please avoid
> that.

Ok, waiting for the times when ‘gettext’ will arrive to Emacs.

> This needs NEWS and manual updates.

Done.

[Message part 3 (message/rfc822, inline)]
From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: delete-matching-lines should report how many lines it deleted
Date: Mon, 18 Feb 2019 08:35:08 +0800
delete-matching-lines is an alias for ‘flush-lines’ in ‘replace.el’.

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?)



This bug report was last modified 6 years and 139 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.