unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27359: 25.2; count-matches ^$
       [not found] <1541124559.16442896.1497442533741.ref@mail.yahoo.com>
@ 2017-06-14 12:15 ` Bruce Mardle
  2017-06-14 15:32   ` bug#27359: count-matches vs. ^$ Bruce Mardle
  2021-07-05 14:31   ` bug#27359: 25.2; count-matches ^$ Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Bruce Mardle @ 2017-06-14 12:15 UTC (permalink / raw)
  To: 27359

[-- Attachment #1: Type: text/plain, Size: 3817 bytes --]


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


[-- Attachment #2: Type: text/html, Size: 8062 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#27359: count-matches vs. ^$
  2017-06-14 12:15 ` bug#27359: 25.2; count-matches ^$ Bruce Mardle
@ 2017-06-14 15:32   ` Bruce Mardle
  2017-07-02  0:41     ` npostavs
  2021-07-05 14:31   ` bug#27359: 25.2; count-matches ^$ Lars Ingebrigtsen
  1 sibling, 1 reply; 4+ messages in thread
From: Bruce Mardle @ 2017-06-14 15:32 UTC (permalink / raw)
  To: 27359@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 40 bytes --]

Someone on comp.emacs has posted a fix.

[-- Attachment #2: Type: text/html, Size: 321 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#27359: count-matches vs. ^$
  2017-06-14 15:32   ` bug#27359: count-matches vs. ^$ Bruce Mardle
@ 2017-07-02  0:41     ` npostavs
  0 siblings, 0 replies; 4+ messages in thread
From: npostavs @ 2017-07-02  0:41 UTC (permalink / raw)
  To: Bruce Mardle; +Cc: 27359@debbugs.gnu.org

Bruce Mardle <marblypup@yahoo.co.uk> writes:

> Someone on comp.emacs has posted a fix.

Perhaps they'd like to contribute it to Emacs?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#27359: 25.2; count-matches ^$
  2017-06-14 12:15 ` bug#27359: 25.2; count-matches ^$ Bruce Mardle
  2017-06-14 15:32   ` bug#27359: count-matches vs. ^$ Bruce Mardle
@ 2021-07-05 14:31   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-05 14:31 UTC (permalink / raw)
  To: Bruce Mardle; +Cc: 27359

Bruce Mardle <marblypup@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-05 14:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1541124559.16442896.1497442533741.ref@mail.yahoo.com>
2017-06-14 12:15 ` bug#27359: 25.2; count-matches ^$ Bruce Mardle
2017-06-14 15:32   ` bug#27359: count-matches vs. ^$ Bruce Mardle
2017-07-02  0:41     ` npostavs
2021-07-05 14:31   ` bug#27359: 25.2; count-matches ^$ Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).