GNU bug report logs - #15836
24.3; query-replace-regexp does not detect incorrect usage of \#

Previous Next

Package: emacs;

Reported by: Marcin Kasperski <Marcin.Kasperski <at> softax.com.pl>

Date: Fri, 8 Nov 2013 16:49:02 UTC

Severity: wishlist

Found in version 24.3

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Marcin Kasperski <Marcin.Kasperski <at> mekk.waw.pl>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Glenn Morris <rgm <at> gnu.org>, 15836 <at> debbugs.gnu.org, Marcin Kasperski <Marcin.Kasperski <at> softax.com.pl>
Subject: bug#15836: 24.3; query-replace-regexp does not detect incorrect usage of \#
Date: Wed, 13 Nov 2013 21:34:58 +0100
"Error evaluating replacement expression: ... " would be a bit better,
it would point toward replacement expression as something suspicious.


On Sat, Nov 9, 2013 at 12:15 AM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
>> Hmm, perhaps replace-eval-replacement could temporarily bind
>> the function definition of replace-count to some informative error
>> message ("\# used in function context")?
>
> Sorry, I don't like this idea.  Much too specific to the particular way
> the user screwed up.
>
> I guess we could byte-compile the expression, which would give the user
> actual warnings about his code before running it, but I'm afraid this
> medicine would be worse than the disease.
>
> Another approach would be to refrain from substituting \# and
> instead to let-bind it during the evaluation.
>
>
>         Stefan




This bug report was last modified 11 years and 182 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.