all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: JohnF <john@please.see.sig.for.email.com>
To: help-gnu-emacs@gnu.org
Subject: Re: .emacs to keep cursor stationary when scrolling with mouse
Date: Sat, 30 May 2015 03:25:34 +0000 (UTC)	[thread overview]
Message-ID: <mkbaje$ai$1@reader1.panix.com> (raw)
In-Reply-To: 556871ca$0$3055$426a74cc@news.free.fr

Damien Wyart <damien.wyart@free.fr> wrote:
>> > You could try to add:
>> >   (setq mouse-wheel-progressive-speed nil)
>> > to your .emacs.
> 
> * JohnF <john@please.see.sig.for.email.com> in gnu.emacs.help:
>> Thanks, Damien. Added it after ...follow-mouse, i.e.,
>> from .emacs in original post
>> ...
>> (setq mouse-wheel-follow-mouse 't) ;;; scroll window under mouse
>> (setq mouse-wheel-progressive-speed nil) ;;; <-- added your suggestion
>> ...
>> But it had no effect. Does it do anything for you???
> 
> In fact, I did not try it myself, but borrowed it from here:
> 
> http://www.emacswiki.org/emacs/SmoothScrolling
> http://stackoverflow.com/questions/445873/how-can-i-make-emacs-mouse-scrolling-slower-and-smoother

Thanks again, Damien...

> Your .emacs looked correct,

Full disclosure: not really "mine", but cobbled together from
numerous suggestions I got from this ng and other emacs forums.

> and I have read here or there that
> mouse-wheel-progressive-speed did help in some cases, but maybe there
> has been a misunderstanding on what you would like exactly.
> 
> Here is some further reading on this topic and closely related ones;
> could you tell us if some of these solutions work for you, and if not,
> what you would like precisely?

Thanks for additional references below. The one labelled
   emacs-scroll-buffer-not-point
sounds like what I want, but it seems to address keyboard scrolling,
which is already handled. Instead, the one labelled
   emacs-mouse-wheel-scroll-preserve-buffer-position
seems to actually address my problem (though "preserve-buffer-position"
when scrolling sounds to me like an oxymoron). And very unfortunately,
the posted answer after the op describes his (and what sounds
like my) request is...
   "You can't." ...
which pretty succinctly (if correct) sums it up.

If I'm not precisely describing my request, then you can use my
.emacs and watch the point as you keyboard-scroll through your buffer.
The point (I apparently incorrectly said "cursor" -- I mean the
on-screen, often blinking, symbol that indicates where text
will be inserted when you start typing) should remain stationary
in the window when you page-up/down and when you scroll text.
When you arrow-up/down, the point should move one line up/down
at a time, without scrolling text. When the point nears the top/bottom
of the window, it >>shouldn't<< jump back towards center.
Instead, it should just stay at the top/bottom row,
and start scrolling text one line at a time.
   This is what it does with keyboard. Mouse wheel and drag bar
always scroll text, but point gets dragged along with the scrolling
text, and jumps back towards center when it nears window top/bottom.
Instead, I'd like point to just remain stationary on screen, as
yexy scrolls "underneath" it.
   The one okay exception is when the point starts on some row,column,
and then a text line that scrolls underneath it is shorter than the
original column number. Then point stays on its row, but column jumps
to end-of-(that-)line. But later, when a sufficiently long text line
scrolls underneath point, it jumps back to original column.
   Very lengthy description above -- simpler to just try it out,
whereby described behaviour is obvious.

> http://elpa.gnu.org/packages/scroll-restore.html
> http://stackoverflow.com/questions/10348473/emacs-mouse-wheel-scroll-preserve-buffer-position
> http://stackoverflow.com/questions/9616623/ctrl-up-down-style-scrolling-in-emacs/9620883#9620883
> http://stackoverflow.com/questions/8993183/emacs-scroll-buffer-not-point
> http://superuser.com/questions/527356/dont-change-the-cursor-position-when-scrolling-in-emacs
> http://stackoverflow.com/questions/15895313/let-emacs-move-the-cursor-off-screen
> http://emacs.stackexchange.com/questions/61/let-emacs-move-the-cursor-off-screen

-- 
John Forkosh  ( mailto:  j@f.com  where j=john and f=forkosh )


  reply	other threads:[~2015-05-30  3:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29  2:19 .emacs to keep cursor stationary when scrolling with mouse JohnF
2015-05-29  8:26 ` Damien Wyart
2015-05-29 11:03   ` JohnF
2015-05-29 14:03     ` Damien Wyart
2015-05-30  3:25       ` JohnF [this message]
2015-05-30  9:45         ` Damien Wyart
2015-05-31  4:03           ` JohnF
2015-05-29 19:44 ` Jorge A. Alfaro-Murillo
     [not found] ` <mailman.3927.1432928671.904.help-gnu-emacs@gnu.org>
2015-05-30  3:43   ` JohnF
2015-05-30  6:26     ` tomas
     [not found]     ` <mailman.3945.1432967181.904.help-gnu-emacs@gnu.org>
2015-05-30  7:48       ` JohnF
2015-05-30 13:04         ` tomas
     [not found]         ` <mailman.3970.1432991100.904.help-gnu-emacs@gnu.org>
2015-05-31  4:34           ` JohnF
     [not found]           ` <<mke31e$k7h$1@reader1.panix.com>
2015-05-31 13:20             ` Drew Adams
2015-05-31  1:18     ` Jorge A. Alfaro-Murillo
     [not found]     ` <mailman.4015.1433035116.904.help-gnu-emacs@gnu.org>
2015-05-31  5:04       ` JohnF

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='mkbaje$ai$1@reader1.panix.com' \
    --to=john@please.see.sig.for.email.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.
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.