* Searching across line breaks
@ 2011-07-18 3:57 spinner
2011-07-18 8:48 ` Andreas Röhler
2011-07-18 9:34 ` Memnon Anon
0 siblings, 2 replies; 11+ messages in thread
From: spinner @ 2011-07-18 3:57 UTC (permalink / raw)
To: Help-gnu-emacs
I've got text with carriage returns (CR) ending lines in my LaTex documents.
isearch does not work for word strings with CRs separating the words. For
instance, isearch on 'George Washington' will not find:
George [CR]
Washington
I've looked online for a solution and found one source that describes the
issue but I'm confused what the customization to the
search-whitespace-regexp variable should be.
http://stackoverflow.com/questions/6029010/isearch-across-line-breaks
This link describes the confusion. I'm a new to emacs and can't figure out
the variable settings.
http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-05/msg00427.html
Again, what is the proper setting in search-whitespace-regexp to search
across line breaks with carriage returns?
--
View this message in context: http://old.nabble.com/Searching-across-line-breaks-tp32080601p32080601.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Searching across line breaks
2011-07-18 3:57 Searching across line breaks spinner
@ 2011-07-18 8:48 ` Andreas Röhler
2011-07-18 11:00 ` spinner
2011-07-18 9:34 ` Memnon Anon
1 sibling, 1 reply; 11+ messages in thread
From: Andreas Röhler @ 2011-07-18 8:48 UTC (permalink / raw)
To: help-gnu-emacs
Am 18.07.2011 05:57, schrieb spinner:
>
> I've got text with carriage returns (CR) ending lines in my LaTex documents.
> isearch does not work for word strings with CRs separating the words. For
> instance, isearch on 'George Washington' will not find:
> George [CR]
> Washington
>
> I've looked online for a solution and found one source that describes the
> issue but I'm confused what the customization to the
> search-whitespace-regexp variable should be.
> http://stackoverflow.com/questions/6029010/isearch-across-line-breaks
>
> This link describes the confusion. I'm a new to emacs and can't figure out
> the variable settings.
> http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-05/msg00427.html
>
> Again, what is the proper setting in search-whitespace-regexp to search
> across line breaks with carriage returns?
>
M-x isearch-forward-regexp RET
should enable the right thing here.
Regards,
Andreas
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Searching across line breaks
2011-07-18 3:57 Searching across line breaks spinner
2011-07-18 8:48 ` Andreas Röhler
@ 2011-07-18 9:34 ` Memnon Anon
2011-07-18 11:06 ` spinner
1 sibling, 1 reply; 11+ messages in thread
From: Memnon Anon @ 2011-07-18 9:34 UTC (permalink / raw)
To: help-gnu-emacs
spinner <michaelcrain@hotmail.com> writes:
> I've got text with carriage returns (CR) ending lines in my LaTex documents.
> isearch does not work for word strings with CRs separating the words.
C-h f word-search-forward ?
hth
Memnon
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Searching across line breaks
2011-07-18 8:48 ` Andreas Röhler
@ 2011-07-18 11:00 ` spinner
2011-07-18 17:40 ` Andreas Röhler
0 siblings, 1 reply; 11+ messages in thread
From: spinner @ 2011-07-18 11:00 UTC (permalink / raw)
To: Help-gnu-emacs
This did not work for me.
According to the links in my OP, some settings need to be customized to make
search-whitespace-regexp work across CRs (and other separators). But as I
said I find the documentation on this customization confusing. C-h v
search-whitespace-regexp
Andreas Röhler wrote:
>
> Am 18.07.2011 05:57, schrieb spinner:
>>
>> I've got text with carriage returns (CR) ending lines in my LaTex
>> documents.
>> isearch does not work for word strings with CRs separating the words. For
>> instance, isearch on 'George Washington' will not find:
>> George [CR]
>> Washington
>>
>> I've looked online for a solution and found one source that describes the
>> issue but I'm confused what the customization to the
>> search-whitespace-regexp variable should be.
>> http://stackoverflow.com/questions/6029010/isearch-across-line-breaks
>>
>> This link describes the confusion. I'm a new to emacs and can't figure
>> out
>> the variable settings.
>> http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-05/msg00427.html
>>
>> Again, what is the proper setting in search-whitespace-regexp to search
>> across line breaks with carriage returns?
>>
>
> M-x isearch-forward-regexp RET
>
> should enable the right thing here.
>
> Regards,
>
> Andreas
>
>
>
--
View this message in context: http://old.nabble.com/Searching-across-line-breaks-tp32080601p32082295.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Searching across line breaks
2011-07-18 9:34 ` Memnon Anon
@ 2011-07-18 11:06 ` spinner
2011-07-18 12:30 ` ken
0 siblings, 1 reply; 11+ messages in thread
From: spinner @ 2011-07-18 11:06 UTC (permalink / raw)
To: Help-gnu-emacs
Your suggestion works for me. Thank you.
http://www.gnu.org/software/libtool/manual/emacs/Word-Search.html
M-s w
Memnon Anon wrote:
>
> spinner <michaelcrain@hotmail.com> writes:
>
>> I've got text with carriage returns (CR) ending lines in my LaTex
>> documents.
>> isearch does not work for word strings with CRs separating the words.
>
> C-h f word-search-forward ?
>
> hth
> Memnon
>
>
>
>
--
View this message in context: http://old.nabble.com/Searching-across-line-breaks-tp32080601p32082327.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Searching across line breaks
2011-07-18 11:06 ` spinner
@ 2011-07-18 12:30 ` ken
0 siblings, 0 replies; 11+ messages in thread
From: ken @ 2011-07-18 12:30 UTC (permalink / raw)
To: spinner; +Cc: Help-gnu-emacs
On 07/18/2011 07:06 AM spinner wrote:
> Your suggestion works for me. Thank you.
>
> http://www.gnu.org/software/libtool/manual/emacs/Word-Search.html
> M-s w
>
Is there a variable which can be set which toggles on word-mode for C-s
and C-r?
--
"When a society comes together and makes decisions in harmony,
when it respects its most noble traditions, cares for its most
vulnerable members, treats its forests and lands with respect,
then it will prosper and not decline."
--Buddha, Mahaparinirvana Sutra
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Searching across line breaks
2011-07-18 11:00 ` spinner
@ 2011-07-18 17:40 ` Andreas Röhler
2011-07-18 18:58 ` Peter Dyballa
0 siblings, 1 reply; 11+ messages in thread
From: Andreas Röhler @ 2011-07-18 17:40 UTC (permalink / raw)
To: help-gnu-emacs
Am 18.07.2011 13:00, schrieb spinner:
>
> This did not work for me.
George[\r\t\f
]+Washington
should find any name separated by blanks, tabs, newpages, cr, newlines
the newline-expression in the regexp must be typed \C-o inside the
minibuffer, ie inserted literarly
> According to the links in my OP, some settings need to be customized to make
> search-whitespace-regexp work across CRs (and other separators). But as I
> said I find the documentation on this customization confusing. C-h v
> search-whitespace-regexp
>
>
> Andreas Röhler wrote:
>>
>> Am 18.07.2011 05:57, schrieb spinner:
>>>
>>> I've got text with carriage returns (CR) ending lines in my LaTex
>>> documents.
>>> isearch does not work for word strings with CRs separating the words. For
>>> instance, isearch on 'George Washington' will not find:
>>> George [CR]
>>> Washington
>>>
>>> I've looked online for a solution and found one source that describes the
>>> issue but I'm confused what the customization to the
>>> search-whitespace-regexp variable should be.
>>> http://stackoverflow.com/questions/6029010/isearch-across-line-breaks
>>>
>>> This link describes the confusion. I'm a new to emacs and can't figure
>>> out
>>> the variable settings.
>>> http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-05/msg00427.html
>>>
>>> Again, what is the proper setting in search-whitespace-regexp to search
>>> across line breaks with carriage returns?
>>>
>>
>> M-x isearch-forward-regexp RET
>>
>> should enable the right thing here.
>>
>> Regards,
>>
>> Andreas
>>
>>
>>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Searching across line breaks
2011-07-18 17:40 ` Andreas Röhler
@ 2011-07-18 18:58 ` Peter Dyballa
2011-07-19 5:30 ` Andreas Röhler
0 siblings, 1 reply; 11+ messages in thread
From: Peter Dyballa @ 2011-07-18 18:58 UTC (permalink / raw)
To: Andreas Röhler; +Cc: help-gnu-emacs
Am 18.07.2011 um 19:40 schrieb Andreas Röhler:
> the newline-expression in the regexp must be typed \C-o inside the minibuffer, ie inserted literarly
Shouldn't it be C-j or C-q C-j? C-j is dec 10, oct 12, hex 0A, UTF U+000A LINE FEED (LF). (C-o is SHIFT IN.)
--
Mit friedvollen Grüßen
Pete
"Klingons do not believe in indentation - except perhaps in the skulls of their project managers."
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Searching across line breaks
2011-07-18 18:58 ` Peter Dyballa
@ 2011-07-19 5:30 ` Andreas Röhler
2011-07-19 13:45 ` Memnon Anon
0 siblings, 1 reply; 11+ messages in thread
From: Andreas Röhler @ 2011-07-19 5:30 UTC (permalink / raw)
To: Peter Dyballa; +Cc: help-gnu-emacs
Am 18.07.2011 20:58, schrieb Peter Dyballa:
>
> Am 18.07.2011 um 19:40 schrieb Andreas Röhler:
>
>> the newline-expression in the regexp must be typed \C-o inside the minibuffer, ie inserted literarly
>
> Shouldn't it be C-j or C-q C-j? C-j is dec 10, oct 12, hex 0A, UTF U+000A LINE FEED (LF). (C-o is SHIFT IN.)
>
> --
> Mit friedvollen Grüßen
>
> Pete
>
> "Klingons do not believe in indentation - except perhaps in the skulls of their project managers."
>
>
Hm, de facto that works for me, I'm doing \C-o here. Which was hard to
figure out at the beginning with Emacs BTW.
No explanation so far, just experience. Might \C-o from minibuffer be
translated differently by Emacs?
Maybe someone else can comment.
Thanks pointing at that,
Andreas
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Searching across line breaks
2011-07-19 5:30 ` Andreas Röhler
@ 2011-07-19 13:45 ` Memnon Anon
2011-07-19 16:39 ` Andreas Röhler
0 siblings, 1 reply; 11+ messages in thread
From: Memnon Anon @ 2011-07-19 13:45 UTC (permalink / raw)
To: help-gnu-emacs
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> Am 18.07.2011 20:58, schrieb Peter Dyballa:
>>> the newline-expression in the regexp must be typed \C-o inside the minibuffer, ie inserted literarly
>> Shouldn't it be C-j or C-q C-j? C-j is dec 10, oct 12, hex 0A, UTF U+000A LINE FEED (LF). (C-o is SHIFT IN.)
> Hm, de facto that works for me, I'm doing \C-o here. Which was hard to
> figure out at the beginning with Emacs BTW.
`C-h r' `C-s C-q C-j' `C-s':
,----[ (info "(emacs)Minibuffer Edit") ]
| Since <RET> in the minibuffer is defined to exit the minibuffer, you
| can't use it to insert a newline in the minibuffer. To do that, type
| `C-o' or `C-q C-j'. (The newline character is really the ASCII
| character control-J.)
`----
So, both of you are right.
FWIF, I learned `C-q C-j', because it was easier to remember once I knew
what `C-q' does, thusly avoiding the "hard to figure out at the
beginning" bit.
Memnon
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Searching across line breaks
2011-07-19 13:45 ` Memnon Anon
@ 2011-07-19 16:39 ` Andreas Röhler
0 siblings, 0 replies; 11+ messages in thread
From: Andreas Röhler @ 2011-07-19 16:39 UTC (permalink / raw)
To: help-gnu-emacs
Am 19.07.2011 15:45, schrieb Memnon Anon:
> Andreas Röhler<andreas.roehler@easy-emacs.de> writes:
>> Am 18.07.2011 20:58, schrieb Peter Dyballa:
>
>>>> the newline-expression in the regexp must be typed \C-o inside the minibuffer, ie inserted literarly
>>> Shouldn't it be C-j or C-q C-j? C-j is dec 10, oct 12, hex 0A, UTF U+000A LINE FEED (LF). (C-o is SHIFT IN.)
>> Hm, de facto that works for me, I'm doing \C-o here. Which was hard to
>> figure out at the beginning with Emacs BTW.
>
> `C-h r' `C-s C-q C-j' `C-s':
>
> ,----[ (info "(emacs)Minibuffer Edit") ]
> | Since<RET> in the minibuffer is defined to exit the minibuffer, you
> | can't use it to insert a newline in the minibuffer. To do that, type
> | `C-o' or `C-q C-j'. (The newline character is really the ASCII
> | character control-J.)
> `----
>
> So, both of you are right.
>
> FWIF, I learned `C-q C-j', because it was easier to remember once I knew
> what `C-q' does, thusly avoiding the "hard to figure out at the
> beginning" bit.
>
> Memnon
>
>
thanks picking the info
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-07-19 16:39 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-18 3:57 Searching across line breaks spinner
2011-07-18 8:48 ` Andreas Röhler
2011-07-18 11:00 ` spinner
2011-07-18 17:40 ` Andreas Röhler
2011-07-18 18:58 ` Peter Dyballa
2011-07-19 5:30 ` Andreas Röhler
2011-07-19 13:45 ` Memnon Anon
2011-07-19 16:39 ` Andreas Röhler
2011-07-18 9:34 ` Memnon Anon
2011-07-18 11:06 ` spinner
2011-07-18 12:30 ` ken
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).