From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: isearch in Dired Date: Tue, 29 Jul 2008 18:45:00 +0300 Organization: JURTA Message-ID: <87zlo0lnvf.fsf@jurta.org> References: <874pjaiv45.fsf@gmail.com> <87lkclekep.fsf@jurta.org> <87r69k2vcw.fsf_-_@jurta.org> <87abg6ajlr.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1217346770 13064 80.91.229.12 (29 Jul 2008 15:52:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jul 2008 15:52:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 29 17:53:40 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KNrW5-0004w0-A6 for ged-emacs-devel@m.gmane.org; Tue, 29 Jul 2008 17:53:37 +0200 Original-Received: from localhost ([127.0.0.1]:39045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNrVB-0007YX-4z for ged-emacs-devel@m.gmane.org; Tue, 29 Jul 2008 11:52:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KNrV4-0007Xt-PB for emacs-devel@gnu.org; Tue, 29 Jul 2008 11:52:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KNrV3-0007XZ-EC for emacs-devel@gnu.org; Tue, 29 Jul 2008 11:52:34 -0400 Original-Received: from [199.232.76.173] (port=40734 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNrV3-0007XW-8M for emacs-devel@gnu.org; Tue, 29 Jul 2008 11:52:33 -0400 Original-Received: from smtp-out.neti.ee ([194.126.126.37]:56344) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KNrV2-0008Iv-S2 for emacs-devel@gnu.org; Tue, 29 Jul 2008 11:52:33 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by MXR-13.estpak.ee (Postfix) with ESMTP id 9C778269E6; Tue, 29 Jul 2008 18:52:30 +0300 (EEST) X-Virus-Scanned: amavisd-new at !change-mydomain-variable!.example.com Original-Received: from smtp-out.neti.ee ([127.0.0.1]) by localhost (MXR-1.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z7BaJoe7C-8h; Tue, 29 Jul 2008 18:52:28 +0300 (EEST) Original-Received: from Relayhost1.neti.ee (Relayhost1 [88.196.174.141]) by MXR-13.estpak.ee (Postfix) with ESMTP id BE58127578; Tue, 29 Jul 2008 18:52:28 +0300 (EEST) Original-Received: from mail.estpak.ee (66.132.191.90.dyn.estpak.ee [90.191.132.66]) by Relayhost1.neti.ee (Postfix) with ESMTP id 55F5A2A47F3; Tue, 29 Jul 2008 18:52:29 +0300 (EEST) In-Reply-To: <87abg6ajlr.fsf@jurta.org> (Juri Linkov's message of "Fri, 25 Jul 2008 03:33:04 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:101694 Archived-At: >> The other comment I have is that I'd like to be able to toggle the kind >> of search from within isearch. Currently within `isearch', we have M-c, >> M-r to toggle the case sensitivity and the use of regexps, and it would >> make sense to provide additional such toggles for "word search" (tho it >> might rather be folded into the regexp-toggle since there are really >> only 3 possible states, not 4), and (in dired buffers) toggle-filename >> and in some other buffers, other such things would make sense. >> We should come up with a prefix key in isearch to replace M-c and M-r >> and to give us space for extra toggles. > > Such a prefix already exists in Isearch, so we could use `M-s f' to > toggle filename-only Isearch. I see that it is better to implement this in isearch.el to toggle the effect of the variable `isearch-success-function' but for a general solution we need a general function name for the letter "f". It seems a good name is "field" since it narrows the search to a set of fields where one particular case is Dired file names. Then a new function `isearch-toggle-fields' bound to `M-s f' in Isearch mode will toggle the search restricted to fields/filenames. -- Juri Linkov http://www.jurta.org/emacs/