all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* new member
@ 2006-10-05  2:27 minidiapolis
  2006-10-05  2:43 ` Pascal Bourguignon
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: minidiapolis @ 2006-10-05  2:27 UTC (permalink / raw)


Hello, I don't know if I'm in the right group.  I'm a relatively new
user to Emacs and I was wondering how I would do a search and have it
delete the specific text.  if someone could help me out, I would really
appreciate it.  Thanks, Mindy

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

* Re: new member
  2006-10-05  2:27 new member minidiapolis
@ 2006-10-05  2:43 ` Pascal Bourguignon
  2006-10-05 10:58 ` Peter Tury
  2006-10-05 13:09 ` B. T. Raven
  2 siblings, 0 replies; 5+ messages in thread
From: Pascal Bourguignon @ 2006-10-05  2:43 UTC (permalink / raw)


"minidiapolis" <minidiapolis@hotmail.com> writes:

> Hello, I don't know if I'm in the right group.  I'm a relatively new
> user to Emacs and I was wondering how I would do a search and have it
> delete the specific text.  if someone could help me out, I would really
> appreciate it.  Thanks, Mindy

Interactively:    M-x replace-regexp RET <some-regexp> RET RET

Programmatically: (while (re-search-forward "<some-regexp>" nil t)
                     (delete-region (match-beginning) (match-end)))


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

PLEASE NOTE: Some quantum physics theories suggest that when the
consumer is not directly observing this product, it may cease to
exist or will exist only in a vague and undetermined state.

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

* Re: new member
  2006-10-05  2:27 new member minidiapolis
  2006-10-05  2:43 ` Pascal Bourguignon
@ 2006-10-05 10:58 ` Peter Tury
  2006-10-05 11:13   ` Pascal Bourguignon
  2006-10-05 13:09 ` B. T. Raven
  2 siblings, 1 reply; 5+ messages in thread
From: Peter Tury @ 2006-10-05 10:58 UTC (permalink / raw)


"minidiapolis" <minidiapolis@hotmail.com> writes:

> Hello, I don't know if I'm in the right group.  I'm a relatively new
> user to Emacs and I was wondering how I would do a search and have it
> delete the specific text.  if someone could help me out, I would really
> appreciate it.  Thanks, Mindy

Yes, you are in the right group!

Emacs is said to be (among others) a "self documenting" editor. This
is, in fact rather close to reality. I personally would recommend to
every new user to install a relatively new version (what contains the
full documentation by default) and start using C-h.

E.g. in your case:
* C-h i -> opens the documentation (Info)
* don't forget to read the "intro" on the top of the page: it describes
  the most basic keys in an info window
* go to "Emacs" (second link) (and Enter)
* go to Concept Index
* search for "replace": C-s replace
* repeat C-s until you find what you need. In this case it can be:
"* global substitution:                   Replace."
Here (chapter 20.9) you see how to query replace, regexp replace, etc...

Well, you already need some Emacs-specific keys for these steps, but you
will remember them quite soon ;-)

You can check what a key would do by:
C-h k <here do the key sequence or mouse event>

C-h b shows all usable keys in the active window.

And C-x k closes ("kills") the unnecessary windows...

Br,
P

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

* Re: new member
  2006-10-05 10:58 ` Peter Tury
@ 2006-10-05 11:13   ` Pascal Bourguignon
  0 siblings, 0 replies; 5+ messages in thread
From: Pascal Bourguignon @ 2006-10-05 11:13 UTC (permalink / raw)


Peter Tury <tury.peter@gmail.com> writes:

> "minidiapolis" <minidiapolis@hotmail.com> writes:
>
>> Hello, I don't know if I'm in the right group.  I'm a relatively new
>> user to Emacs and I was wondering how I would do a search and have it
>> delete the specific text.  if someone could help me out, I would really
>> appreciate it.  Thanks, Mindy
>
> Yes, you are in the right group!
>
> Emacs is said to be (among others) a "self documenting" editor. This
> is, in fact rather close to reality. I personally would recommend to
> every new user to install a relatively new version (what contains the
> full documentation by default) and start using C-h.

Well, first   C-h t    for the tutorial where replace-string is mentionned.

> E.g. in your case:
> * C-h i -> opens the documentation (Info)
> * don't forget to read the "intro" on the top of the page: it describes
>   the most basic keys in an info window
> * go to "Emacs" (second link) (and Enter)
> * go to Concept Index
> * search for "replace": C-s replace
> * repeat C-s until you find what you need. In this case it can be:
> "* global substitution:                   Replace."
> Here (chapter 20.9) you see how to query replace, regexp replace, etc...
>
> Well, you already need some Emacs-specific keys for these steps, but you
> will remember them quite soon ;-)
>
> You can check what a key would do by:
> C-h k <here do the key sequence or mouse event>
>
> C-h b shows all usable keys in the active window.
>
> And C-x k closes ("kills") the unnecessary windows...
>
> Br,
> P

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

WARNING: This product attracts every other piece of matter in the
universe, including the products of other manufacturers, with a
force proportional to the product of the masses and inversely
proportional to the distance between them.

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

* Re: new member
  2006-10-05  2:27 new member minidiapolis
  2006-10-05  2:43 ` Pascal Bourguignon
  2006-10-05 10:58 ` Peter Tury
@ 2006-10-05 13:09 ` B. T. Raven
  2 siblings, 0 replies; 5+ messages in thread
From: B. T. Raven @ 2006-10-05 13:09 UTC (permalink / raw)



"minidiapolis" <minidiapolis@hotmail.com> wrote in message
news:1160015257.268170.235270@c28g2000cwb.googlegroups.com...
> Hello, I don't know if I'm in the right group.  I'm a relatively new
> user to Emacs and I was wondering how I would do a search and have it
> delete the specific text.  if someone could help me out, I would really
> appreciate it.  Thanks, Mindy
>

Pascal has already given you the most general solution to your problem,
but if you don't want to get into regular expressions yet and if you
haven't changed the default, out-of-the-box key assignments, then just do:

M-< (press Alt-Shift-< at the same time to go to beginning of buffer)
M-% (press Alt-Shift-% at the same time) and see
Query Replace: [Here type the text to be deleted]
Query Replace [text] with: [Here press Return (Enter)]
Press space bar at every instance of [text] to be deleted and N for those
instances to be retained.
If after deleting a few instances you are sure you want to delete all the
rest, just press Shift-!

Ed

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

end of thread, other threads:[~2006-10-05 13:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-05  2:27 new member minidiapolis
2006-10-05  2:43 ` Pascal Bourguignon
2006-10-05 10:58 ` Peter Tury
2006-10-05 11:13   ` Pascal Bourguignon
2006-10-05 13:09 ` B. T. Raven

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.