unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Timur Aydin <sdfeklsdf@sadfoweklsdfs.cdweeds>
Subject: How to let C-s center the line
Date: 12 Nov 2003 16:58:06 +0200	[thread overview]
Message-ID: <uhe19r5vl.fsf@sadfoweklsdfs.cdweeds> (raw)

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

             reply	other threads:[~2003-11-12 14:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-12 14:58 Timur Aydin [this message]
2003-11-12 15:58 ` How to let C-s center the line Mario Domgörgen
2003-11-12 20:40 ` Kevin Rodgers

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uhe19r5vl.fsf@sadfoweklsdfs.cdweeds \
    --to=sdfeklsdf@sadfoweklsdfs.cdweeds \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).