unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Mario Valencia <mariovalspi@gmail.com>
Cc: 20122@debbugs.gnu.org
Subject: bug#20122: auto-revert and list-buffers cause buffer recentering
Date: Mon, 16 Mar 2015 22:07:28 +0200	[thread overview]
Message-ID: <83k2ygzoxr.fsf@gnu.org> (raw)
In-Reply-To: <CA+3HrJXJ6yoAb+6XbMKD2ae8MDdhn1BESkECXmP3+badR94PGA@mail.gmail.com>

> Date: Mon, 16 Mar 2015 12:20:03 -0600
> From: Mario Valencia <mariovalspi@gmail.com>
> 
> do the following:
> (global-auto-revert-mode)
> (setq global-auto-revert-non-file-buffers t)
> 
> then M-x list-buffers
> now open a file and move down a page at least. the file begins
> auto-recentering. the line with the cursor moves toward the center.

It's a bug in tabulated-list-print: it calls 'recenter' without
ensuring that its buffer, in this case "*Buffer List*", is in the
selected window.  Here's the Lisp backtrace to prove this:

  Lisp Backtrace:
  "recenter" (0x82dd80)
  "tabulated-list-print" (0x82e08c)
  "tabulated-list-revert" (0x82e384)
  "revert-buffer" (0x82e678)
  "auto-revert-handler" (0x82e978)
  "auto-revert-buffers" (0x82ed4c)
  "apply" (0x82ed48)
  "byte-code" (0x82efcc)
  "timer-event-handler" (0x82f40c)

I think the easiest solution is simply to remove the call to
'recenter', it's not really needed there, just a nicety.





  reply	other threads:[~2015-03-16 20:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16 18:20 bug#20122: auto-revert and list-buffers cause buffer recentering Mario Valencia
2015-03-16 20:07 ` Eli Zaretskii [this message]
2015-03-16 22:39   ` Glenn Morris
2015-03-17  7:17     ` Eli Zaretskii
2015-03-17 16:39       ` Stefan Monnier
2015-03-21 10:05         ` Eli Zaretskii
2015-03-21 10:05         ` Eli Zaretskii

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=83k2ygzoxr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=20122@debbugs.gnu.org \
    --cc=mariovalspi@gmail.com \
    /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).