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

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

Inconsistent recentering around arbitrary point


From: Vasilii Kolobkov
Subject: Inconsistent recentering around arbitrary point
Date: Thu, 21 Jan 2021 17:56:59 +0200

Hello Emacs folks!

I'm trying to display a file at particular position along my current
window like this:

(let ((file "~/somewaht-big.org")
      (pos 10000))
  (with-selected-window
      (display-buffer (find-file-noselect file))
    (goto-char pos)
    (recenter)))

Yet i don't get consistent results.  E.g. if i have a buffer visiting
that file burried, then i'm likely to get point set before the expected
value.  That doesn't happen if i try it on large plain text files.

What am i missing here?



reply via email to

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