all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Ernesto Alfonso <erjoalgo@gmail.com>
Cc: 23005@debbugs.gnu.org
Subject: bug#23005: 24.4; regexp replace evaluating replacements in incorrect order
Date: Mon, 29 Jul 2019 14:59:21 +0200	[thread overview]
Message-ID: <87o91d809i.fsf@mouse.gnus.org> (raw)
In-Reply-To: <CAOckuXAxGOZkbX=fdwAwyM3W9qoueJpxG+ht_zpPKHtaHa_C+A@mail.gmail.com> (Ernesto Alfonso's message of "Sun, 13 Mar 2016 17:17:16 -0700")

Ernesto Alfonso <erjoalgo@gmail.com> writes:

> when using replace-regexp with both expressions (ie \,) and simple
> string replacements (ie \?), the expression replacement is evaluated
> first, even if it comes after the \? replacement.
>
> Example:
>
> Replace regexp (default '.*?', *'.*' -> '\?', '\,(read-string "silly
> expression")'):
>
> the (read-string "silly expression") is evaluated before the first "\?".

I'm not sure this is a bug -- the doc string doesn't say anything about
the order these things are done in.  On the other hand, it doesn't seem
very useful to do the evaluation first.  If the evaluation could return
things like \&, then perhaps doing it first would be useful...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2019-07-29 12:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14  0:17 bug#23005: 24.4; regexp replace evaluating replacements in incorrect order Ernesto Alfonso
2019-07-29 12:59 ` Lars Ingebrigtsen [this message]

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=87o91d809i.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=23005@debbugs.gnu.org \
    --cc=erjoalgo@gmail.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.