* bug#13687: 24.3.50; `read-regexp' should provide regex for symbol at point as defaults
@ 2013-02-11 6:28 Jambunathan K
2013-02-12 17:50 ` Juri Linkov
2013-02-15 15:41 ` Stefan Monnier
0 siblings, 2 replies; 5+ messages in thread
From: Jambunathan K @ 2013-02-11 6:28 UTC (permalink / raw)
To: 13687
Spun from
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11095
`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.
In GNU Emacs 24.3.50.3 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2013-02-11 on debian-6.05
Bzr revision: 111730 rgm@gnu.org-20130211015045-19w1ceor0tkfxc8q
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
System Description: Debian GNU/Linux 6.0.5 (squeeze)
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#13687: 24.3.50; `read-regexp' should provide regex for symbol at point as defaults
2013-02-11 6:28 bug#13687: 24.3.50; `read-regexp' should provide regex for symbol at point as defaults Jambunathan K
@ 2013-02-12 17:50 ` Juri Linkov
2013-02-15 15:41 ` Stefan Monnier
1 sibling, 0 replies; 5+ messages in thread
From: Juri Linkov @ 2013-02-12 17:50 UTC (permalink / raw)
To: Jambunathan K; +Cc: 13687
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#13687: 24.3.50; `read-regexp' should provide regex for symbol at point as defaults
2013-02-11 6:28 bug#13687: 24.3.50; `read-regexp' should provide regex for symbol at point as defaults Jambunathan K
2013-02-12 17:50 ` Juri Linkov
@ 2013-02-15 15:41 ` Stefan Monnier
2013-02-16 9:31 ` Jambunathan K
1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2013-02-15 15:41 UTC (permalink / raw)
To: Jambunathan K; +Cc: 13687
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11095
> `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 disagree: read-regexp is a generic function which can be used in
various contexts, some of which might not care at all about the text
around point. So the caller should have control over the first default
(of course, it's perfectly fine to always add the current tag in the
subsequent defaults).
This said your patch seems to leave the caller's provided `defaults' at
the beginning of the minibuffer's `defaults', so I think your patch is
fine, feel free to install it.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#13687: 24.3.50; `read-regexp' should provide regex for symbol at point as defaults
2013-02-15 15:41 ` Stefan Monnier
@ 2013-02-16 9:31 ` Jambunathan K
2013-02-16 14:28 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Jambunathan K @ 2013-02-16 9:31 UTC (permalink / raw)
To: 13687
> This said your patch seems to leave the caller's provided `defaults' at
> the beginning of the minibuffer's `defaults', so I think your patch is
> fine, feel free to install it.
See revno: 111803
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#13687: 24.3.50; `read-regexp' should provide regex for symbol at point as defaults
2013-02-16 9:31 ` Jambunathan K
@ 2013-02-16 14:28 ` Stefan Monnier
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2013-02-16 14:28 UTC (permalink / raw)
To: Jambunathan K; +Cc: 13687-done
>> This said your patch seems to leave the caller's provided `defaults' at
>> the beginning of the minibuffer's `defaults', so I think your patch is
>> fine, feel free to install it.
> See revno: 111803
Thanks.
You can close bugs simply by sending your email to
"NNN-done@debbugs...", as I'm doing with this one.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-02-16 14:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-11 6:28 bug#13687: 24.3.50; `read-regexp' should provide regex for symbol at point as defaults Jambunathan K
2013-02-12 17:50 ` Juri Linkov
2013-02-15 15:41 ` Stefan Monnier
2013-02-16 9:31 ` Jambunathan K
2013-02-16 14:28 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).