[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
word-search toggle for isearch [was: Info-search-isearch]
From: |
Drew Adams |
Subject: |
word-search toggle for isearch [was: Info-search-isearch] |
Date: |
Tue, 12 Dec 2006 08:30:49 -0800 |
Both Juri and Stefan have sent (essentially the same) code for toggling word
search in incremental search:
> From: Juri Linkov Sent: Sunday, October 29, 2006 12:19 PM
> To: address@hidden
> Subject: Re: Info-search-isearch
> (defun isearch-toggle-word ()
> "Toggle word searching on or off."
> (interactive)
> (setq isearch-word (not isearch-word))
> (setq isearch-success t isearch-adjusted t)
> (isearch-update))
>
> and a new keybinding:
> (define-key isearch-mode-map "\M-sw" 'isearch-toggle-word)
> will provide a easier way to toggle on/off incremental word search.
> From: Stefan Monnier Sent: Thursday, November 23, 2006 11:25 AM
> To: address@hidden
> Subject: Re: incremental search
> (defun isearch-toggle-word ()
> "Toggle word searching on or off."
> ;; The status stack is left unchanged.
> (interactive)
> (setq isearch-word (not isearch-word))
> (if isearch-word (setq isearch-regexp nil))
> (setq isearch-success t isearch-adjusted t)
> (isearch-update))
Juri proposed binding this to M-sw. Stefan suggested M-w instead.
Users of most editors expect a simple, quick way to toggle word searching.
How to do this in Emacs is a FAQ. We have even gone to the trouble of
documenting C-s M-e M-w WORD C-s, but we have not added a simple binding for
this.
How about adding this feature (toggle command and binding) to Emacs now?
- word-search toggle for isearch [was: Info-search-isearch],
Drew Adams <=