unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Matches for multiline regexps
@ 2005-06-16  1:40 Luc Teirlinck
  2005-06-16  2:09 ` Luc Teirlinck
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Luc Teirlinck @ 2005-06-16  1:40 UTC (permalink / raw)


There are some inconsistencies between `occur' and friends on the one
hand and `how-many', `flush-lines' and `keep-lines' on the other hand,
in as far as matches for multiline regexps are concerned.

In a buffer containing five lines all containing "11":

11
11
11
11
11

`M-x occur RET 11 C-q C-j 11 RET' finds four matches (lines 1 through 4)
which seems logical to me.

`M-x how-many RET 11 C-q C-j 11 RET' (with point at bob) finds two matches.

The difference is that how-many, after finding the match on line one,
skips over the match, and starts searching for the next match at the
end of that match, hence not finding the match at the beginning of
line 2 (which is partially covered by the first match).

`flush-lines' and `keep-lines' follow the `how-many' "philosophy".

Should I just document the difference, or is this a bug in `how-many'
and friends that needs to be fixed?

Sincerely,

Luc.

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

end of thread, other threads:[~2005-06-21  2:00 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-16  1:40 Matches for multiline regexps Luc Teirlinck
2005-06-16  2:09 ` Luc Teirlinck
2005-06-16  2:24 ` Luc Teirlinck
2005-06-16 16:24 ` Richard Stallman
2005-06-17  3:26   ` Luc Teirlinck
2005-06-17 14:58     ` Richard Stallman
2005-06-18  2:48       ` Luc Teirlinck
2005-06-19  3:50         ` Richard Stallman
2005-06-19 14:14           ` Juri Linkov
2005-06-20  3:50             ` Richard Stallman
2005-06-20  4:47               ` Juri Linkov
2005-06-21  2:00                 ` Richard Stallman
2005-06-20  1:57           ` Luc Teirlinck
2005-06-20 17:51             ` Richard Stallman
2005-06-18  3:17       ` Luc Teirlinck
2005-06-17  3:30   ` Luc Teirlinck
2005-06-17 14:58     ` Richard Stallman

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