[Top][All Lists]

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

bug#16129: 24.3.50; Emacs slow with follow-mode when buffer ends before

From: Anders Lindgren
Subject: bug#16129: 24.3.50; Emacs slow with follow-mode when buffer ends before last window
Date: Tue, 14 Jan 2014 13:34:23 +0100

> Sounds like a good idea to post this feature request. However, being a
> realist, I doubt that this will happen anytime soon.

You mean, the list of requirements, or their implementation?  I hoped
the former should not be too hard to come up with, especially for
someone who is familiar with follow-mode.

I mean the implementation -- adding this to the display engine is a major undertaking. If it gets put on hold, or prove more complicated then anticipated, I think that we can improve the current implementation with a relatively small effort.

I think that we can come up with a list of requirements relatively easy. Basically, it is supposed to do whatever Follow mode does today, with a few exceptions (well, right now I can only think of one):

* It should be applied to all visible windows where Follow mode is active. (Follow mode today only act upon the selected window -- Mainly for efficiency reasons.)

> I would suggest that we also post feature requests for things that would
> help the situation on a shorter time scale. Primarily, I would like to be
> able, on a window-by-window basis, control whether or not a window should
> be recentered, when empty.

What should Emacs do instead of recentering a window?

It should keep the window empty.

Follow mode tries to create the illusion of a combining several windows into one very tall window. When the tail of the buffer doesn't reach the last window(s), for example when you have opened a very small file, follow mode wants the remaining window(s) to be empty. Today, Emacs prevents this by recentering them, breaking the illusion. (This, of course, does not apply to the first window in a sequence of windows, because then you still want the normal recentering.) Follow mode, today, sets the window-start to point-max in those windows whenever it has a chance, to prevent the recentering.

Stefan wrote:
> The region highlighting
> has been moved to Elisp, and it seems that follow-mode's highlighting
> code seems to interact poorly with the new behavior.
> But the good news is that follow-mode could use the new Elisp
> highlighting to "do it right" (no need to use hacks to try and coerce
> the redisplay to highlight the region over more than one window).

I will look into it the first chance I get! Where is the implementation located, and what interface do I have to make it appear in more than one window?

The current Follow mode implementation of getting the highlight region into more than one window stopped working years ago (when Emacs decided that it should only show the region in the selected window).

    -- Anders

reply via email to

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