[Top][All Lists]

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

Re: Framework extending window functions for Follow Mode (etc.).

From: Alan Mackenzie
Subject: Re: Framework extending window functions for Follow Mode (etc.).
Date: Wed, 11 Nov 2015 16:15:57 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, John.

On Tue, Nov 10, 2015 at 04:34:13PM -0800, John Wiegley wrote:
> >>>>> Alan Mackenzie <address@hidden> writes:

> > Still, you've been giving me ideas. The ideal place to implement Follow Mode
> > would be inside the display engine, mainly in C. Then we could truly treat a
> > "multiple" window as a single object. Such a "multiple" window could, for
> > example, have a single (vertical) scroll bar and possibly a single mode
> > line. Although it wouldn't be all that easy to implement, it probably
> > wouldn't be as difficult as all that. I'm guessing it would take longer than
> > Friday 13th November to finish, though.

> These are some intriguing thoughts. The 25.1 release cycle may last a while,
> so this could still land in a few weeks (beyond the freeze), out of respect
> for your efforts to do this right. If it gets too late, though, it would be
> better in 25.2 (which I'm hoping will follow just a few months later).

Adapting the display engine to handle Follow Mode type functionality is
something that, perhaps, Eli could implement in a few days.  It would
take me many weeks, at best.  Even specifying precisely what it would
have to do is far from trivial.

> > No, but a screen shot wouldn't really be helpful. It's behaviour rather than
> > appearance that matters here. A video would be the best thing, if I had the
> > technology to make one. Maybe the best thing would be for me to make the
> > patch available in some fashion so that you can try it out. The total size
> > of the two patches is currently ~1700 lines (About 350 lines for Isearch,
> > and 1350 lines for the framework, including documentation changes). As yet,
> > nobody else is using it. The patch has not yet left my PC (apart from backup
> > copies).

> Would you be available via Firefox Hello some evening, so that you could share
> you screen and give me a demo? I'd like to get a better feel for this than my
> imagination. I'm available right now in fact. :)

I don't seem to have Hello in my Firefox, though I've got version 38.4.
Perhaps the folk at Gentoo stripped it out for some reasone, or I built
it with some "use flag" (sorry for the Gentoo jargon) not set.  Or

I have finally uploaded the source to savannah, in branch
scratch/follow (assuming git hasn't fooled me about this).  Why don't
you try it out yourself?

Successively, in standard master and the scratch/follow branch, do this:
1. emacs -Q

2. (global-set-key [next] 'follow-scroll-up)
   (global-set-key [prior] 'follow-scroll-down)
   (setq isearch-allow-scroll t)

3. C-x C-f path/to/src/xdisp.c

4. C-x 3,  C-x 3,  C-x +,  M-x follow-mode  (if necessary, use the mouse
to make the frame wide).

5. C-s t e x t.  Pause between the letters, and note the lazy
highlighting.  It should extend over all 3 windows.  Play around with
various search texts.

6. (Still in C-s t e x t).  Repeatedly do C-s.  Point should move onto
the middle window, then the RH window, then (and only then) the whole
collection should scroll.

7. (Not in C-s): Move point some distance away from the beginning of
buffer.  Start a C-s, and manipulate things such that the current match
is in the middle window.  <PageUp> and <PageDown> should scroll the
current match BETWEEN WINDOWS.

8. Start a C-s near the bottom of the LH window.  Continually do M-s
C-e, until the highlighted search area is split between LH and middle
windows.  Everything should display properly at this point.  Continue
doing M-s C-e, until the echo area expands by one line.  Everything
should continue to display properly.


9. (Inside the xdisp.c code area): Find a pair of braces not too far
apart, on the same window.  Delete the closing brace, then retype it.
Note how the cursor jumps to the matching opening brace.  Now scroll the
text such that the two braces are on neighbouring windows.  When you do
the same, instead of the momentary jump to the opening brace, you get a
message instead.

This is a bug, if a small one.  It is the sort of thing that can be
corrected trivially by the new framework; adding a 't' argument to the
invocation of a primitive is all it would take.

> John

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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