unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Daniel Colascione <dan.colascione@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: RFC: [PATCH] isearch enhancements: symbol mode; syntactic filtering
Date: Fri, 08 Jul 2011 03:20:20 +0300	[thread overview]
Message-ID: <87liw9mxrh.fsf@mail.jurta.org> (raw)
In-Reply-To: <4E15C0BA.10400@gmail.com> (Daniel Colascione's message of "Thu,  07 Jul 2011 07:20:42 -0700")

> - Syntactic filtering: control whether to match in comments, strings, and
> normal text.

This is easier to implement using `isearch-filter-predicate' as shown in
http://thread.gmane.org/gmane.emacs.devel/34742

Unfortunately, I failed to find a good keybinding for this feature,
so it sunk into obscurity.

> - Symbol search: like word search, but looks only at symbol boundaries

This is much needed.  But I think it should have a keybinding separate
from word search.  Currently, `M-s w' toggles word search,
so a new keybinding `M-s _' could toggle symbol search.

> - One ring: optionally share a search ring between normal and regular
> expression searches. The additional history storage described below allows
> this mode to work reliably.

Maybe sharing a search ring between normal and regexp searches
would be better to implement in the same way as sharing
`from' and `to' histories is implemented in `query-replace'?
Like two variables `query-replace-from-history-variable' and
`query-replace-to-history-variable', isearch could provide
two variables `isearch-ring-variable' and `isearch-regexp-ring-variable'.

> The patch also changes some behavior:
>
> - With the patch, we store isearch state in the history ring alongside the
> actual search strings.  This information allows us to exactly recreate
> searches when we pull them from history.

Yes, storing more information about searches is a good change.

> Other behavior changes
> ----------------------
>
> - Case sensitivity is now displayed alongside other isearch settings in the
> isearch prompt.  Previously, the only indication we gave of case
> sensitivity was a fleeing message displayed briefly each time the user
> toggled the setting.

This is a good change as well, but one possible problem is that
its message string "case-insensitive " (17 characters) is too long
for the isearch prompt.

> - isearch no longer prints "pending". I don't see why this message would
> be useful.

"pending" reminds the user that the actual search position doesn't
correspond to the search parameters displayed in the search prompt.
This happens after e.g. changing the search type to regexp or word.
Updating the search position might be more surprising for users.



  parent reply	other threads:[~2011-07-08  0:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 14:20 RFC: [PATCH] isearch enhancements: symbol mode; syntactic filtering Daniel Colascione
2011-07-07 14:53 ` Lennart Borgman
2011-07-07 20:51 ` Stefan Monnier
2011-07-07 21:39   ` Daniel Colascione
2011-07-08  0:20 ` Juri Linkov [this message]
2011-07-08  0:49   ` Daniel Colascione
2011-07-08 19:27     ` Juri Linkov
2011-07-08  3:23   ` Drew Adams
2011-07-08 13:04     ` Stefan Monnier
2011-07-08 21:05 ` Lennart Borgman
2011-07-08 21:19   ` Drew Adams
2011-07-08 21:50     ` Juri Linkov
2011-07-08 22:34       ` Drew Adams

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=87liw9mxrh.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=dan.colascione@gmail.com \
    --cc=emacs-devel@gnu.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).