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#11381: 23.3; isearch-search-and-update issue? Date: Tue, 01 May 2012 12:03:41 +0300 Organization: JURTA Message-ID: <87ipgggtmw.fsf@mail.jurta.org> References: <4F9DC154.2000605@groveronline.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1335864168 11952 80.91.229.3 (1 May 2012 09:22:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 1 May 2012 09:22:48 +0000 (UTC) Cc: 11381@debbugs.gnu.org To: Andy Grover Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 01 11:22:46 2012 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 1SP9IB-0008Pa-K9 for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 May 2012 11:22:43 +0200 Original-Received: from localhost ([::1]:59350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SP9IA-0007ZY-Tp for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 May 2012 05:22:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SP9I7-0007Vi-BK for bug-gnu-emacs@gnu.org; Tue, 01 May 2012 05:22:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SP9I5-0004I2-FT for bug-gnu-emacs@gnu.org; Tue, 01 May 2012 05:22:38 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SP9I5-0004Hq-CD for bug-gnu-emacs@gnu.org; Tue, 01 May 2012 05:22:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SP9JS-0005uL-Um for bug-gnu-emacs@gnu.org; Tue, 01 May 2012 05:24:02 -0400 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, 01 May 2012 09:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11381 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11381-submit@debbugs.gnu.org id=B11381.133586424022690 (code B ref 11381); Tue, 01 May 2012 09:24:02 +0000 Original-Received: (at 11381) by debbugs.gnu.org; 1 May 2012 09:24:00 +0000 Original-Received: from localhost ([127.0.0.1]:60401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SP9JP-0005tu-QW for submit@debbugs.gnu.org; Tue, 01 May 2012 05:24:00 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:54360 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SP9JM-0005te-EG for 11381@debbugs.gnu.org; Tue, 01 May 2012 05:23:57 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id A1A95451C9C8; Tue, 1 May 2012 02:22:27 -0700 (PDT) In-Reply-To: <4F9DC154.2000605@groveronline.com> (Andy Grover's message of "Sun, 29 Apr 2012 15:31:48 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.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 (newer, 2) 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:59670 Archived-At: > Hi I'm trying to use the following macro as defined on the emacs wiki: > > http://emacswiki.org/emacs/SearchAtPoint#toc10 Looking at how this page presents 12 ways to invent the wheel, the question arises: why not help people with some basic functionality in isearch.el that could be used to build commands that will work reliably and without such problems as reported by this bug report. ISTM, what people are trying to achieve can be divided into the three wishes: 1. Start Isearch with an initial search string, such as the word/symbol at point. One way would be to add a new argument to all commands that start Isearch. But the drawback is that there are too many such commands (isearch-forward, isearch-backward, isearch-forward-regexp etc.) A better method is to add a global variable e.g. `isearch-string-initial' that will allow the user to define the initial search string. 2. Yank a thing at point to the search string (mostly a symbol/identifier). This means adding more yanking commands to accompany the existing `isearch-yank-word', `isearch-yank-word-or-char', etc. 3. Add a new search type for symbol/identifier, similar to word search. First we could try to reuse the existing `isearch-word'. Currently `word-search-regexp' converts the search string to a regular expression with \b at word boundaries. For a symbol/identifier it could add \_< and \_> at symbol boundaries.