all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Scrolling the editor via touch screen
@ 2017-09-11  1:03 Jorget Millani
  0 siblings, 0 replies; 2+ messages in thread
From: Jorget Millani @ 2017-09-11  1:03 UTC (permalink / raw)
  To: help-gnu-emacs

A quick question. One the things that could improve my workflow with Emacs
the most is if, in my touch-screen monitor, I could scroll a text or
programming script displayed in Emacs' editor by doing the traditional
touch scrolling movement with fingers in the touch-screen. Currently, that
movement selects touched lines instead of scrolling text. Would it be
possible to change it so one could really scroll with touch screen?

Thanks for your ideas and for this great program!

Jorget Millani


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Scrolling the editor via touch screen
       [not found] <mailman.288.1505094007.14750.help-gnu-emacs@gnu.org>
@ 2017-09-11  2:00 ` Emanuel Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Emanuel Berg @ 2017-09-11  2:00 UTC (permalink / raw)
  To: help-gnu-emacs

Jorget Millani wrote:

> A quick question. One the things that could
> improve my workflow with Emacs the most is if,
> in my touch-screen monitor, I could scroll
> a text or programming script displayed in
> Emacs' editor by doing the traditional touch
> scrolling movement with fingers in the
> touch-screen.

You need to find the interface for that and
bind that input action to a function of
your liking.

Try eval this: (scroll-up 1)

In your case, your input device will probably
transmit some data to indicate how wide the
movement, which, perhaps with acceleration,
would be translated to the argument to
`scroll-up'/`scroll-down'.

If this will benefit workflow is another thing.
Personally I cannot stand touching screens but
I love typing. But that's just me. But all
programmers type so that's not just me. And if
they move their hands from the keyboard all the
time to mess with the screen I can't see how
that will benefit anyone. But perhaps it's just
me who cannot see that.

On another note, here is some other fun things
to do with scrolling that might help you if you
ever find the interface to your touch screen.
The code looks strange (the loop) and obviously
I don't remember what the thoughts were when
I wrote it way back. But it seems to work and
could even be useful, perhaps :)

;; 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; abort with C-g

More scrolling:
http://user.it.uu.se/~embe8573/emacs-init/scroll.el

Good luck!

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-11  2:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.288.1505094007.14750.help-gnu-emacs@gnu.org>
2017-09-11  2:00 ` Scrolling the editor via touch screen Emanuel Berg
2017-09-11  1:03 Jorget Millani

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.