all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Anders Lindgren <andlind@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 15957@debbugs.gnu.org
Subject: bug#15957: 24.3.50; Follow mode scrolling broken on Emacs trunk
Date: Sat, 23 Nov 2013 23:01:24 +0100	[thread overview]
Message-ID: <CABr8ebZBUWzCWpca=M=KTARXZCooADu0Uy5bVwBE6S=9SxjOzQ@mail.gmail.com> (raw)
In-Reply-To: <52909877.1070203@gmx.at>

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

Hi!

No, the actual numbers don't appear to be important. I simply picked some
numbers to make sure the frame was wide enough for two side-by-side
windows. I tried 40 instead of 70 and you get the same effect.

I really doubt that the code in `follow-scroll-up' is broken. Follow-mode
is designed so that the rearrangement of the other windows (the ones that
follow the selected window) occur in the post-command hook (to allow
Follow-mode to act upon all Emacs commands, not only it's special
function). It appears that something has changed in the display engine, or
in the way that post-command-hook is called, that makes this mechanism
fail. This could also account for the difference we see when the function
is called via a key sequence as compared to via M-x.

This is also the reason why reported this as a bug, rather than digging
into the code myself. However, I could try to add log code to Follow mode,
to check if I could try to figure out what is going on.

    -- Anders





On Sat, Nov 23, 2013 at 12:58 PM, martin rudalics <rudalics@gmx.at> wrote:

> Hi Anders
>
> > Scrolling multiple pages when Follow mode is enabled sometimes fails.
> >
> > Steps to repeat:
> >
> >     Emacs -Q
> >     C-h t
> >     ESC : (set-frame-size (selected-frame) 200 70) RET
>
> Is this really necessary?  70 lines means I can't see my echo area any
> more.
>
> >     M-x follow-delete-other-windows-and-split RET
> >     C-c . C-v
> >
> > The intent is to scroll the entire document two pages down, the left
> > window should still be selected (this causes Follow mode to arrange the
> > right window after it). Instead, the right window is selected,
>
> Can you tell when and where the window on the right is selected?
>
> > which causes
> > the left to be arranged after it, effectively undoing the scroll.
>
> IIUC `follow-scroll-up' should select the proper window via
>
>          (let* ((windows (follow-all-followers))
>                 (end (window-end (car (reverse windows)))))
>            (if (eq end (point-max))
>                (signal 'end-of-buffer nil)
>              (select-window (car windows))
>
> which seems to imply that `follow-all-followers' doesn't return what it
> is supposed to.  Am I correct that the first window returned by the
> latter should be `frame-first-window'?  In that case try to replace the
> last line of `follow-all-followers' by something like
>
>     (prog1
>         (setq windows (sort windows 'follow--window-sorter))
>       (unless (eq (car windows) (frame-first-window (window-frame win)))
>         (error "Bad windows %s" windows)))))
>
> and maybe this way we can find out whether the problem is there.
>
> > The problem seems to be sometimes intermittent, sometimes the scroll
> works,
> > sometimes it don't.
> >
> > An interesting effect is that the problem only occurs when
> > follow-scroll-up is bound to a key. When issuing M-x follow-scroll-up
> > RET, the command seems to be working properly.
>
> I have no idea why this could change the course of things because ARG
> should be nil in both cases.
>
> > By the way, I'm the original author of Follow mode, even tough I haven't
> > touched it for many years.
>
> I suppose you should touch it again ;-)
>
> martin
>

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

  reply	other threads:[~2013-11-23 22:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 22:23 bug#15957: 24.3.50; Follow mode scrolling broken on Emacs trunk Anders Lindgren
2013-11-23 11:58 ` martin rudalics
2013-11-23 22:01   ` Anders Lindgren [this message]
2013-11-24 10:10     ` martin rudalics
2013-11-25  9:19       ` Anders Lindgren
     [not found]         ` <CABr8ebbnxDgVF-+pdk955Ux-SQuZDONw=OhHOVUdO9d=xsTcZg@mail.gmail.com>
2013-11-25 16:42           ` martin rudalics
2013-11-26  6:33             ` Dmitry Antipov
2013-11-26 11:01               ` Anders Lindgren
2013-11-26 14:12                 ` martin rudalics
2013-11-26 14:25                   ` Anders Lindgren
2013-11-26 16:19                     ` martin rudalics
2013-11-26 17:03                       ` Anders Lindgren
2013-11-26 17:21                         ` martin rudalics
2013-11-27  7:48                         ` martin rudalics
2014-01-04 14:12                           ` martin rudalics

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

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

  git send-email \
    --in-reply-to='CABr8ebZBUWzCWpca=M=KTARXZCooADu0Uy5bVwBE6S=9SxjOzQ@mail.gmail.com' \
    --to=andlind@gmail.com \
    --cc=15957@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /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 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.