From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: Emacs recentres point in buffer if it is moved anywhere -- annoying! Date: Thu, 19 Feb 2015 17:49:08 +0000 Message-ID: <877fvdeqqz.fsf@robertthorpeconsulting.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424368186 25278 80.91.229.3 (19 Feb 2015 17:49:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Feb 2015 17:49:46 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: David Vaughan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 19 18:49:33 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YOVE8-0006rd-E8 for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Feb 2015 18:49:28 +0100 Original-Received: from localhost ([::1]:57471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOVE7-0003Ax-Gp for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Feb 2015 12:49:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOVDw-00038z-6T for help-gnu-emacs@gnu.org; Thu, 19 Feb 2015 12:49:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOVDr-0004Nf-6V for help-gnu-emacs@gnu.org; Thu, 19 Feb 2015 12:49:16 -0500 Original-Received: from outbound-smtp03.blacknight.com ([81.17.249.16]:41119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOVDr-0004NI-1X for help-gnu-emacs@gnu.org; Thu, 19 Feb 2015 12:49:11 -0500 Original-Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp03.blacknight.com (Postfix) with ESMTPS id 9DB76988B8 for ; Thu, 19 Feb 2015 17:49:09 +0000 (UTC) Original-Received: (qmail 26733 invoked from network); 19 Feb 2015 17:49:09 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.79.91.27]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 19 Feb 2015 17:49:09 -0000 In-Reply-To: (message from David Vaughan on Wed, 18 Feb 2015 14:17:40 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.16 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102811 Archived-At: David Vaughan 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