all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* isearch-forward-regexp across lines in various modes
@ 2004-07-29 10:37 Thomas Meyer
  2004-07-29 11:38 ` Katsumi Yamaoka
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Meyer @ 2004-07-29 10:37 UTC (permalink / raw)


Hello all you emacs-Gurus,

the emacs Info file, chapter
"Regular Expression Search" states:

   "If you type <SPC> in incremental
   regexp search, it matches any
   sequence of whitespace characters,
   including newlines.  If you want to
   match just a space, type `C-q
   <SPC>'."

I can see this behaviour when in
text-mode, but not in e.g. lisp-mode or
c-mode:

Take this text for example

sample text consisting of a line
and another line

... then isearch-forward-regexp will
search across the line when I enter
"line and" only when in text, mode not
when in lisp-mode (being the default for
the initial *scratch* buffer)

Any input greatly appreciated

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

* Re: isearch-forward-regexp across lines in various modes
  2004-07-29 10:37 isearch-forward-regexp across lines in various modes Thomas Meyer
@ 2004-07-29 11:38 ` Katsumi Yamaoka
  0 siblings, 0 replies; 2+ messages in thread
From: Katsumi Yamaoka @ 2004-07-29 11:38 UTC (permalink / raw)


See the doc-string for the search-whitespace-regexp variable.

>>>>> In <de14e8fd.0407290237.2db735c9@posting.google.com>
>>>>>	thomas.meyer@dla-marbach.de (Thomas Meyer) wrote:

> the emacs Info file, chapter
> "Regular Expression Search" states:

>    "If you type <SPC> in incremental
>    regexp search, it matches any
>    sequence of whitespace characters,
>    including newlines.  If you want to
>    match just a space, type `C-q
>    <SPC>'."

> I can see this behaviour when in
> text-mode, but not in e.g. lisp-mode or
> c-mode:

It is because the char syntax for newline is different between
text-mode and others.  The following form returns " " for
text-mode, but returns ">" for lisp-mode.

(char-to-string (char-syntax ?\n))
-- 
Katsumi Yamaoka <yamaoka@jpl.org>

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

end of thread, other threads:[~2004-07-29 11:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-29 10:37 isearch-forward-regexp across lines in various modes Thomas Meyer
2004-07-29 11:38 ` Katsumi Yamaoka

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.