From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Joe Casadonte" Newsgroups: gmane.emacs.help Subject: Re: cua-mode clobbers S- Date: 14 Jan 2003 09:20:30 -0500 Organization: Llama Fresh Farms, Neare Paraguay Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <84vg134i7s.fsf@lucy.cs.uni-dortmund.de> <84vg13qtv1.fsf@lucy.cs.uni-dortmund.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1042554127 25602 80.91.224.249 (14 Jan 2003 14:22:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 14 Jan 2003 14:22:07 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18YRx7-0006eX-00 for ; Tue, 14 Jan 2003 15:22:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18YRw7-0002C3-01 for gnu-help-gnu-emacs@m.gmane.org; Tue, 14 Jan 2003 09:21:03 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!chi1.webusenet.com!news.webusenet.com!newsfeed.mountaincable.net!newshosting.com!news-xfer1.atl.newshosting.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 Original-Lines: 62 Original-NNTP-Posting-Host: f4388693.news.newshosting.com Original-X-Trace: DXC=WQN1h:EIZMd=3eWlOghRKmXMDXCI2J8LcXkcEe:=NIikkLToIVMb[_oEeFIW5XQ\]fR8PEOUnbQ:a?>FfRhk4SE`[LVL=K?`jli Original-X-Complaints-To: abuse@newshosting.com Original-Xref: shelby.stanford.edu gnu.emacs.help:108943 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5471 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5471 On Sun, 05 Jan 2003, Kai Großjohann wrote: > lawrence mitchell writes: > >> Kai Grossjohann wrote: >> >>> I think I might like cua-mode a lot. Alas, I have my own bindings >>> for S- and S- (they scroll by one line), which I need to >>> move elsewhere. Alas, I can't think of another nicely mnemonic >>> keybinding for them. >> >> Hmm, now I'm intrigued as to what and do. Scroll by >> page? > > and do like C-p and C-n, respectively. Do you mean then that you scroll the window up and down by one line, but the cursor stays the on the same line? If so, I have something similar (I'd be interested to see yours), and I bind them to and . I know they're not necessarily next to the cursor keys as you asked for, but they are quite easy to find for me, as they are on the corner of the keyboard. Obviously, I don't do a lot of number crunching, as those keys are now useless unless overridden (as they are in calculator-mode). In case anyone's interested, here's my version: (defun scroll-in-place (scroll-up) "Scroll window up (or down) without moving point (if possible). SCROLL-Up is non-nil to scroll up one line, nil to scroll down." (interactive) (let ((pos (point)) (col (current-column)) (up-or-down (if scroll-up 1 -1))) (scroll-up up-or-down) (if (pos-visible-in-window-p pos) (goto-char pos) (if (or (eq last-command 'next-line) (eq last-command 'previous-line)) (move-to-column temporary-goal-column) (move-to-column col) (setq temporary-goal-column col)) (setq this-command 'next-line)))) -- Regards, joe Joe Casadonte jcasadonte@northbound-train.com ------------------------------------------------------------------------------ Llama Fresh Farms => http://www.northbound-train.com Gay Media Resource List => http://www.northbound-train.com/gaymedia.html Perl for Win32 => http://www.northbound-train.com/perlwin32.html Emacs Stuff => http://www.northbound-train.com/emacs.html Music CD Trading => http://www.northbound-train.com/cdr.html ------------------------------------------------------------------------------ Live Free, that's the message! ------------------------------------------------------------------------------