all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Cross Line Search
@ 2007-12-05 17:52 Alberto Simões
  0 siblings, 0 replies; 5+ messages in thread
From: Alberto Simões @ 2007-12-05 17:52 UTC (permalink / raw)
  To: emacs

Hi

When I am writing LaTeX documents (or plain text files), I use the usual 
format alt+q combination, to get lines wrapped around column 80.

When I am reviewing a document and trying to find the paragraph where I 
wrote something, I try to search for a sequence of words. Some times 
(fortunately not all the times) those words are on different lines 
(thus, with a new line in the middle) and the usual search method does 
not find it. When that happens, I try a new search without one or two words.

The question is: is there any search function to help me on this? I know 
it is probably easy to write it, but as my lisp coding skills are near 
the bottom line, probably it is a good idea to ask first :)

THank you
Alberto

-- 
Alberto Simões - Departamento de Informática - Universidade do Minho
                  Campus de Gualtar - 4710-057 Braga - Portugal

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

* Re: Cross Line Search
       [not found] <mailman.4588.1196877162.18990.help-gnu-emacs@gnu.org>
@ 2007-12-05 20:48 ` Joel J. Adamson
  2007-12-06  1:03 ` Johan Bockgård
  1 sibling, 0 replies; 5+ messages in thread
From: Joel J. Adamson @ 2007-12-05 20:48 UTC (permalink / raw)
  To: help-gnu-emacs

Alberto Simões <albie@alfarrabio.di.uminho.pt> writes:

[...]

> Some times (fortunately not all the times) those words are on
> different lines (thus, with a new line in the middle) and the usual
> search method does not find it.
[...]


> The question is: is there any search function to help me on this? I
> know it is probably easy to write it, but as my lisp coding skills are
> near the bottom line, probably it is a good idea to ask first :)

What you need is a regular expression with a quoted newline (quoted in
the sense of a keystroke, not in the Lisp sense).  Something like

\([ 
]\)\(regular\)\1\(expression\)\1

will match "regular expression" or "regular expression" in Regexp
I-search (M-C-s, M-C-Sh-% for query-replace-regexp).  In the square
brackets, I inserted a newline with the key sequence "C-q C-j" The "C-q"
quotes the "C-j" so that it's interpreted as a newline.

HTH

Joel
-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109

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

* Re: Cross Line Search
       [not found] <mailman.4588.1196877162.18990.help-gnu-emacs@gnu.org>
  2007-12-05 20:48 ` Cross Line Search Joel J. Adamson
@ 2007-12-06  1:03 ` Johan Bockgård
  2007-12-06 22:01   ` Alberto Simões
  1 sibling, 1 reply; 5+ messages in thread
From: Johan Bockgård @ 2007-12-06  1:03 UTC (permalink / raw)
  To: help-gnu-emacs

Alberto Simões <albie@alfarrabio.di.uminho.pt> writes:

> When I am reviewing a document and trying to find the paragraph where
> I wrote something, I try to search for a sequence of words. Some times
> (fortunately not all the times) those words are on different lines
> (thus, with a new line in the middle) and the usual search method does
> not find it.

(info "(emacs) Word Search")

-- 
Johan Bockgård

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

* Re: Cross Line Search
  2007-12-06  1:03 ` Johan Bockgård
@ 2007-12-06 22:01   ` Alberto Simões
  2007-12-06 22:07     ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 5+ messages in thread
From: Alberto Simões @ 2007-12-06 22:01 UTC (permalink / raw)
  To: Johan Bockgård; +Cc: help-gnu-emacs

Johan Bockgård wrote:
> Alberto Simões <albie@alfarrabio.di.uminho.pt> writes:
> 
>> When I am reviewing a document and trying to find the paragraph where
>> I wrote something, I try to search for a sequence of words. Some times
>> (fortunately not all the times) those words are on different lines
>> (thus, with a new line in the middle) and the usual search method does
>> not find it.
> 
> (info "(emacs) Word Search")

Thanks
I always forget to RTFM :)

Cheers
ambs

-- 
Alberto Simões - Departamento de Informática - Universidade do Minho
                  Campus de Gualtar - 4710-057 Braga - Portugal

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

* Re: Cross Line Search
  2007-12-06 22:01   ` Alberto Simões
@ 2007-12-06 22:07     ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2007-12-06 22:07 UTC (permalink / raw)
  Cc: Emacs Devel, Johan Bockgård

Alberto Simões wrote:
> Johan Bockgård wrote:
>> Alberto Simões <albie@alfarrabio.di.uminho.pt> writes:
>>
>>> When I am reviewing a document and trying to find the paragraph where
>>> I wrote something, I try to search for a sequence of words. Some times
>>> (fortunately not all the times) those words are on different lines
>>> (thus, with a new line in the middle) and the usual search method does
>>> not find it.
>>
>> (info "(emacs) Word Search")
> 
> Thanks
> I always forget to RTFM :)
> 
> Cheers
> ambs

This feature seems a bit hidden IMO. Would it not be good if it were in 
the menus under

   Edit - Search - Word Search Forward/Backward

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

end of thread, other threads:[~2007-12-06 22:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.4588.1196877162.18990.help-gnu-emacs@gnu.org>
2007-12-05 20:48 ` Cross Line Search Joel J. Adamson
2007-12-06  1:03 ` Johan Bockgård
2007-12-06 22:01   ` Alberto Simões
2007-12-06 22:07     ` Lennart Borgman (gmail)
2007-12-05 17:52 Alberto Simões

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.