From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier " Newsgroups: gmane.emacs.help Subject: Re: placing cursor at *start* of match in incremental search Date: 22 Jan 2003 15:49:01 -0500 Organization: Yale University Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <5ln0lsap1e.fsf@rum.cs.yale.edu> References: <3E2D7F8E.1050205@ihs.com> <3E2ED36A.4080003@ihs.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1043268718 21280 80.91.224.249 (22 Jan 2003 20:51:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 22 Jan 2003 20:51:58 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18bRqm-0005Wo-00 for ; Wed, 22 Jan 2003 21:51:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18bRpk-0005dO-00 for gnu-help-gnu-emacs@m.gmane.org; Wed, 22 Jan 2003 15:50:52 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!logbridge.uoregon.edu!news.ycc.yale.edu!rum.cs.yale.edu!rum.cs.yale.edu Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-NNTP-Posting-Host: rum.cs.yale.edu User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-Original-NNTP-Posting-Host: rum.cs.yale.edu X-Original-Trace: 22 Jan 2003 15:49:01 -0500, rum.cs.yale.edu Original-Xref: shelby.stanford.edu gnu.emacs.help:109362 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5884 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5884 >>>>> "Greg" == Greg Hill writes: > Incidentally, Maciej, when you are experimenting with different versions of > anonymous (lambda) functions as hooks in the same Emacs session, don't > forget to explicitly remove any old versions of the function from the hook > variable, or you will end up executing more that one version and wondering > why the new one you just added doesn't seem to work the way it should. To avoid the problem, I recommend to use a non-anonymous function: (defun my-i-s-e-h () (blabla)) (add-hook 'isearch-mode-end-hook 'my-i-s-e-h) > In case you didn't know, the *scratch* buffer, which uses > lisp-interaction-mode, is the right place to do stuff like that. I think the .emacs file is better since that's where you'll want the code to be in the end anyway. Otherwise M-x ielm gives you another interface which some people find more friendly than lisp-interaction-mode. Stefan