all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Slass <miknrene@drizzle.com>
Subject: Re: Using re-builder
Date: Fri, 18 Jun 2004 17:08:56 GMT	[thread overview]
Message-ID: <m3vfhon68n.fsf@eric.rossnet.com> (raw)
In-Reply-To: 40D312AC.4070208@yahoo.com

Kevin Rodgers <ihs_4664@yahoo.com> writes:

>Phil_C wrote:
> > Thanks, that just about does it - except the beginning and ending
> > quotes are still there. Still, that's much better than it was before,
> > since now I don't have to go through the whole regex deleting "\"s.
>

That's really strange --- I'm not getting the quotes; in fact, I first
tried (buffer-substring (1+ (point-min)) (1- (point-max))) thinking it
would trim the quotes, and I lost the first and last chars of the RE.

Wierd.

>Well, you could either replace "\\`\"" and "\"\\'" with "", or avoid
>inserting them in the first place:
>
>(let ((regexp (reb-target-binding reb-regexp)))
>   (insert (substring regexp 1 (1- (length regexp)))))
>
>Another approach would be to leave the regexp string in the kill ring,
>but define a new command to yank the regexp itself into the minibuffer.

That's a great idea, but I think it would require a global keybinding
to that new command to be really useful, since you never know where
you're going to want to yank the RE.


>
>And instead of using replace-string to replace "\\\\" with "\\", you
>might be able to get the lisp reader to do it for you (e.g. with
>make-symbol).

Alas, that's deeper in the lisp pool than I can swim.

-- 
Mike Slass

  reply	other threads:[~2004-06-18 17:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-17 17:45 Using re-builder Phil_C
2004-06-17 22:51 ` Michael Slass
2004-06-18 14:35   ` Phil_C
2004-06-18 16:05     ` Kevin Rodgers
2004-06-18 17:08       ` Michael Slass [this message]
2004-06-18 18:54         ` Kevin Rodgers
2004-06-18 20:09           ` Michael Slass
2004-06-18  9:03 ` martin

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=m3vfhon68n.fsf@eric.rossnet.com \
    --to=miknrene@drizzle.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.
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.