GNU bug report logs - #13687
24.3.50; `read-regexp' should provide regex for symbol at point as defaults

Previous Next

Package: emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Mon, 11 Feb 2013 06:30:02 UTC

Severity: wishlist

Found in version 24.3.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> jurta.org>
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: 13687 <at> debbugs.gnu.org
Subject: Re: bug#13687: 24.3.50;
	`read-regexp' should provide regex for symbol at point as defaults
Date: Tue, 12 Feb 2013 19:50:29 +0200
> Spun from
>
>         http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11095

Thanks for creating a separate request.

What I mostly meant in http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11095#20
is that currently `isearch-highlight-regexp' doesn't propagate
the search string to hi-lock as a symbol-matching regexp correctly.
I proposed to relegate this problem to hi-lock by creating a new
command `highlight-symbol' that would turn its plain string argument
into a symbol-matching regexp.

> `read-regexp' should provide regex for symbol at point as one of the
> defaults.  This should be the first of defaults while in any of the
> progmodes.
>
> I provided a patch which can be seen here:
> http://debbugs.gnu.org/cgi/bugreport.cgi?msg=32;filename=bug11095-r110503.diff;att=4;bug=11095
>
> The key thing to note is this:
>
> 1. `find-tag-default' (when find-tag-default-function is nil) will pick
>     up the symbol at point.
>
> 2. When tag is picked as above, surround it with beginning/end-of-symbol
>    regexp delimiters and add it to defaults.

The advantage of your proposal is that when the user doesn't
need symbol delimiters, it's easy to delete them.  This is easier
than to add symbol delimiters in case when the user needs them.




This bug report was last modified 12 years and 68 days ago.

Previous Next


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