help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Emacs recentres point in buffer if it is moved anywhere -- annoying!


From: Robert Thorpe
Subject: Re: Emacs recentres point in buffer if it is moved anywhere -- annoying!
Date: Thu, 19 Feb 2015 17:49:08 +0000

David Vaughan <address@hidden> writes:

> It seems that:
>
> (setq global-auto-revert-non-file-buffers nil)
>
> has fixed it. (Previously I was setting that to 't'.)

Yes, it's auto-reverting buffer-lists specifically that triggers this
bug.  You can auto-revert other types of non-file buffer safely AFAIK.

The following diff was sent by Nicolas Richard in June 2014 to
emacs-devel.  I don't know why this isn't fixed in Emacs 24.4.  That
said I haven't tried it, I've just disabled auto-reverting.

diff --git a/lisp/emacs-lisp/tabulated-list.el 
b/lisp/emacs-lisp/tabulated-list.el
index d0d71dd..dd1166f 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -323,7 +323,9 @@ to the entry with the same ID element as the current line."
     (if saved-pt
        (progn (goto-char saved-pt)
               (move-to-column saved-col)
-              (recenter))
+              (when (eq (window-buffer (selected-window))
+                         (current-buffer))
+                 (recenter)))
       (goto-char (point-min)))))
 
 (defun tabulated-list-print-entry (id cols)

BR,
Robert Thorpe



reply via email to

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