From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Matches for multiline regexps Date: Wed, 15 Jun 2005 20:40:15 -0500 (CDT) Message-ID: <200506160140.j5G1eFJ26066@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1118886927 25360 80.91.229.2 (16 Jun 2005 01:55:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Jun 2005 01:55:27 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 16 03:55:22 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dijb7-0000Xk-1w for ged-emacs-devel@m.gmane.org; Thu, 16 Jun 2005 03:55:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DijgQ-0008Ds-Vz for ged-emacs-devel@m.gmane.org; Wed, 15 Jun 2005 22:00:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DijcE-00076z-2U for emacs-devel@gnu.org; Wed, 15 Jun 2005 21:56:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dijbw-0006wp-Kq for emacs-devel@gnu.org; Wed, 15 Jun 2005 21:56:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dijbw-0006rd-Gp for emacs-devel@gnu.org; Wed, 15 Jun 2005 21:56:04 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DijPR-0001L1-9A for emacs-devel@gnu.org; Wed, 15 Jun 2005 21:43:09 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j5G1fSCK004798 for ; Wed, 15 Jun 2005 20:41:28 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j5G1eFJ26066; Wed, 15 Jun 2005 20:40:15 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:38918 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38918 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.