unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ehud Karni" <ehud@unix.mvs.co.il>
Cc: emacs-devel@gnu.org
Subject: Re: --without-toolkit-scroll-bars at runtime?
Date: Tue, 22 Mar 2005 16:29:10 +0200	[thread overview]
Message-ID: <200503221429.j2METAf3012243@beta.mvs.co.il> (raw)
In-Reply-To: <x5r7i97pbr.fsf@lola.goethe.zz> (message from David Kastrup on Mon, 21 Mar 2005 02:36:08 +0100)

On Mon, 21 Mar 2005 02:36:08 +0100, David Kastrup <dak@gnu.org> wrote:
>                                          you can't control the scroll
> amount to get just the right window start for getting a
> block/function/loop fully on-screen.  Something which, by the way, is
> also hard to do by keyboard given Emacs' recenter policies.

May be the following commands can help you achieve this.

(defun line-to-top (arg)
  "move current line to top of window"
    (interactive "p")
    (recenter (1- arg))
    (middle-window))

(defun line-to-bottom (arg)
  "move current line to bottom of window"
    (interactive "p")
    (recenter (- (window-height) (1+ arg)))
    (middle-window))

Ehud.


--
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry

      parent reply	other threads:[~2005-03-22 14:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-21  1:36 --without-toolkit-scroll-bars at runtime? David Kastrup
2005-03-21 16:28 ` Stefan Monnier
2005-03-22 10:50   ` Miles Bader
2005-03-22 21:47     ` Jan D.
2005-03-22  3:34 ` Richard Stallman
2005-03-22 10:45   ` David Kastrup
2005-03-22 14:29 ` Ehud Karni [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=200503221429.j2METAf3012243@beta.mvs.co.il \
    --to=ehud@unix.mvs.co.il \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).