* continuous fractional scrolling
@ 2015-06-11 21:24 B. T. Raven
2015-06-11 23:18 ` Emanuel Berg
0 siblings, 1 reply; 4+ messages in thread
From: B. T. Raven @ 2015-06-11 21:24 UTC (permalink / raw)
To: help-gnu-emacs
I am starting to like reading long pdfs in Adobe Reader with
View>Pagedisplay>Automatically scroll and I was wondering if something like this
is possible with Emacs for reading plain-text files (rendered in a
proproportional font). In the *scratch* buffer (window)I copy-pasted a long
stretch of text and put the following at the end:
(set-window-vscroll (selected-window) 1 t)
(scroll-up-line)
(scroll-up)
(scroll-up-line)
(scroll-other-window)
etc.
and then evaluated each form with C-x C-e and expected repeated evaluations of
(scroll-up-line) et al. to move buffer text pixel-wise but that didn't happen.
Is there a way in Emacs to make a text buffer continually scroll without user
interaction?
Thanks,
Ed
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: continuous fractional scrolling
2015-06-11 21:24 continuous fractional scrolling B. T. Raven
@ 2015-06-11 23:18 ` Emanuel Berg
2015-06-12 16:11 ` B. T. Raven
0 siblings, 1 reply; 4+ messages in thread
From: Emanuel Berg @ 2015-06-11 23:18 UTC (permalink / raw)
To: help-gnu-emacs
B. T. Raven <btraven@nihil.net> writes:
> Is there a way in Emacs to make a text buffer
> continually scroll without user interaction?
I think the best scrolling is one line at a time and
that at a short, close and natural shortcut, e.g. M-i
to scroll up, and M-k to scroll down.
I have C-M-j and C-M-l to scroll sideways (left and
right, respectively) - the reason I don't have that
M-j and M-l is I have those to iterate the Linux VTs,
which I do much more often than scroll horizontally in
Emacs...
That said, what you ask for should be possible indeed.
Try this:
(require 'cl-macs)
;; civilized scrolling - one line at a time
(setq scroll-conservatively 10000)
(setq auto-window-vscroll nil)
;; scroll the current window
(defun scroll-up-1 ()
(interactive)
(scroll-down 1) )
(defun scroll-down-1 ()
(interactive)
(scroll-up 1) )
;; automatic scrolling
(defun start-automatic-scroll-down ()
(interactive)
(let ((win))
(cl-loop do
(progn (setq win (window-end))
(scroll-down-1)
(sleep-for 1) ; put speed here in seconds
(redisplay) )
until (= win (window-end)) )))
;; (start-automatic-scroll-down)
;; ^ test here
If you prefer the original file, which also contains
my other scroll stuff (the stuff mentioned first
paragraph), check out this URL:
http://user.it.uu.se/~embe8573/conf/emacs-init/scroll.el
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: continuous fractional scrolling
2015-06-11 23:18 ` Emanuel Berg
@ 2015-06-12 16:11 ` B. T. Raven
2015-06-13 1:06 ` Emanuel Berg
0 siblings, 1 reply; 4+ messages in thread
From: B. T. Raven @ 2015-06-12 16:11 UTC (permalink / raw)
To: help-gnu-emacs
<877fr9ygun.fsf@debian.uxu>Emanuel BergFri, 12 Jun 2015 01:18:08 +0200
>
>B. T. Raven <btraven@nihil.net> writes:
>
>> Is there a way in Emacs to make a text buffer
>> continually scroll without user interaction?
>
>I think the best scrolling is one line at a time and
>that at a short, close and natural shortcut, e.g. M-i
>to scroll up, and M-k to scroll down.
>
>I have C-M-j and C-M-l to scroll sideways (left and
>right, respectively) - the reason I don't have that
>M-j and M-l is I have those to iterate the Linux VTs,
>which I do much more often than scroll horizontally in
>Emacs...
>
>That said, what you ask for should be possible indeed.
>Try this:
>
>(require 'cl-macs)
>
>;; civilized scrolling - one line at a time
>(setq scroll-conservatively 10000)
>(setq auto-window-vscroll nil)
>
>;; scroll the current window
>(defun scroll-up-1 ()
> (interactive)
> (scroll-down 1) )
>(defun scroll-down-1 ()
> (interactive)
> (scroll-up 1) )
>
>;; automatic scrolling
>(defun start-automatic-scroll-down ()
> (interactive)
> (let ((win))
> (cl-loop do
> (progn (setq win (window-end))
> (scroll-down-1)
> (sleep-for 1) ; put speed here in seconds
> (redisplay) )
> until (= win (window-end)) )))
>;; (start-automatic-scroll-down)
>;; ^ test here
>
>If you prefer the original file, which also contains
>my other scroll stuff (the stuff mentioned first
>paragraph), check out this URL:
>
> http://user.it.uu.se/~embe8573/conf/emacs-init/scroll.el
>
Thanks for all this, Emanuel. Maybe line-at-a-time will work out okay but I
think in will necessarily more jerky (cause saccades and maybe more tiring to
read). Anyway, I'll study your code and give it a try.
Ed
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: continuous fractional scrolling
2015-06-12 16:11 ` B. T. Raven
@ 2015-06-13 1:06 ` Emanuel Berg
0 siblings, 0 replies; 4+ messages in thread
From: Emanuel Berg @ 2015-06-13 1:06 UTC (permalink / raw)
To: help-gnu-emacs
B. T. Raven <btraven@nihil.net> writes:
> Thanks for all this, Emanuel. Maybe line-at-a-time
> will work out okay but I think in will necessarily
> more jerky (cause saccades and maybe more tiring to
> read). Anyway, I'll study your code and give it
> a try.
Use a printer I'd say if you are to read long
documents. And make the font BIG!
Reading on a monitor, even projector, isn't pleasant
to my mind (and body). Right now, one would think I'm
reading but actually I'm just typing 80% and perhaps
"seeing" 15%. The last five will remain a mystery...
Having the text auto-scroll is probably even worse,
because you don't type (no mini-vibration or
information from your fingers to relieve your eyes)
and with auto-scroll, your focus point is even
more fixed.
Besides, don't you get stressed from having to read at
a certain pace? And/or ditto frustrated when reading
"too fast" and it won't keep up? Stress can cause
eye-problems (almost) as much as shampoo...
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-13 1:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-11 21:24 continuous fractional scrolling B. T. Raven
2015-06-11 23:18 ` Emanuel Berg
2015-06-12 16:11 ` B. T. Raven
2015-06-13 1:06 ` Emanuel Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).