unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Searching for spaces
@ 2014-05-12 19:17 Gary Hodges (NOAA Affiliate)
  2014-05-12 19:29 ` Drew Adams
       [not found] ` <mailman.1160.1399922981.1147.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Gary Hodges (NOAA Affiliate) @ 2014-05-12 19:17 UTC (permalink / raw)
  To: help-gnu-emacs

Current computer: Kubuntu 14.04 and emacs 24.3.1
Previous computer: Kubuntu 12.04 and emacs 23.3.1

With the new machine I'm no longer able to search for consecutive 
spaces.  Specifically, I regularly want to search for 5 consecutive 
spaces as part of a keyboard macro.  The beginning of that macro is as 
follows:

C-x-(, C-s-<space>-<space>-<space>-<space>-<space>

The above would locate each instance of 5 consecutive spaces.  This is 
no longer the case.  How can I get the old behavior back?

Thank you,
Gary



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

* RE: Searching for spaces
  2014-05-12 19:17 Searching for spaces Gary Hodges (NOAA Affiliate)
@ 2014-05-12 19:29 ` Drew Adams
       [not found] ` <mailman.1160.1399922981.1147.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Drew Adams @ 2014-05-12 19:29 UTC (permalink / raw)
  To: Gary Hodges (NOAA Affiliate), help-gnu-emacs

> C-x-(, C-s-<space>-<space>-<space>-<space>-<space>
> 
> The above would locate each instance of 5 consecutive spaces.
> This is no longer the case.  How can I get the old behavior back?

M-x customize-option isearch-lax-whitespace

M-x customize-option isearch-regexp-lax-whitespace



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

* Re: Searching for spaces
       [not found] <mailman.1157.1399922318.1147.help-gnu-emacs@gnu.org>
@ 2014-05-13 19:36 ` B. T. Raven
  0 siblings, 0 replies; 9+ messages in thread
From: B. T. Raven @ 2014-05-13 19:36 UTC (permalink / raw)
  To: help-gnu-emacs


> Current computer: Kubuntu 14.04 and emacs 24.3.1
> Previous computer: Kubuntu 12.04 and emacs 23.3.1
> 
> With the new machine I'm no longer able to search for consecutive
> spaces.  Specifically, I regularly want to search for 5 consecutive
> spaces as part of a keyboard macro.  The beginning of that macro is as
> follows:
> 
> C-x-(, C-s-<space>-<space>-<space>-<space>-<space>
> 
> The above would locate each instance of 5 consecutive spaces.  This is
> no longer the case.  How can I get the old behavior back?
> 
> Thank you,
> Gary
> 

Oops, sent to Gary only (reply instead of followup)


I guess you have to fall back to 23.3 I see the same behavior even with
C-s (without using a macro). Repeated invocations of C-s moves cursor to
the next space, not the next string of 5 spaces. Btw, I don't think you
need that comma after the open paren. Maybe you saw the comma when you
queried with C-h k:

"
C-x ( runs the command kmacro-start-macro, which is an interactive
autoloaded compiled Lisp function in `kmacro.el'.

It is bound to C-x (, C-x C-k C-s, C-x C-k s.
"

Ed

Btw, am on w32 and w64


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

* Re: Searching for spaces
       [not found] ` <mailman.1160.1399922981.1147.help-gnu-emacs@gnu.org>
@ 2014-05-13 19:52   ` B. T. Raven
  2014-05-13 20:31     ` Drew Adams
  0 siblings, 1 reply; 9+ messages in thread
From: B. T. Raven @ 2014-05-13 19:52 UTC (permalink / raw)
  To: help-gnu-emacs


>> C-x-(, C-s-<space>-<space>-<space>-<space>-<space>
>>
>> The above would locate each instance of 5 consecutive spaces.
>> This is no longer the case.  How can I get the old behavior back?
> 
> M-x customize-option isearch-lax-whitespace
> 
> M-x customize-option isearch-regexp-lax-whitespace
> 

Drew:

Are these built in? I don't find them on 24.3 w64

Thanks,

Ed




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

* RE: Searching for spaces
  2014-05-13 19:52   ` B. T. Raven
@ 2014-05-13 20:31     ` Drew Adams
  2014-05-14  0:20       ` Robert Thorpe
  0 siblings, 1 reply; 9+ messages in thread
From: Drew Adams @ 2014-05-13 20:31 UTC (permalink / raw)
  To: B. T. Raven, help-gnu-emacs

> >> C-x-(, C-s-<space>-<space>-<space>-<space>-<space>
> >>
> >> The above would locate each instance of 5 consecutive spaces.
> >> This is no longer the case.  How can I get the old behavior back?
> >
> > M-x customize-option isearch-lax-whitespace
> > M-x customize-option isearch-regexp-lax-whitespace
> 
> Drew: Are these built in? I don't find them on 24.3 w64

Yes, in isearch.el, for Emacs 24.3.  But I was wrong about them
being user options.  They are defvars, so you could use defvar
or setq to change their values.

But it is generally better to use command
`isearch-toggle-lax-whitespace', which is bound to `M-s SPC' during
Isearch.  

You can, however, set those variables in your init file the way you
want them to be at the outset.

(And you can customize option `search-whitespace-regexp'.)



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

* Re: Searching for spaces
  2014-05-13 20:31     ` Drew Adams
@ 2014-05-14  0:20       ` Robert Thorpe
  2014-05-28 22:37         ` Gary Hodges (NOAA Affiliate)
  0 siblings, 1 reply; 9+ messages in thread
From: Robert Thorpe @ 2014-05-14  0:20 UTC (permalink / raw)
  To: Drew Adams; +Cc: btraven, help-gnu-emacs

> (And you can customize option `search-whitespace-regexp'.)

Yes manual says that (setq search-whitespace-regexp nil) will prevent
whitespace being matched in a clever way.  I don't think there's any
need to modify the other ones.

See this node for more:
"File: emacs.info,  Node: Special Isearch,  Next: Isearch Yank,  Prev:
Error in Isearch,  Up: Incremental Search"

BR,
Robert Thorpe





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

* Re: Searching for spaces
       [not found] <mailman.1276.1400027133.1147.help-gnu-emacs@gnu.org>
@ 2014-05-16 17:37 ` B. T. Raven
  2014-05-16 21:38   ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: B. T. Raven @ 2014-05-16 17:37 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks Drew and Robert. I just added the (setq form below to my .emacs
and now 24.3 acts like 23.3. I guess a non-nil regexp is more useful
here at least for programmers.

Ed

>> (And you can customize option `search-whitespace-regexp'.)
> 
> Yes manual says that (setq search-whitespace-regexp nil) will prevent
> whitespace being matched in a clever way.  I don't think there's any
> need to modify the other ones.
> 
> See this node for more:
> "File: emacs.info,  Node: Special Isearch,  Next: Isearch Yank,  Prev:
> Error in Isearch,  Up: Incremental Search"
> 
> BR,
> Robert Thorpe
> 
> 
> 



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

* Re: Searching for spaces
  2014-05-16 17:37 ` B. T. Raven
@ 2014-05-16 21:38   ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2014-05-16 21:38 UTC (permalink / raw)
  To: help-gnu-emacs

> Thanks Drew and Robert. I just added the (setq form below to my .emacs
> and now 24.3 acts like 23.3. I guess a non-nil regexp is more useful
> here at least for programmers.

BTW, while SPC is treated specially in such searches (so it matches
more than a single space), I seem to remember agreeing that it's a bug
for SPC SPC SPC to match less than 3 spaces.
Not sure if we did fix the bug, tho, but if you try 24.3.91 you might
find that this is fixed.


        Stefan




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

* Re: Searching for spaces
  2014-05-14  0:20       ` Robert Thorpe
@ 2014-05-28 22:37         ` Gary Hodges (NOAA Affiliate)
  0 siblings, 0 replies; 9+ messages in thread
From: Gary Hodges (NOAA Affiliate) @ 2014-05-28 22:37 UTC (permalink / raw)
  To: Robert Thorpe, Drew Adams; +Cc: btraven, help-gnu-emacs

Hey guys.  Today was the first chance I had to go through the 
suggestions to my post about searching for spaces.  I added "(setq 
search-whitespace-regexp nil)" to my .emacs file and I'm right where I 
want to be.  Thank you.

Gary

On 05/13/2014 06:20 PM, Robert Thorpe wrote:
>> (And you can customize option `search-whitespace-regexp'.)
>
> Yes manual says that (setq search-whitespace-regexp nil) will prevent
> whitespace being matched in a clever way.  I don't think there's any
> need to modify the other ones.
>
> See this node for more:
> "File: emacs.info,  Node: Special Isearch,  Next: Isearch Yank,  Prev:
> Error in Isearch,  Up: Incremental Search"
>
> BR,
> Robert Thorpe
>
>
>




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

end of thread, other threads:[~2014-05-28 22:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 19:17 Searching for spaces Gary Hodges (NOAA Affiliate)
2014-05-12 19:29 ` Drew Adams
     [not found] ` <mailman.1160.1399922981.1147.help-gnu-emacs@gnu.org>
2014-05-13 19:52   ` B. T. Raven
2014-05-13 20:31     ` Drew Adams
2014-05-14  0:20       ` Robert Thorpe
2014-05-28 22:37         ` Gary Hodges (NOAA Affiliate)
     [not found] <mailman.1157.1399922318.1147.help-gnu-emacs@gnu.org>
2014-05-13 19:36 ` B. T. Raven
     [not found] <mailman.1276.1400027133.1147.help-gnu-emacs@gnu.org>
2014-05-16 17:37 ` B. T. Raven
2014-05-16 21:38   ` Stefan Monnier

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