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: Sat, 08 Nov 2008 19:27:17 +0200 Organization: JURTA Message-ID: <87k5begll7.fsf@jurta.org> References: <87skq2xq9s.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226166417 5341 80.91.229.12 (8 Nov 2008 17:46:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Nov 2008 17:46:57 +0000 (UTC) Cc: Chong Yidong , rms@gnu.org, emacs-devel@gnu.org To: joakim@verona.se Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 08 18:47:59 2008 connect(): Connection refused 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 1KyruY-00060o-Mg for ged-emacs-devel@m.gmane.org; Sat, 08 Nov 2008 18:47:51 +0100 Original-Received: from localhost ([127.0.0.1]:44018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KyrtP-0001SB-TA for ged-emacs-devel@m.gmane.org; Sat, 08 Nov 2008 12:46:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KyrtM-0001S4-RV for emacs-devel@gnu.org; Sat, 08 Nov 2008 12:46:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KyrtK-0001Rl-FH for emacs-devel@gnu.org; Sat, 08 Nov 2008 12:46:35 -0500 Original-Received: from [199.232.76.173] (port=47328 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KyrtK-0001Rh-9J for emacs-devel@gnu.org; Sat, 08 Nov 2008 12:46:34 -0500 Original-Received: from relay01.kiev.sovam.com ([62.64.120.200]:2366) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KyrtE-0001CP-I5; Sat, 08 Nov 2008 12:46:29 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1Kyrt9-00066C-Us; Sat, 08 Nov 2008 19:46:24 +0200 In-Reply-To: (joakim@verona.se's message of "Sat, 08 Nov 2008 17:05:08 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: 0a21689c2f1d2e94d8aa83f1a1b60733 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 5635 [Nov 08 2008] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: white ip list X-SpamTest-Rate: 10 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.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:105470 Archived-At: > I would also like to point out that searching for filenames is somewhat > similar to searching for function names. That is, the buffer is parsed > and you search for semantic entities of some kind. > > It so happens that Cedet, which is slated for inclusion, contains a tool > called Senator which does this. We are all waiting for inclusion of Cedet to Emacs, but I want to note that Isearch in Emacs now has much cleaner infrastructure for searching function names, where everything is necessary to do is just to define a hook like: (set (make-local-variable 'isearch-success-function) (lambda (mb me) (save-match-data (let ((re (cdr (assoc nil imenu-generic-expression)))) (and (save-excursion (beginning-of-line) (looking-at (car re))) (>= mb (match-beginning (cadr re))) (<= me (match-end (cadr re)))))))) The only problem is to find a good keybinding to start function name isearch. Maybe take the same keybinding as used by Senator, or the same keybinding used by Dired filename isearch `M-s f C-s' where `f' could mean `function name'? -- Juri Linkov http://www.jurta.org/emacs/