unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Anders Lindgren <andlind@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16129@debbugs.gnu.org
Subject: bug#16129: 24.3.50; Emacs slow with follow-mode when buffer ends before last window
Date: Thu, 16 Jan 2014 13:24:16 +0100	[thread overview]
Message-ID: <CABr8ebbZ2yHSiuPV4e6aJU=bG+uY3GuFbTmLUvoSjf+PucDP7w@mail.gmail.com> (raw)
In-Reply-To: <838uui5y4e.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2455 bytes --]

>
> > Basically, it is supposed to do whatever Follow mode does today
>
> That is not specific enough, especially if you take into consideration
> that I have only a vague idea about what Follow mode does.  Moreover,
> I'm not sure we should ask the display engine do everything it does.
> For example, selecting the next/previous window when point moves off
> the limits of the current window seems to be something that is easy to
> do in Lisp.
>
> So please do try to come up with a list of requirements that should be
> moved to the display engine.  I guess setting the window start point
> when scrolling would be one; what else?
>

You're absolutely correct. Most of Follow mode functions could be kept in
elisp. In fact, most of them are trivial, take scrolling for example, it
simple moves the current window down a suitable amount, and let the
post-command hook take care of the rest.

As a starting point, I would say that it's main responsibility is to keep
the windows aligned, so that one window start where the previous left of.
The second thing it should do is that it should "auto select" other windows
when, for example, the cursor moved down below the end of the window.

In short, do what the post-command-hook does.

I will try to give you a deeper description as soon as I can find some time
to do it.



> > > 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.
>
> Shouldn't be hard to implement, given some buffer-local variable.
>

Great. I would suggest that it should be implemented so that the actual
test could be written in elisp. In the Follow mode case, the test should be
that the buffer is in Follow mode and that it's not the first window.
However, I could think of other modes -- one example being Two-column mode,
another Scroll all mode -- where this could be useful, but with other
criterias.

In the simplest form it could be a symbol, nil for "no", t for "yes", and
for all other cases call the function it is bound to. Of course, one could
make it into a hook, so that more than one mode could have a say, but I
think that might be overengineering it a bit...

    -- Anders

[-- Attachment #2: Type: text/html, Size: 3277 bytes --]

  reply	other threads:[~2014-01-16 12:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-13 14:34 bug#16129: 24.3.50; Emacs slow with follow-mode when buffer ends before last window Anders Lindgren
2013-12-13 15:32 ` Eli Zaretskii
2013-12-13 15:36   ` Eli Zaretskii
2013-12-13 16:38 ` Stefan Monnier
2013-12-13 17:55   ` Anders Lindgren
2014-01-02 13:55     ` Anders Lindgren
2014-01-02 18:39       ` Anders Lindgren
2014-01-05 23:13         ` Anders Lindgren
2014-01-06  3:45           ` Eli Zaretskii
2014-01-06  8:20             ` Anders Lindgren
2014-01-06 16:33               ` Eli Zaretskii
2014-01-07  8:13                 ` Anders Lindgren
2014-01-10  9:31                   ` Eli Zaretskii
2014-01-10 18:52                     ` Anders Lindgren
2014-01-10 19:00                       ` Eli Zaretskii
2014-01-13 11:41                         ` Anders Lindgren
2014-01-13 14:47                           ` Stefan Monnier
2014-01-13 16:16                           ` Eli Zaretskii
2014-01-14 12:34                             ` Anders Lindgren
2014-01-14 16:25                               ` Eli Zaretskii
2014-01-16 12:24                                 ` Anders Lindgren [this message]
2014-01-16 14:42                                   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABr8ebbZ2yHSiuPV4e6aJU=bG+uY3GuFbTmLUvoSjf+PucDP7w@mail.gmail.com' \
    --to=andlind@gmail.com \
    --cc=16129@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).