unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* regexp bug?
@ 2006-11-16 13:03 David Abrahams
  2006-11-16 13:11 ` David Abrahams
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: David Abrahams @ 2006-11-16 13:03 UTC (permalink / raw)



If I put point on a letter, like this "x", (looking-at " *") returns t
but (looking-at "\s *") returns nil.

Is that intended?  Is it documented?

Thanks in advance,

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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

* Re: regexp bug?
  2006-11-16 13:03 regexp bug? David Abrahams
@ 2006-11-16 13:11 ` David Abrahams
  2006-11-16 13:20 ` Kim F. Storm
  2006-11-16 13:29 ` David Kastrup
  2 siblings, 0 replies; 5+ messages in thread
From: David Abrahams @ 2006-11-16 13:11 UTC (permalink / raw)


David Abrahams <dave@boost-consulting.com> writes:

> If I put point on a letter, like this "x", (looking-at " *") returns t
> but (looking-at "\s *") returns nil.
>
> Is that intended?  Is it documented?

Gah!  Sorry, missing the double backslash!

Nevermind.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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

* Re: regexp bug?
  2006-11-16 13:03 regexp bug? David Abrahams
  2006-11-16 13:11 ` David Abrahams
@ 2006-11-16 13:20 ` Kim F. Storm
  2006-11-16 13:29 ` David Kastrup
  2 siblings, 0 replies; 5+ messages in thread
From: Kim F. Storm @ 2006-11-16 13:20 UTC (permalink / raw)
  Cc: emacs-devel

David Abrahams <dave@boost-consulting.com> writes:

> If I put point on a letter, like this "x", (looking-at " *") returns t
> but (looking-at "\s *") returns nil.

Try (looking-at "\\s *") 

-- 
Kim F. Storm  http://www.cua.dk

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

* Re: regexp bug?
  2006-11-16 13:03 regexp bug? David Abrahams
  2006-11-16 13:11 ` David Abrahams
  2006-11-16 13:20 ` Kim F. Storm
@ 2006-11-16 13:29 ` David Kastrup
  2006-11-16 14:01   ` Kim F. Storm
  2 siblings, 1 reply; 5+ messages in thread
From: David Kastrup @ 2006-11-16 13:29 UTC (permalink / raw)
  Cc: emacs-devel

David Abrahams <dave@boost-consulting.com> writes:

> If I put point on a letter, like this "x", (looking-at " *") returns t
> but (looking-at "\s *") returns nil.
>
> Is that intended?  Is it documented?

Yes.  But in

(info "(elisp) Syntax for Strings")

instead of

(info "(elisp) Syntax of Regexps")

since

(looking-at "\s *") is the same as (looking-at "s *"),

You probably want (looking-at "\\s *") instead.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: regexp bug?
  2006-11-16 13:29 ` David Kastrup
@ 2006-11-16 14:01   ` Kim F. Storm
  0 siblings, 0 replies; 5+ messages in thread
From: Kim F. Storm @ 2006-11-16 14:01 UTC (permalink / raw)
  Cc: David Abrahams, emacs-devel

David Kastrup <dak@gnu.org> writes:

> (looking-at "\s *") is the same as (looking-at "s *"),

In emacs 22, it is the same as (looking-at "  *"),

-- 
Kim F. Storm  http://www.cua.dk

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

end of thread, other threads:[~2006-11-16 14:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-16 13:03 regexp bug? David Abrahams
2006-11-16 13:11 ` David Abrahams
2006-11-16 13:20 ` Kim F. Storm
2006-11-16 13:29 ` David Kastrup
2006-11-16 14:01   ` Kim F. Storm

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