emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preserving sanity in Emacs [Re: rampant region highlighting]


From: Mathias Dahl
Subject: Re: Preserving sanity in Emacs [Re: rampant region highlighting]
Date: Tue, 8 Apr 2008 01:54:04 +0200

>  > I acknowledge that having the point always on-screen has benefits too
>  > (though e.g. a fringe indicator could "point towards the offscreen
>  > point" to address some concerns there...), but what if I'm just
>  > scrolling up to look at something?  Martin's hack ensured that I can
>  > scroll away to have a look, and the point will reliably be where I left
>  > it when I scrolled back.

May I suggest you have a look at unscroll.el, which lets you
"unscroll" back to where you were, should you by mistake or on purpose
scroll far far away in the buffer:

;;; Commentary:

;; To use: (require 'unscroll) in your .emacs.

;; This file uses "advice" to modify the scrolling commands such that
;; the screen appearance is preserved at the start of each series of
;; scrolls.  Ever press C-v C-v C-v when you meant C-b C-b C-b?
;; That's what this is meant to remedy.

;; After scrolling (intentionally or otherwise), you can restore the
;; display with M-x unscroll RET, which I like to bind to C-M-v using
;; (define-key global-map "\C-\M-v" 'unscroll).

http://se.aminet.net/pub/gnu/emacs-lisp/incoming/unscroll.el

When I was new to Emacs it happened from time to time that I used some
movement command by mistake. I would have needed this hack then.
Nowadays I don't have that problem anymore and if it happens C-u C-SPC
often takes me close to where I was. Still, I like the idea and it
would be neat if it were built-in.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]