From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Cristian Gutierrez Newsgroups: gmane.emacs.help Subject: Re: Emacs text cursor position Date: Tue, 25 Jan 2005 16:04:49 -0300 Message-ID: <87llahnxda.fsf@guti.no-ip.org> References: <56c3c0f6.0501221905.233bd40c@posting.google.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1106682483 14324 80.91.229.6 (25 Jan 2005 19:48:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Jan 2005 19:48:03 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 25 20:47:58 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CtWfN-0003lL-00 for ; Tue, 25 Jan 2005 20:47:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CtWre-0007LP-Fk for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Jan 2005 15:00:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CtWoE-0006D4-9e for help-gnu-emacs@gnu.org; Tue, 25 Jan 2005 14:57:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CtWo4-00068G-Ln for help-gnu-emacs@gnu.org; Tue, 25 Jan 2005 14:57:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CtWo1-00061r-Rs for help-gnu-emacs@gnu.org; Tue, 25 Jan 2005 14:56:53 -0500 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CtWOu-0005qK-Kk for help-gnu-emacs@gnu.org; Tue, 25 Jan 2005 14:30:56 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CtWOt-0005EH-00 for ; Tue, 25 Jan 2005 20:30:55 +0100 Original-Received: from 62-163-28.dial.terra.cl ([200.28.163.62]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Jan 2005 20:30:55 +0100 Original-Received: from crgutier by 62-163-28.dial.terra.cl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Jan 2005 20:30:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 44 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 62-163-28.dial.terra.cl Face: iVBORw0KGgoAAAANSUhEUgAAADwAAAA8AgMAAABHkjHhAAAADFBMVEUWFhZfX1+ioqL6+vr8 dj+QAAAAAWJLR0QAiAUdSAAAAg5JREFUeNql0s9r02AYB/B4GIHuoAgVVmG9CVYwf4ILrht40Ynd dEXioWUsA3PaQQ8LKHpYLnbTThwiHbWYV9Sj9rL36NUObGkPUrVzuIs/6BvyluZ9ljcxaXI2lzwf eJOH9/k+AvhP/7j/Fv65OxMzmynhqO1zH/So+29NLeqvh6YU8WADmemIP4lxL8pxp6p3o2aZegZl R3YyaBJNaaGHKkqgxOXQNkKXzLQR+g9C6+b5kfcQevgmpYRuIrRZn5BCryO0US3ogW1BdV0J+3dz grpXmQXYfuf5nkLH5ksK/SIrnq/rg26ioTmdygtupwgWHSvoTnvF4CZl17dOYNoWy9yNPOzXfstg tYtXuR9o0JwlL+HgeWGBW8ZgGBbFnWUhw33Sbdz6TvHN1ey8a3YGIN+6T2C5PYFdD2sA6d5FAu9v LH3WBbAJBgmIDJ3ioooFoCzPNDq5in82TX7egsdXcE+0pZ3sEr+fxW7XoCvS3HRS4f7rrGHojRP0 6A72TOtuoBrZnVvz5kGIzVejX0jpvi2bF0Q+iz1TWuXFwbOkP7/hrrdaH58u+HakX7wwSsF8/eDT wf45417kFwIPd7yIcWDS52UDApevuZ86p0PLK1tuZHpoBN8YLgOM9pswfft/vO9oMf9g6UbMYNij /jDYglZwHRCYIIgx56aO4earyPlD89R0Mvo/9kR9HfgIgorhXaQc58oAAAAASUVORK5CYII= User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:MGmjFnX0fuuVVLVl4b4VIny5KlI= X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:23626 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23626 Este domingo, ummajera@yahoo.ca dijo: > I'm trying to customize Emacs to my needs/wants and so far so good. > The only snag I encountered is in the position of the cursor. I want > to be able to to scroll the buffer with mouse wheel or on the scroll > bars and have the cursor remain on the original line, even if the > cursor moves off-screen. Then when I start typing, emacs does C-l to > center back on the cursor, if the cursor is off-screen. > > Is it possible to customize Emacs in this way? How can I set "mouse > scroll" not to affect the position of the cursor? Not exactly what you're asking (dunno about the mouse wheel), but I use this hack to scroll text without getting the cursor off the center of the screen: ,---- | ;; "smooth" scroll | (defun guti-scroll-up (cuenta) | (interactive "p") | (move-to-window-line nil) | (scroll-up cuenta) | (forward-line cuenta) | ) | | (defun guti-scroll-down (cuenta) | (interactive "p") | (move-to-window-line nil) | (scroll-down cuenta) | (forward-line (* -1 cuenta)) | ) | | (global-set-key (kbd "C-<") 'guti-scroll-down) | (global-set-key (kbd "C->") 'guti-scroll-up) `---- HTH, -- Cristian Gutierrez http://www.dcc.uchile.cl/~crgutier crgutier[@]dcc.uchile.cl Jabber:crgutier@jabber.org "If builders built buildings the way programmers write programs, then the first woodpecker that came along would destroy civilization." -- Weinberg's Second Law.