3

When pair programming with emacs I've found it is hard for the person who is not typing ("driving") to follow scrolling. I've seen this both as the "passenger" and the "driver".

How can I make motion within the file easier to follow for other people?

I'm aware of the various smooth scrolling fixes, and I'm looking for some other visual indication here.

Croad Langshan
  • 3,192
  • 14
  • 42
  • I'm not sure this question will have a definitive answer, you're better redefine your question. In all the cases, my tiny advice will be: first, use a tool like `tmux` or `screen`. When pair programming, I found it easier for everybody to follow, if there is two screen display. – Nsukami _ Mar 20 '15 at 23:32
  • 1
    I am not a programmer and have no pair programming experience, but I like to use a custom minor mode that creates a cross-hair the entire vertical and horizontal length of the buffer. I often compose documents with clients watching what I am typing and seek their input while composing. – lawlist Mar 20 '15 at 23:35
  • Do you use a multi-window layout? In that case, you can configure the mode line so that the selected window stand out more than the others. Also, `lh-line-mode` makes it more clear where the cursor it. Oh, of course, make the cursor red or some other color that stand out more clearly. – Lindydancer Mar 21 '15 at 19:26
  • lawlist: It's not so much where the cursor is in the window that's the problem, but rather where the window is in the file, and which file I'm viewing. – Croad Langshan Mar 21 '15 at 21:22
  • Lindydancer: no, I use a single window most of the time. I think this makes it harder for my pair-ees, since it means I switch buffers a lot. – Croad Langshan Mar 21 '15 at 21:23
  • The following linked thread contains a screenshot where a certain color tab is used to indicate the current buffer, its buffer-name, and `+` symbol is added to the tab when the buffer is in a modified state. The mode-line of inactive windows are set to match the buffer background so as to help draw the user's eyes towards the active window -- with the active mode-line containing a different background color. http://emacs.stackexchange.com/a/10112/2287 – lawlist Mar 21 '15 at 21:55
  • lawlist: Unfortunately I always have too many open buffers for this to help I think (hundreds) – Croad Langshan Mar 21 '15 at 21:59
  • That particular thread offers an option to add tabs with `C-c C-a` or remove tabs with `C-c C-n` -- i.e., you can have one tab showing or a zillion tabs, whatever you prefer. Tabs can be added and removed programmatically. [FYI: The `@` symbol preceding a user name in a comment will help stackexchange to send the user a notification -- e.g., `@Croad Langshan`.] The screenshot also depicts the current buffer name in the mode-line with a bold font. – lawlist Mar 21 '15 at 22:06
  • @Nsukami_: I've narrowed the focus of the question. Re tmux: are you talking about the "passenger" having a separate window to look at that follows the motion of the "driver's" window? Or a second window that does not follow the motion of the driver's window? – Croad Langshan Mar 21 '15 at 22:38
  • 1
    @CroadLangshan "are you talking about the "passenger" having a separate window to look at that follows the motion of the "driver's" window?" Yes I am. Also, `(global-hl-line-mode 1)` & `(setq scroll-step 1)` could help (I hope). – Nsukami _ Mar 22 '15 at 00:29

1 Answers1

1

beacon is a solution for losing the cursor. See a gif demo on the page. Whenever the window scrolls a light will shine on top of your cursor so you know where it is.

sublimity helps identify the location of the window in the document.

minimap helps with the window also.

Hatshepsut
  • 545
  • 3
  • 14
  • sublimity and minimap: This is a good idea, but I think unless it shows smooth and prompt motion on the timescale of human perception (a big, probably infeasible ask from an elisp package right now, I would guess), the inactive pairing partner is not going to get a useful cue re the large-scale motion of point within the buffer. – Croad Langshan Jul 08 '18 at 21:55
  • They both do that successfully in my opinion. – Hatshepsut Jul 08 '18 at 21:57
  • Also, I think you should split up your answer into three answers -- then I'd be happy to upvote the beacon one, which I've never seen before, have just installed, and I suspect people I pair with will find useful :-) – Croad Langshan Jul 08 '18 at 21:59
  • Maybe my machine is too slow? It would be interesting to see a video screencast. – Croad Langshan Jul 08 '18 at 22:01