all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: Matches for multiline regexps
Date: Sun, 19 Jun 2005 20:57:18 -0500 (CDT)	[thread overview]
Message-ID: <200506200157.j5K1vIK12877@raven.dms.auburn.edu> (raw)
In-Reply-To: <E1Djqpf-0003ho-Ui@fencepost.gnu.org> (message from Richard Stallman on Sat, 18 Jun 2005 23:50:51 -0400)

Richard Stallman wrote:

   The code appears to be designed for uniline matches.  However, the
   Emacs 21 behavior you described is not desirable behavior.  It was
   merely how things happened to be.  Returning to that should not be
   the goal.

I took a closer look at the current occur code.  It definitely does
not make the slightest attempt at handling regexps that can match more
than one line.  The fact that the regexp does not match a newline
seems to be a basic assumption made in the current occur code.  The
fact that it seemed to try (but not succeed) to handle regexps that
could match newlines was merely an optical illusion.  The current
occur code does not make any attempt to handle overlapping matches
either.  The fact that it seemed to try was again an optical illusion.

The current occur code completely fails in several respects for
regexps that can match newlines.  This has been the situation for more
than three years now in CVS.  The fact that no bug reports were ever
filed shows that nobody using Emacs CVS has attempted to use occur for
a regexp that can match newlines in more than three years.  The only
reason I tried was out of curiosity, to check how it would handle
overlapping matches.

Making occur handle multiline matches (which it could do in 21.3, but
it apparently lost that ability when occur got completely rewritten
more than three years ago), as well as overlapping matches (which is
tricky and which occur never could) and change the way context lines
are handled seems to require a complete rewrite of the current occur
machinery into something much more complex.  That seems to be a major
task and I currently to not have the time to take it on.  Experience
of the last three plus years seems to show that nobody appears to be
interested in such functionality anyway.

Maybe somebody more familiar with, and more heavily interested in,
occur than I am might be willing to take on the task.  (I merely
stumbled on the problem by rereading man/search.texi, which was
extensively changed since I last read it.)

I will take care of flush-lines and keep-lines, however.  I am nearly
ready with it and only need to double check some things.

Sincerely,

Luc.

  parent reply	other threads:[~2005-06-20  1:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200506200157.j5K1vIK12877@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.