all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org
Subject: Re: Word search
Date: Mon, 10 Mar 2008 14:34:35 -0400	[thread overview]
Message-ID: <jwv1w6imnun.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87d4q25w95.fsf_-_@jurta.org> (Juri Linkov's message of "Mon, 10 Mar 2008 19:12:02 +0200")

>>> It also gets rid of all trickery used to read the first character
>>> typed in the minibuffer (that removes another set of problems;
>>> see related old bug reports).  It adds a new backward-compatible
>>> command `isearch-edit-string-set-word' bound to C-w in the minibuffer
>>> that calls `kill-region' when the mark is active, and otherwise does
>>> word search after exiting `isearch-edit-string' (the mark is not active
>>> when `isearch-edit-string' just created the minibuffer, and without
>>> the mark `kill-region' would fail anyway).
>> 
>>> This preserves the behavior described in the Emacs manual:
>> 
>>> `C-s <RET> C-w WORDS <RET>'
>>> Search for WORDS, ignoring details of punctuation.
>> 
>> This seems unrelated, right?

> This is slightly related, but now I see it can be installed with
> a separate patch.

>> It looks like a good change.  But I wonder why we don't use an approach
>> similar to the M-r binding to isearch-toggle-regexp.

> Keeping C-w to specify word search in the minibuffer is necessary
> for backward compatibility.  When we find a better method to toggle
> word search, we could remove the description of the old method
> from the manual, and remove its code in later releases.

Backward compatibility with old elisp packages is important.
Backward compatibility with old Emacs users is a bit less important.

>> Of course, we'd rather not eat yet-another key (e.g. bind M-w to
>> isearch-toggle-word), but maybe we could change isearch-toggle-regexp
>> into isearch-cycle-regexp-word, such that the command cycles between
>> plain/regexp/word searches.

> One disadvantage of M-r is that it's not mnemonic to toggle word search.
> OTOH, it is convenient to cycle between search types.

> We could also add another keybinding to separately toggle only
> word search `M-s w' and regexp search `M-s r'.  Their key sequences are
> longer than `M-r' but they will allow specifying the exact search type.

Using M-s as a prefix might be a good idea.  What do others think?


        Stefan




  reply	other threads:[~2008-03-10 18:34 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-08 14:38 First two elements of search-ring shown twice in minibuffer when using M-p multiple times? Tobias Bading
2008-03-08 15:18 ` Juri Linkov
2008-03-09 21:59   ` Juri Linkov
2008-03-10 14:31     ` Stefan Monnier
2008-03-10 17:12       ` Word search (was: First two elements of search-ring shown twice in minibuffer when using M-p multiple times?) Juri Linkov
2008-03-10 18:34         ` Stefan Monnier [this message]
2008-03-10 22:38           ` Word search Juri Linkov
2008-03-11 18:47             ` Stefan Monnier
2008-03-12  0:35               ` Juri Linkov
2008-03-12  1:49                 ` Stefan Monnier
2008-03-12 10:38                   ` Juri Linkov
2008-03-12 14:09                     ` Stefan Monnier
2008-03-12 17:51                 ` Richard Stallman
2008-03-11 20:24             ` Richard Stallman
2008-03-12  0:37               ` Juri Linkov
2008-03-12 17:51                 ` Richard Stallman
2008-03-13  2:08                   ` Juri Linkov
2008-03-13 22:24                     ` Richard Stallman
2008-03-13 10:55                   ` René Kyllingstad
2008-03-14  1:08                     ` Juri Linkov
2008-03-12 19:18                 ` Drew Adams
2008-03-13  1:06                   ` Richard Stallman
2008-03-13  2:17                   ` Juri Linkov
2008-03-13 22:24                     ` Richard Stallman
2008-03-10 16:36     ` First two elements of search-ring shown twice in minibuffer when using M-p multiple times? Tobias Bading
2008-03-10 16:55       ` Juri Linkov
2008-03-10 17:59     ` isearch-push-state (was: First two elements of search-ring shown twice in minibuffer when using M-p multiple times?) Juri Linkov
2008-03-11 17:55       ` isearch-push-state Stefan Monnier
2008-03-12 10:36         ` isearch-push-state Juri Linkov
2008-03-12 14:07           ` isearch-push-state Stefan Monnier
2008-03-10 18:28     ` First two elements of search-ring shown twice in minibuffer when using M-p multiple times? Juri Linkov
  -- strict thread matches above, loose matches on Subject: below --
2008-03-25  8:13 Word search Vincent Belaïche
2008-03-25 10:24 ` Jason Rumney
2008-03-25 21:48   ` Juri Linkov
2008-03-25 14:12 ` Drew Adams
2008-03-25 14:42 ` Johan Bockgård
2008-03-25 16:43 Vincent Belaïche
2008-03-25 18:02 ` Drew Adams
2008-03-26 20:47 Vincent Belaïche
2008-03-26 21:16 ` Drew Adams
2008-03-30  6:13   ` Vincent Belaïche
2008-03-30  6:45     ` Drew Adams
2008-03-30  7:02       ` Vincent Belaïche
2008-03-30 16:58         ` Drew Adams
2008-03-30 21:59     ` Johan Bockgård

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

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

  git send-email \
    --in-reply-to=jwv1w6imnun.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.