unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jim Dai <jgjimdai_p@yahoo.com>
Subject: Re: Regexp replacement
Date: Fri, 27 Oct 2006 21:16:22 -0400	[thread overview]
Message-ID: <C16827A6.135%jgjimdai_p@yahoo.com> (raw)
In-Reply-To: 85iri5nzt0.fsf@lola.goethe.zz

Hmm, I missed \( \) and \1 combination in my own try.

How can create a key-binding such as C-c C-r in LaTeX mode? Thanks.
Jim



On 10/27/06 6:45 PM, in article 85iri5nzt0.fsf@lola.goethe.zz, "David
Kastrup" <dak@gnu.org> wrote:

> Jim Dai <jgjimdai_p@yahoo.com> writes:
> 
>> I would like to delete \redtext{long text} with "long text" being kept.
>> I have any instances in a file, with "long text" varying that may include
>> other latex symbols like _ $. (assume there are not any {} pairs inside the
>> text.
>> 
>> How can I use regexp replacement to achieve the desired changes?
> 
> M-x query-replace-regexp RET \\redtext{\([^}]*\)} RET \1 RET

  reply	other threads:[~2006-10-28  1:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-27 22:37 Regexp replacement Jim Dai
2006-10-27 22:45 ` David Kastrup
2006-10-28  1:16   ` Jim Dai [this message]
2006-10-28  7:09     ` David Kastrup
2006-10-28  7:36       ` Ralf Angeli
2006-10-28 19:11   ` Jim Dai
2006-10-28 23:44     ` David Kastrup
2006-10-29 20:10       ` Jim Dai

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=C16827A6.135%jgjimdai_p@yahoo.com \
    --to=jgjimdai_p@yahoo.com \
    /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.
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).