From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tomer Newsgroups: gmane.emacs.help Subject: Re: hook for search next Date: Wed, 6 May 2009 23:47:29 -0700 (PDT) Organization: http://groups.google.com Message-ID: <883be5cc-7274-4fdd-99b7-5d15084b6887@z7g2000vbh.googlegroups.com> References: <91378974-2201-4c28-adfd-76b9c99f5825@e20g2000vbc.googlegroups.com> <67849fff-b9df-4d8e-997e-63407fdce22b@g20g2000vba.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1241682095 9219 80.91.229.12 (7 May 2009 07:41:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 May 2009 07:41:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 07 09:41:25 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M1yEN-0005Xf-UU for geh-help-gnu-emacs@m.gmane.org; Thu, 07 May 2009 09:41:24 +0200 Original-Received: from localhost ([127.0.0.1]:50156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1yEN-0001yj-EO for geh-help-gnu-emacs@m.gmane.org; Thu, 07 May 2009 03:41:23 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!z7g2000vbh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 57 Original-NNTP-Posting-Host: 212.143.17.66 Original-X-Trace: posting.google.com 1241678849 17941 127.0.0.1 (7 May 2009 06:47:29 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 7 May 2009 06:47:29 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z7g2000vbh.googlegroups.com; posting-host=212.143.17.66; posting-account=NuEtcAoAAADUxiHpeF0Pumy7gc4ekCfm User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SIMBAR={5B3B1BCD-ECFF-4c68-864B-DCAF4127277B}),gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:168945 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64215 Archived-At: On May 6, 5:52=A0pm, Kevin Rodgers wrote: > tomer wrote: > > On May 5, 3:40 pm, Kevin Rodgers wrote: > >> tomer wrote: > >>> i want to print message after each search (ctrl-s) in search-minor > >>> mode.Is it possilbe to hook for this purpose? > >>> Is there other way other than hook? > >>> it is very important. > >> ,----[ C-h v isearch-mode-end-hook RET ] > >> | isearch-mode-end-hook is a variable defined in `isearch.el'. > >> | Its value is nil > >> | > >> | > >> | Documentation: > >> | Function(s) to call after terminating an incremental search. > >> | When these functions are called, `isearch-mode-end-hook-quit' > >> | is non-nil if the user quit the search. > >> | > >> | [back] > >> `---- > > >> -- > >> Kevin Rodgers > >> Denver, Colorado, USA > > > Thanks for the answer, > > I knew that hooks, these hook are only in the end of the search. > > I need a hook each time a new search is found (each time pressing ctrl > > +s in isearch mode). > > Is it possbile? > > Try after-advising isearch-search and check isearch-success. > > -- > Kevin Rodgers > Denver, Colorado, USA- Hide quoted text - > > - Show quoted text - Thanks a lot I have succeed in other way , but i will try this also. here is my solution: (defun tl-isearch-start() (if (eq major-mode 'specman-mode) (add-hook 'post-command-hook 'specman-describe-context))) (defun tl-isearch-end() (if (eq major-mode 'specman-mode) (remove-hook 'post-command-hook 'specman-describe-context))) (add-hook 'isearch-mode-hook 'tl-isearch-start) (add-hook 'isearch-mode-end-hook 'tl-isearch-end) Thanks a lot for the help