From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: JohnF Newsgroups: gmane.emacs.help Subject: Re: .emacs to keep cursor stationary when scrolling with mouse Date: Sat, 30 May 2015 03:25:34 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: References: <556822a6$0$3333$426a74cc@news.free.fr> <556871ca$0$3055$426a74cc@news.free.fr> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1432956635 12932 80.91.229.3 (30 May 2015 03:30:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 May 2015 03:30:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 30 05:30:18 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YyXTV-0004DM-GC for geh-help-gnu-emacs@m.gmane.org; Sat, 30 May 2015 05:30:17 +0200 Original-Received: from localhost ([::1]:38211 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyXTU-0002J6-6f for geh-help-gnu-emacs@m.gmane.org; Fri, 29 May 2015 23:30:16 -0400 Original-Path: usenet.stanford.edu!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 80 Original-NNTP-Posting-Host: panix3.panix.com Original-X-Trace: reader1.panix.com 1432956334 338 166.84.1.3 (30 May 2015 03:25:34 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Sat, 30 May 2015 03:25:34 +0000 (UTC) User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (NetBSD/6.1.5 (i386)) Original-Xref: usenet.stanford.edu gnu.emacs.help:212389 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104673 Archived-At: Damien Wyart wrote: >> > You could try to add: >> > (setq mouse-wheel-progressive-speed nil) >> > to your .emacs. > > * JohnF 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 )