unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dani Moncayo <dmoncayo@gmail.com>
To: Juri Linkov <juri@jurta.org>
Cc: 17533@debbugs.gnu.org
Subject: bug#17533: 24.4.50; Word Isearch bug
Date: Wed, 21 May 2014 12:50:17 +0200	[thread overview]
Message-ID: <CAH8Pv0ju1Rb_oPs5o8i8nmdZjyBZ6x4LWsKpn+jmZa4CrSD9Dw@mail.gmail.com> (raw)
In-Reply-To: <CAH8Pv0jx9_MBSFkJnqR6YweeA4q92-+V61FzXfzTAmWfEukjzw@mail.gmail.com>

On Wed, May 21, 2014 at 12:07 PM, Dani Moncayo <dmoncayo@gmail.com> wrote:
>> In word search mode, non-word characters are interpreted as whitespace.
>
> IMO, that rule should have an exception: the characters in the current
> search string should be interpreted as word characters (for the
> purpose of the search), because IMO, what the user wants is to search
> for occurrences of _that_ string (regardless of the type of its
> characters), where the _surrounding_ characters are non-words.

Though admittedly, it's a bit odd to put non-word characters in a
word-type Isearch.

My use case is this: I was editing a C source code file, which had
things like: "pointer->foo", "pointer->foobar", and also stand-alone
variables "foo" and "foobar".

I wanted to find only the occurrences of "pointer->foo", so I tried to
do a word-type Isearch with "->foo" as search string.

Therefore, I think that I intuitively expected the following behavior
for word-type Isearch: find matches of (literally) the search string
which have a "change in type of character" in its boundaries, i.e.:

1. If the first character in my search string is word-type, its
previous character in the buffer must be non-word-type (and vice-versa).

2. If the last character in my search string is word-type, its
following character in the buffer must be non-word-type (and vice-versa).



-- 
Dani Moncayo





  reply	other threads:[~2014-05-21 10:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20  8:30 bug#17533: 24.4.50; Word Isearch bug Dani Moncayo
2014-05-20 21:21 ` Juri Linkov
2014-05-21 10:07   ` Dani Moncayo
2014-05-21 10:50     ` Dani Moncayo [this message]
2014-05-21 13:07       ` Dani Moncayo
2014-05-21 15:59   ` Dani Moncayo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH8Pv0ju1Rb_oPs5o8i8nmdZjyBZ6x4LWsKpn+jmZa4CrSD9Dw@mail.gmail.com \
    --to=dmoncayo@gmail.com \
    --cc=17533@debbugs.gnu.org \
    --cc=juri@jurta.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).