GNU bug report logs - #27359
25.2; count-matches ^$

Previous Next

Package: emacs;

Reported by: Bruce Mardle <marblypup <at> yahoo.co.uk>

Date: Wed, 14 Jun 2017 15:28:01 UTC

Severity: normal

Found in version 25.2

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27359 in the body.
You can then email your comments to 27359 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#27359; Package emacs. (Wed, 14 Jun 2017 15:28:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruce Mardle <marblypup <at> yahoo.co.uk>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 14 Jun 2017 15:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruce Mardle <marblypup <at> yahoo.co.uk>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 25.2; count-matches ^$
Date: Wed, 14 Jun 2017 12:15:33 +0000 (UTC)
[Message part 1 (text/plain, inline)]
I've got a file with 909-lines, 358 of which are blank. To my surprise,
count-matches, given a patten of ^$ says there are 10 matches. It turns
out those are the number of *runs* of blank lines (including 1 at the
end). isearch-forward-regexp given ^$ treats the blank lines separately,
as expected.



In GNU Emacs 25.2.1 (x86_64-unknown-cygwin)
 of 2017-04-21 built on moufang
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
 'configure
 --srcdir=/home/kbrown/src/cygemacs/emacs-25.2-1.x86_64/src/emacs-25.2
 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc
 --docdir=/usr/share/doc/emacs --htmldir=/usr/share/doc/emacs/html -C
 --with-w32 'CFLAGS=-ggdb -O2 -pipe -Wimplicit-function-declaration
 -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-25.2-1.x86_64/build=/usr/src/debug/emacs-25.2-1
 -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-25.2-1.x86_64/src/emacs-25.2=/usr/src/debug/emacs-25.2-1'
 CPPFLAGS= LDFLAGS='

Configured features:
XPM JPEG TIFF GIF PNG IMAGEMAGICK SOUND DBUS NOTIFY ACL GNUTLS LIBXML2
ZLIB TOOLKIT_SCROLL_BARS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Help

Minor modes in effect:
  display-time-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Eager macro-expansion failure: (void-variable height)
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark saved where search started [6 times]
Mark set [2 times]
10 occurrences
Mark set
Mark saved where search started
Quit
No library isearch.el in search path
Type C-x 1 to delete the help window.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mail-utils eieio-opt speedbar sb-image ezimage dframe find-func
thingatpt misearch multi-isearch browse-url url-util url-parse
auth-source cl-seq eieio byte-opt bytecomp byte-compile cl-extra cconv
eieio-core cl-macs gv gnus-util mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr password-cache url-vars avoid time
paren cus-start cus-load time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel disp-table w32-win
w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
dbusbind gfilenotify w32 multi-tty make-network-process emacs)

Memory information:
((conses 16 113245 5836)
 (symbols 48 22653 0)
 (miscs 40 78 243)
 (strings 32 23854 5007)
 (string-bytes 1 639594)
 (vectors 16 14638)
 (vector-slots 8 455632 4033)
 (floats 8 218 82)
 (intervals 56 240 0)
 (buffers 976 19))

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27359; Package emacs. (Wed, 14 Jun 2017 16:25:01 GMT) Full text and rfc822 format available.

Message #8 received at 27359 <at> debbugs.gnu.org (full text, mbox):

From: Bruce Mardle <marblypup <at> yahoo.co.uk>
To: "27359 <at> debbugs.gnu.org" <27359 <at> debbugs.gnu.org>
Subject: count-matches vs. ^$
Date: Wed, 14 Jun 2017 15:32:58 +0000 (UTC)
[Message part 1 (text/plain, inline)]
Someone on comp.emacs has posted a fix.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27359; Package emacs. (Sun, 02 Jul 2017 00:40:01 GMT) Full text and rfc822 format available.

Message #11 received at 27359 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Bruce Mardle <marblypup <at> yahoo.co.uk>
Cc: "27359 <at> debbugs.gnu.org" <27359 <at> debbugs.gnu.org>
Subject: Re: bug#27359: count-matches vs. ^$
Date: Sat, 01 Jul 2017 20:41:27 -0400
Bruce Mardle <marblypup <at> yahoo.co.uk> writes:

> Someone on comp.emacs has posted a fix.

Perhaps they'd like to contribute it to Emacs?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27359; Package emacs. (Mon, 05 Jul 2021 14:32:02 GMT) Full text and rfc822 format available.

Message #14 received at 27359 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Bruce Mardle <marblypup <at> yahoo.co.uk>
Cc: 27359 <at> debbugs.gnu.org
Subject: Re: bug#27359: 25.2; count-matches ^$
Date: Mon, 05 Jul 2021 16:31:02 +0200
Bruce Mardle <marblypup <at> yahoo.co.uk> writes:

>  I've got a file with 909-lines, 358 of which are blank. To my surprise,
> count-matches, given a patten of ^$ says there are 10 matches. It turns
> out those are the number of *runs* of blank lines (including 1 at the
> end). isearch-forward-regexp given ^$ treats the blank lines separately,
> as expected.

This should now be fixed in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 27359 <at> debbugs.gnu.org and Bruce Mardle <marblypup <at> yahoo.co.uk> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 05 Jul 2021 14:32:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 03 Aug 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 266 days ago.

Previous Next


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