From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: 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 Organization: JURTA Message-ID: <87bobpxvyy.fsf@mail.jurta.org> References: <87r4kn5ppo.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1360691993 12374 80.91.229.3 (12 Feb 2013 17:59:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Feb 2013 17:59:53 +0000 (UTC) Cc: 13687@debbugs.gnu.org To: Jambunathan K Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 12 19:00:13 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U5K9H-0008WV-88 for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Feb 2013 19:00:07 +0100 Original-Received: from localhost ([::1]:37216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5K8y-0004GC-1S for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Feb 2013 12:59:48 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5K8r-0003zY-Hd for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2013 12:59:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5K8m-0007RD-Dd for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2013 12:59:41 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5K8m-0007R2-AE for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2013 12:59:36 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U5K9C-00023P-Lq for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2013 13:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Feb 2013 18:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13687-submit@debbugs.gnu.org id=B13687.13606919927841 (code B ref 13687); Tue, 12 Feb 2013 18:00:02 +0000 Original-Received: (at 13687) by debbugs.gnu.org; 12 Feb 2013 17:59:52 +0000 Original-Received: from localhost ([127.0.0.1]:52521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5K90-00022G-A4 for submit@debbugs.gnu.org; Tue, 12 Feb 2013 12:59:51 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:36639 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5K8x-000220-RH for 13687@debbugs.gnu.org; Tue, 12 Feb 2013 12:59:48 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 07B31201C9F033; Tue, 12 Feb 2013 09:59:19 -0800 (PST) In-Reply-To: <87r4kn5ppo.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 11 Feb 2013 11:58:35 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71108 Archived-At: > 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.