From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: How to let C-s center the line
Date: Wed, 12 Nov 2003 13:40:44 -0700 [thread overview]
Message-ID: <3FB29ACC.8050109@yahoo.com> (raw)
In-Reply-To: uhe19r5vl.fsf@sadfoweklsdfs.cdweeds
Timur Aydin wrote:
> 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?
I don't know why this doesn't work:
(add-hook 'isearch-mode-hook 'recenter)
but this does:
(defadvice isearch-update (after recenter activate)
(recenter))
--
Kevin Rodgers
prev parent reply other threads:[~2003-11-12 20:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-12 14:58 How to let C-s center the line Timur Aydin
2003-11-12 15:58 ` Mario Domgörgen
2003-11-12 20:40 ` Kevin Rodgers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FB29ACC.8050109@yahoo.com \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.