bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11381: 23.3; isearch-search-and-update issue?


From: Juri Linkov
Subject: bug#11381: 23.3; isearch-search-and-update issue?
Date: Tue, 01 May 2012 12:03:41 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (x86_64-pc-linux-gnu)

> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]