From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) Newsgroups: gmane.emacs.help Subject: Re: .emacs to keep cursor stationary when scrolling with mouse Date: Fri, 29 May 2015 15:44:27 -0400 Message-ID: <87iobbjhic.fsf@yale.edu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: ger.gmane.org 1432928695 28607 80.91.229.3 (29 May 2015 19:44:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 May 2015 19:44:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 29 21:44:43 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 1YyQCx-0000CU-0Z for geh-help-gnu-emacs@m.gmane.org; Fri, 29 May 2015 21:44:43 +0200 Original-Received: from localhost ([::1]:37571 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyQCw-0006OW-4I for geh-help-gnu-emacs@m.gmane.org; Fri, 29 May 2015 15:44:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyQCk-0006OQ-6Z for help-gnu-emacs@gnu.org; Fri, 29 May 2015 15:44:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyQCg-0005an-VI for help-gnu-emacs@gnu.org; Fri, 29 May 2015 15:44:30 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:52274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyQCg-0005ac-PF for help-gnu-emacs@gnu.org; Fri, 29 May 2015 15:44:26 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YyQCd-0008QM-Gd for help-gnu-emacs@gnu.org; Fri, 29 May 2015 21:44:23 +0200 Original-Received: from nat-130-132-173-85.central.yale.edu ([130.132.173.85]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 May 2015 21:44:23 +0200 Original-Received: from jorge.alfaro-murillo by nat-130-132-173-85.central.yale.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 May 2015 21:44:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nat-130-132-173-85.central.yale.edu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:nRsCzmoalTDpi2XISNiETf80H54= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:104672 Archived-At: JohnF writes: > I'm pretty clueless about emacs lisp, and have tried to set up > an .emacs that emulates dumb editor behavior. That works mostly > the way I want, except that when running under X and scrolling > text with mouse (both scrolling with mouse wheel and dragging > the text bar on the window's right-hand side), the cursor still > jumps around. It remains stationary when scrolling with > keyboard arrow-up/down and keyboard page-up/down, which is what > I want. But I can't get the cursor to remain stationary when > scrolling with the mouse. How's that done?? I think that what you want is to not see the point (you call it cursor) in your screen and to keep the point always fixed. I know that is standard "modern" editor behavior, but why would you want that? In those editors when you scroll, the point remains where it was and when you type you miss what you were seeing because the screen goes back to where it was before you scrolled. If you want to edit the buffer in a different place that is irritating. Now if what you want is to browse the buffer in a different place you can do way better: split the window (C-x 2 or C-x 3) and scroll on the other one. Or if you do not want to split the window then push the mark (C- C-) browse what you want and then jump the mark (C-u C-) that will get you to where you were before. This also goes hand in hand with using the mark and the region, which is an integral part of emacs. Moving the point with the scroll is what you would expect if you are selecting a region. Best, -- Jorge.