GNU bug report logs - #52558
Option for easier typing of regexps

Previous Next

Package: emacs;

Reported by: ndame <laszlomail <at> protonmail.com>

Date: Thu, 16 Dec 2021 17:42:01 UTC

Severity: wishlist

Tags: moreinfo

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #66 received at 52558 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: laszlomail <at> protonmail.com, 52558 <at> debbugs.gnu.org
Subject: Re: bug#52558: Option for easier typing of regexps
Date: Tue, 28 Dec 2021 22:21:02 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Date: Tue, 28 Dec 2021 21:15:32 +0200
> Cc: 52558 <at> debbugs.gnu.org
> 
> >> (setq replace-regexp-function
> >
> > And additional change is needed for correct highlighting:
> >
> > @@ -2690,7 +2693,8 @@ replace-highlight
> > +	    (isearch-regexp-function (or replace-regexp-function
> 
> This is pushed to master, so now it's possible to provide a custom
> regexp converter for search and replace using isearch-regexp-function
> and replace-regexp-function.

Thanks, but the doc string of the new function is hard to understand:

> +(defvar replace-regexp-function nil
> +  "Function to convert a search string to a regexp to replace.
> +It's bound to `isearch-regexp-function' when searching
> +for a string to replace.")

The first sentence is unclear: what do you mean by "convert a search
string to a regexp to replace"?  What "search string" is being
converted to regexp, and how does "replace" enter this picture?

And this:

  It's bound to `isearch-regexp-function' when searching

seems to be incorrect: it's isearch-regexp-function that's bound to
replace-regexp-function, not the other way around.

Can you clarify the doc string, please?




This bug report was last modified 3 years and 118 days ago.

Previous Next


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