From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer Date: Sat, 17 Sep 2022 09:48:43 +0300 Message-ID: <83a66y3390.fsf@gnu.org> References: <84acc36e7e03e4cba89d@heytings.org> <84acc36e7e748d1b29fd@heytings.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16086"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57837@debbugs.gnu.org, sds@gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 17 08:49:18 2022 Return-path: Envelope-to: geb-bug-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 1oZRde-00040t-Ct for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Sep 2022 08:49:18 +0200 Original-Received: from localhost ([::1]:36616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZRdc-0001Cj-TQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Sep 2022 02:49:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZRdP-0001CZ-9m for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2022 02:49:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45968) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZRdO-0004On-JJ for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2022 02:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZRdO-00073t-Eu for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2022 02:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Sep 2022 06:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57837 X-GNU-PR-Package: emacs Original-Received: via spool by 57837-submit@debbugs.gnu.org id=B57837.166339733727126 (code B ref 57837); Sat, 17 Sep 2022 06:49:02 +0000 Original-Received: (at 57837) by debbugs.gnu.org; 17 Sep 2022 06:48:57 +0000 Original-Received: from localhost ([127.0.0.1]:45045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZRdI-00073S-HH for submit@debbugs.gnu.org; Sat, 17 Sep 2022 02:48:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZRdD-00072z-5Y for 57837@debbugs.gnu.org; Sat, 17 Sep 2022 02:48:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55848) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZRd7-0004Na-Ti; Sat, 17 Sep 2022 02:48:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=rpOjkOSfL5IxMnU8clJXF9TKQEsIxRx9hJEk7ydrexA=; b=QH2+S4TK2str K0fhMOEp7odol634AyRCMVomgJsBtXLlkIuMCMtM3t9QzKifYQIVyqLJVGYdzAw0TsOB8nxRtoOtX S7fvc6cKrzvmrUEW4u4r0e/Sa3FrbmNQQnVBJ2LFvxtg26pRoBlQkl6CiwBSBtfqr7CL7OGfpbFfy 2/fCL1S2msrDK57m//5KgIeS2KPF1VV2kg5D/mZ1NDwAzO8/oY8EBNAr/ZHHc7Ox+yeDEofnLRznS Nf064YE/KQgmehJ033wVyjE7/mz3Ba+ZvkK96sKD4Zvp5yXfaNwB/wPv3QNRGBGQ7LQEh1XanFUey LUiYvi+5ERiLIoJ7h7bhiw==; Original-Received: from [87.69.77.57] (port=2367 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZRd6-0004rw-1k; Sat, 17 Sep 2022 02:48:45 -0400 In-Reply-To: <84acc36e7e748d1b29fd@heytings.org> (message from Gregory Heytings on Fri, 16 Sep 2022 21:34:01 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:242834 Archived-At: > Cc: 57837@debbugs.gnu.org > Date: Fri, 16 Sep 2022 21:34:01 +0000 > From: Gregory Heytings > > > is it possible for Emacs return nil from (pos-visible-in-window-p > > (point)) > > It is not impossible, but if it happens, it's a bug. Actually, it _is_ possible and is not a bug, but only as long as redisplay didn't happen. IOW, you can, for example, write a command that moves point in a way that would make point be outside of the window, and then pos-visible-in-window-p will return nil for it. But as soon as the command finishes, redisplay will scroll the window to bring point into view. This is exactly what you see in this case. > I get that that's your preference, but I hope you understand that this is > a corner case, and that what the code does is not a bug. Right.