From: JohnF <john@please.see.sig.for.email.com>
To: help-gnu-emacs@gnu.org
Subject: .emacs to keep cursor stationary when scrolling with mouse
Date: Fri, 29 May 2015 02:19:41 +0000 (UTC) [thread overview]
Message-ID: <mk8ibs$8pk$1@reader1.panix.com> (raw)
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??? Thanks. Here's my complete .emacs...
(setq major-mode 'text-mode)
(setq auto-mode-alist '(("." . text-mode)))
(setq make-backup-files nil) ;;; no backup files
(setq auto-save-default nil) ;;; no auto saving
(setq scroll-step 1)
(setq scroll-margin 0)
(setq scroll-preserve-screen-position 't) ;;; scroll without moving cursor
(setq scroll-conservatively 10000) ;;; (0 or 10000 seems same)
(setq auto-window-vscroll nil)
(setq scroll-up nil)
(setq scroll-down nil)
(setq scroll-up-aggressively nil)
(setq scroll-down-aggressively nil)
(setq next-screen-context-lines 0)
(mouse-wheel-mode 't) ;;; mouse-wheel enabled
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;;; 1 line at a time
(setq mouse-wheel-follow-mouse 't) ;;; scroll window under mouse
(setq indent-tabs-mode nil)
(setq blink-matching-paren nil)
(setq column-number-mode 't)
(setq size-indication-mode 't)
;;; open with single window
(setq inhibit-startup-screen 't)
(add-hook 'emacs-startup-hook 'delete-other-windows)
;;; initial frame width,height,position
(set-frame-width (selected-frame) 80) ; #chars wide
(set-frame-height (selected-frame) 52) ; #lines ling
(set-frame-position (selected-frame) 10 10 ) ; x y from upper-left
;;; insert tab character
(defun insert-tab ()
(interactive)
(insert "\t"))
(global-unset-key [tab])
(global-set-key (kbd "TAB") 'insert-tab)
;;; --- end-of-file ---
Thanks again,
--
John Forkosh ( mailto: j@f.com where j=john and f=forkosh )
next reply other threads:[~2015-05-29 2:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 2:19 JohnF [this message]
2015-05-29 8:26 ` .emacs to keep cursor stationary when scrolling with mouse Damien Wyart
2015-05-29 11:03 ` JohnF
2015-05-29 14:03 ` Damien Wyart
2015-05-30 3:25 ` JohnF
2015-05-30 9:45 ` Damien Wyart
2015-05-31 4:03 ` JohnF
2015-05-29 19:44 ` Jorge A. Alfaro-Murillo
[not found] ` <mailman.3927.1432928671.904.help-gnu-emacs@gnu.org>
2015-05-30 3:43 ` JohnF
2015-05-30 6:26 ` tomas
[not found] ` <mailman.3945.1432967181.904.help-gnu-emacs@gnu.org>
2015-05-30 7:48 ` JohnF
2015-05-30 13:04 ` tomas
[not found] ` <mailman.3970.1432991100.904.help-gnu-emacs@gnu.org>
2015-05-31 4:34 ` JohnF
[not found] ` <<mke31e$k7h$1@reader1.panix.com>
2015-05-31 13:20 ` Drew Adams
2015-05-31 1:18 ` Jorge A. Alfaro-Murillo
[not found] ` <mailman.4015.1433035116.904.help-gnu-emacs@gnu.org>
2015-05-31 5:04 ` JohnF
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='mk8ibs$8pk$1@reader1.panix.com' \
--to=john@please.see.sig.for.email.com \
--cc=help-gnu-emacs@gnu.org \
/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.