The function `follow-adjust-windows' (part of follow-mode) sometimes fails. Steps to repeat: emacs -Q C-h t C-x 3 C-x 3 M-x balance-windows RET C-x b *scratch* RET Eval the following three expressions: (require 'follow) (let ((owin (selected-window))) (select-window (next-window)) (let ((follow-mode t)) (follow-adjust-window (selected-window) (point-min))) (select-window owin)) OK here, beginning of the buffer is visible. (let ((owin (selected-window))) (select-window (next-window)) (let ((follow-mode t)) (follow-adjust-window (selected-window) (/ (point-max) 2)) (select-window owin))) Here, the intention is that the middle of the buffer should be visible. It's not. This is broken in 24.3 as well as on the trunk. The function was introduced in 24.3, even though similar code was present in `follow-post-command-hook' earlier. This is due to the fact that the function calls `(redisplay)'. However, this work on the current point, which has not been maintained. Fortunately, there seems to be an easy fix, see patch below: 1226,1232c1226,1232 < (goto-char dest) < (redisplay) < ;; If this `redisplay' moved point, we got clobbered by a < ;; previous call to `set-window-start'. Try again. < (when (/= (point) dest) < (goto-char dest) < (redisplay)) --- > (let ((opoint (point))) > (redisplay) > ;; If this `redisplay' moved point, we got clobbered by a > ;; previous call to `set-window-start'. Try again. > (when (/= (point) opoint) > (goto-char opoint) > (redisplay))) Sincerely, Anders Lindgren Ps. I'm the original author of Follow mode, even though I haven't worked on the package for many years. In GNU Emacs 24.3.50.2 (x86_64-apple-darwin13.0.0, NS apple-appkit-1265.00) of 2014-01-13 on macpro.lan Repository revision: 116005 juri@jurta.org-20140113080409-nncncbxckrayrogi Windowing system distributor `Apple', version 10.3.1265 Configured using: `configure --with-ns' Important settings: value of $LC_CTYPE: UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-j C-e ( / SPC d ( p o i n t SPC 2 C-e ) C-j C-e C-j C-e C-j C-SPC w C-x o C-s a d j u s t C-w C-s C-s C-s C-a C-s a d j u s t - w C-w s-b s-b s-b s-b s-b b b b C-s C-w C-w C-w C-s C-s C-a C-SPC C-f w C-x p C-x o C-x o > C-y ( C-a C-k C-k ( g t o o t o - c h a r SPC d e s t ) C-a C-x C-s C-g C-x < C-x C-x C-a C-SPC C-w C-x C-s C-g x e m a c s - r e p r e p o r t - b Recent messages: C-x p is undefined Mark set [2 times] Quit follow-adjust-window Mark set Beginning of buffer # [2 times] Mark set Quit is undefined Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils misearch multi-isearch vc-bzr jka-compr find-func pp help-fns follow debug tutorial help-mode easymenu time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process cocoa ns multi-tty emacs)