all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: jadamson@partners.org (Joel J. Adamson)
To: help-gnu-emacs@gnu.org
Subject: Re: Cross Line Search
Date: Wed, 05 Dec 2007 15:48:51 -0500	[thread overview]
Message-ID: <87tzmw27gs.fsf@W0053328.mgh.harvard.edu> (raw)
In-Reply-To: mailman.4588.1196877162.18990.help-gnu-emacs@gnu.org

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

       reply	other threads:[~2007-12-05 20:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4588.1196877162.18990.help-gnu-emacs@gnu.org>
2007-12-05 20:48 ` Joel J. Adamson [this message]
2007-12-06  1:03 ` Cross Line Search 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tzmw27gs.fsf@W0053328.mgh.harvard.edu \
    --to=jadamson@partners.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.