unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Barry OReilly <gundaetiapo@gmail.com>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: How to achieve desired automatic scrolling behavior
Date: Wed, 29 May 2013 09:57:32 -0400	[thread overview]
Message-ID: <CAFM41H2VKeQ_P0JhgLH+x18OuqQeKuxJD7Pdo=Hsr0oOqgDHzQ@mail.gmail.com> (raw)

> Me neither, maybe you (the OP) could describe it once more?

I'm asking about two things, but I'll focus on the first. The simplest way
to describe it: if a command moves point by line off screen, I want to
scroll one line and if point moves more than that off screen, I want to
recenter point.

One would think scroll-conservatively==1 would fit the bill, but it doesn't
when lines wrap. If I arrow down (actually: Evil's j command) I'm fine
until I hit a line that wraps visually, then I get an undesired recenter.
This makes scroll-conservatively==1 practically useless when lines wrap
visually.

Another approach I tried, which might actually give better edge case
behavior* if it worked:
  Customize scroll-conservatively to 0
  Advise line-move:
    (defadvice line-move (around my-advice-line-move activate)
      (let ((scroll-conservatively 101))
        ad-do-it))

That doesn't work; moving by lines has scroll-conservatively==0 behavior.

* eg if I search on a term and the next search term is in the line just
below what's visible.


             reply	other threads:[~2013-05-29 13:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 13:57 Barry OReilly [this message]
2013-05-29 15:34 ` How to achieve desired automatic scrolling behavior Eli Zaretskii
2013-05-29 15:55   ` Frank Fischer
  -- strict thread matches above, loose matches on Subject: below --
2013-05-30 18:23 Barry OReilly
2013-05-30 19:08 ` Eli Zaretskii
2013-05-29 23:02 Barry OReilly
2013-05-30 14:45 ` Stefan Monnier
     [not found] <mailman.26006.1368807846.855.help-gnu-emacs@gnu.org>
2013-05-25 16:37 ` Javier
2013-05-25 19:06   ` Emanuel Berg
2013-05-17 16:24 Barry OReilly
2013-05-17 23:37 ` Bob Proulx

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='CAFM41H2VKeQ_P0JhgLH+x18OuqQeKuxJD7Pdo=Hsr0oOqgDHzQ@mail.gmail.com' \
    --to=gundaetiapo@gmail.com \
    --cc=help-gnu-emacs@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.
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).