unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: bojohan+news@dd.chalmers.se (Johan Bockgård)
Subject: Re: Persisting centered cursor with Scroll Lock key
Date: Sat, 08 May 2004 21:32:57 +0200	[thread overview]
Message-ID: <yoij3c6au32u.fsf@frealaf.dd.chalmers.se> (raw)
In-Reply-To: m3r7tunbfh.fsf@wilson.rwth-aachen.de

Torsten Bronger <bronger@physik.rwth-aachen.de> writes:

> but what is the most elegant/safest way to keep the cursor in the
> center of the window, no matter how the position is changed (arrow
> keys, control key sequences, mouse wheel etc)?

This might work:

(defun my-recenter ()
  (recenter '(4)))

;; buffer local hook, excute in the buffers where you want it to be
;; active
(add-hook 'post-command-hook 'my-recenter t t)

-- 
Johan Bockgård

      parent reply	other threads:[~2004-05-08 19:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-08 16:14 Persisting centered cursor with Scroll Lock key Torsten Bronger
2004-05-08 16:36 ` Kai Grossjohann
2004-05-08 17:30   ` Torsten Bronger
2004-05-08 18:14     ` upro
2004-05-08 18:33       ` Torsten Bronger
2004-05-08 18:43         ` upro
2004-05-08 19:32     ` Kai Grossjohann
2004-05-08 19:50       ` Torsten Bronger
2004-05-08 19:55         ` Kai Grossjohann
2004-05-08 20:07           ` Torsten Bronger
2004-05-09  0:03           ` Eric Eide
2004-05-10  0:55             ` Thien-Thi Nguyen
2004-05-08 23:59     ` Eric Eide
2004-05-09  6:56       ` Torsten Bronger
2004-05-10 14:40         ` Eric Eide
2004-05-10 16:17           ` Stefan Monnier
2004-05-10 21:06             ` Kai Grossjohann
2004-05-11  4:53               ` Stefan Monnier
2004-05-11  6:09                 ` Torsten Bronger
2004-05-11  7:06                 ` Kai Grossjohann
2004-05-11  7:47                   ` Torsten Bronger
2004-05-12  7:35                     ` Kai Grossjohann
2004-05-09  0:16   ` Eric Eide
2004-05-08 19:32 ` Johan Bockgård [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

  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=yoij3c6au32u.fsf@frealaf.dd.chalmers.se \
    --to=bojohan+news@dd.chalmers.se \
    /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).