From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Timur Aydin Newsgroups: gmane.emacs.help Subject: How to let C-s center the line Date: 12 Nov 2003 16:58:06 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1068649271 19776 80.91.224.253 (12 Nov 2003 15:01:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Nov 2003 15:01:11 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 12 16:01:08 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AJwUE-0002bc-00 for ; Wed, 12 Nov 2003 16:01:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AJxQv-0003Yd-Pm for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Nov 2003 11:01:29 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!border3.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!news.giganews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Wed, 12 Nov 2003 08:56:06 -0600 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Lines: 18 Original-X-Trace: sv3-YuS/7UIsHFqeDhBIkxZ6SAq/K3ja/HW5fc8mDiNfm8D9b/eTNEkBCn9ISbOfFzTePw13qPZFoBcvfxj!w36L55rKasUSnFXmVwx5mazGLr5XyImxuLIxJCTgoCKhInJFkddyIEBlqZ0= Original-X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:118164 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:14104 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14104 Hi, I am trying to advice the isearch-forward function so that when I search for a string and that string is found in the buffer, I want that line to be centered. When I hit C-s again to find the next instance of the string, that line should also be centered. Here is what I wrote in the scratch buffer: (defadvice isearch-forward (after my-isearch-forward-with-center activate) (recenter)) Then I have evaluated this, but C-s behaves exactly the same was as before... Is this the proper way of achieving my goal, or am I way off? -- Timur Aydin