unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Chong Yidong" <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org, rms@gnu.org,
	Drew Adams <drew.adams@oracle.com>,
	miles@gnu.org
Subject: Re: search-whitespace-regexp
Date: Sun, 6 Feb 2005 20:36:39 -0500 (EST)	[thread overview]
Message-ID: <46742.203.116.59.23.1107740199.squirrel@203.116.59.23> (raw)
In-Reply-To: <fc339e4a050206164124f61bea@mail.gmail.com>

Let me try to explain my idea more clearly.

Since RMS has raised the issue of incompatibility, I think the default
behavior for isearch should be left as it was in 21.3, for the moment. In
other words, regexp search has a magic space, and string search doesn't.
However, there should be a way for the user to customize this.

It is relatively easy for a user to get rid of the magic space for regexp
search, if he wants to:
  (setq search-whitespace-regexp nil)

However, there is no easy way for a user to turn on the magic space for
string search; you have to hack isearch.el to do it. I suggest
implementing an analogous mechanism for string search (I'm not certain
what the variable should be called, though):

  (defvar search-string-whitespace-regexp nil
  "If non-nil, regular expression to match a sequence of whitespace chars.
  This applies to ordinary incremental search.
  You might want to use something like "[ \t\r\n]+" instead.")

Because the default is nil, there is no magic space, and the behavior is
like 21.3 and below; but users or Lisp libraries can set it as needed. For
example, longlines.el can set it to "[ \n]" so that linebreaks and spaces
are treated equally.

  reply	other threads:[~2005-02-07  1:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-04 14:12 search-whitespace-regexp Chong Yidong
2005-02-04 14:36 ` search-whitespace-regexp Andreas Schwab
2005-02-04 15:22   ` search-whitespace-regexp Chong Yidong
2005-02-04 15:27   ` search-whitespace-regexp Chong Yidong
2005-02-04 15:17 ` search-whitespace-regexp Stefan Monnier
2005-02-04 15:55   ` search-whitespace-regexp Chong Yidong
2005-02-05 17:39 ` search-whitespace-regexp Richard Stallman
2005-02-06  1:59   ` search-whitespace-regexp Chong Yidong
2005-02-06 12:42     ` search-whitespace-regexp Richard Stallman
2005-02-06 16:21     ` search-whitespace-regexp Stefan Monnier
2005-02-06 22:39       ` search-whitespace-regexp Miles Bader
2005-02-06 22:49         ` search-whitespace-regexp Stefan Monnier
2005-02-06 23:17           ` search-whitespace-regexp Miles Bader
2005-02-07  0:28             ` search-whitespace-regexp Drew Adams
2005-02-07  0:41               ` search-whitespace-regexp Miles Bader
2005-02-07  1:36                 ` Chong Yidong [this message]
2005-02-07  4:12                   ` search-whitespace-regexp Drew Adams
2005-02-07  9:48                 ` search-whitespace-regexp Andreas Schwab
2005-02-07 20:51                 ` search-whitespace-regexp Richard Stallman
2005-02-07 20:51       ` search-whitespace-regexp Richard Stallman
2005-02-07 21:07         ` search-whitespace-regexp Stefan Monnier
2005-02-08  0:01           ` search-whitespace-regexp Miles Bader

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=46742.203.116.59.23.1107740199.squirrel@203.116.59.23 \
    --to=cyd@stupidchicken.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    --cc=rms@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 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).