all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Joe Casadonte" <jcasadonte@northbound-train.com>
Subject: Re: cua-mode clobbers S-<cursor>
Date: 14 Jan 2003 09:20:30 -0500	[thread overview]
Message-ID: <uy95nertd.fsf@terrapin.northbound-train.com> (raw)
In-Reply-To: 84vg13qtv1.fsf@lucy.cs.uni-dortmund.de

On Sun, 05 Jan 2003, Kai Großjohann wrote:

> lawrence mitchell <wence@gmx.li> writes:
>
>> Kai Grossjohann wrote:
>>
>>> I think I might like cua-mode a lot.  Alas, I have my own bindings
>>> for S-<up> and S-<down> (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 <up> and <down> do.  Scroll by
>> page?
>
> <up> and <down> 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
<kp-subtract> and <kp-add>.  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!
------------------------------------------------------------------------------

  reply	other threads:[~2003-01-14 14:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-05 17:30 cua-mode clobbers S-<cursor> Kai Großjohann
2003-01-05 17:40 ` lawrence mitchell
2003-01-05 19:28   ` Kai Großjohann
2003-01-14 14:20     ` Joe Casadonte [this message]
2003-01-14 15:27       ` Kai Großjohann

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=uy95nertd.fsf@terrapin.northbound-train.com \
    --to=jcasadonte@northbound-train.com \
    /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.