From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vasilii Kolobkov Newsgroups: gmane.emacs.help Subject: Inconsistent recentering around arbitrary point Date: Thu, 21 Jan 2021 17:56:59 +0200 Message-ID: <87k0s6xoz8.fsf@orangeshoelaces.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36775"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 21 16:58:02 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2cLQ-0009Op-NE for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 21 Jan 2021 16:58:00 +0100 Original-Received: from localhost ([::1]:48554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2cLP-0000Be-QA for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 21 Jan 2021 10:57:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2cKa-0000AN-6m for help-gnu-emacs@gnu.org; Thu, 21 Jan 2021 10:57:08 -0500 Original-Received: from orangeshoelaces.net ([71.19.146.160]:24091) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2cKY-00031X-Bt for help-gnu-emacs@gnu.org; Thu, 21 Jan 2021 10:57:07 -0500 Original-Received: from orangeshoelaces.net (localhost [127.0.0.1]) by orangeshoelaces.net (OpenSMTPD) with ESMTP id 98799562 for ; Thu, 21 Jan 2021 07:57:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=orangeshoelaces.net; h= from:to:subject:date:message-id:mime-version:content-type; s= mail; bh=f8DEKzVX3xv53cEuleFQxVl19pM=; b=nHTyS1EKqG2EyxDvTK5yfan 3rfd3J50omB1skw3cfph0s7A+XPCr3eeZ5JFQ/t6jLeQPzd5JHU3vE/h7sGfOA9e lrkA4r8TjEvGDtX2BIQNQiCKJTGRSAokZCrk1Lw+IZ6KRxxKmTVddiyklj2g63Kj +ArRUd43UMWZ1b1FfPfE= Original-Received: by orangeshoelaces.net (OpenSMTPD) with ESMTPSA id f956fc7f (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Thu, 21 Jan 2021 07:57:04 -0800 (PST) Original-Received: by squalideel (Exim) for help-gnu-emacs@gnu.org; Thu, 21 Jan 2021 15:56:59 +0000 Received-SPF: pass client-ip=71.19.146.160; envelope-from=vasilii@orangeshoelaces.net; helo=orangeshoelaces.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:127309 Archived-At: 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?