From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.bugs Subject: bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer Date: Thu, 15 Sep 2022 13:31:48 -0400 Message-ID: Reply-To: sds@gnu.org Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26936"; mail-complaints-to="usenet@ciao.gmane.io" To: 57837@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 15 19:33:06 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 1oYsjX-0006jO-Mc for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 19:33:03 +0200 Original-Received: from localhost ([::1]:48130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYsjW-0002W6-JQ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 13:33:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYsiY-0002Qj-62 for bug-gnu-emacs@gnu.org; Thu, 15 Sep 2022 13:32:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42180) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYsiX-0003Tm-UB for bug-gnu-emacs@gnu.org; Thu, 15 Sep 2022 13:32:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYsiX-0008WB-Nz for bug-gnu-emacs@gnu.org; Thu, 15 Sep 2022 13:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sam Steingold Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Sep 2022 17:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57837 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166326311732730 (code B ref -1); Thu, 15 Sep 2022 17:32:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Sep 2022 17:31:57 +0000 Original-Received: from localhost ([127.0.0.1]:59112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYsiS-0008Vp-KI for submit@debbugs.gnu.org; Thu, 15 Sep 2022 13:31:57 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:33432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYsiQ-0008Vg-Cu for submit@debbugs.gnu.org; Thu, 15 Sep 2022 13:31:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYsiQ-0002QG-7f for bug-gnu-emacs@gnu.org; Thu, 15 Sep 2022 13:31:54 -0400 Original-Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:34575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYsiO-0003P0-At; Thu, 15 Sep 2022 13:31:53 -0400 Original-Received: by mail-qt1-x832.google.com with SMTP id g12so13737145qts.1; Thu, 15 Sep 2022 10:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:reply-to:return-receipt-to:subject:to :from:sender:from:to:cc:subject:date; bh=HPk7vGguGe4D6KC3mb5JgXUslZdEOwIoGDYXh+AIH8w=; b=nRh/Y7jEtKd7FvptOZRkjP9Pc5RZa5kmDLQzoMWlsLQs3R6/Ayt1R0rTM7hH0uZ1ty 1m3C94CIALHfpdunDY3b3h5DEUIES7fMNsRsxW5A1Iu6ftCqjF2d/2a67K50qKmOMYsL K4/c7l58mDJbrE4KqJspHpwENlmOU+cz763w+i8A13WoJn3a+oEjIZioCEcBVwoSc2vV kc9KGRRSxq/ocVkVN24kRve4RoY6yA3pS/bJe8mlvITMRdyYnK2q5IhJawFZWYWODDw1 Z9HyDtMTtJfS1w9yQGEr7Q29EY55TrxkCTdAKdV5mM2Sn2aQylCtFC2sFzqKUX4a2NpL 8X5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:reply-to:return-receipt-to:subject:to :from:sender:x-gm-message-state:from:to:cc:subject:date; bh=HPk7vGguGe4D6KC3mb5JgXUslZdEOwIoGDYXh+AIH8w=; b=WBM7CqFG0td9+2KPskFHptkaYWy0W8HjQQ/GGC/+hCFNONz4kQfiauTkycbc9rp6BL vUCXOWzGTMPnlNW7F9wNj0oAuZdUCLNe4PjrC6Rj7xsS1599iLJGMFG82Pqztapx4Qjm klFnhvIfQq3cYnoKkcOPt45qSLlHuDNpVUzzPlxoCFg2tDOUlLcOVdN6yjhPKWQnTIie 94tlDkhELE9HF5HhQqZTMD1hxTaewyaqGoOvdJ6ERzRGilQukJmvu/N23cqcUrAUUnnx leoHD5lkWTrqGE9oJQFX9nldqYzsTFl376P/9NulNsVeQd4TZU4sb4AHEDY/r1x1NpKB Znkw== X-Gm-Message-State: ACrzQf2/s29YGYRV51JTUDKSkcIIE7hn1V8sARb1Yrcv/XMtDXrH0531 f70JfSuwvzO2jQoEapdKaDMrG1L3c8iv X-Google-Smtp-Source: AMsMyM6XD0J1W+0m8sNkGTrQbI5dSCW1yDKcxvVbTDrNPznuVOLu+KEtwxgClQAS23elEGi1/ivMrw== X-Received: by 2002:ac8:5c0e:0:b0:35b:b4d8:bd09 with SMTP id i14-20020ac85c0e000000b0035bb4d8bd09mr869720qti.311.1663263110030; Thu, 15 Sep 2022 10:31:50 -0700 (PDT) Original-Received: from 3c22fb11fdab.ant.amazon.com (pool-71-125-32-130.nycmny.fios.verizon.net. [71.125.32.130]) by smtp.gmail.com with ESMTPSA id a12-20020a05620a16cc00b006a5d2eb58b2sm4077223qkn.33.2022.09.15.10.31.49 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Sep 2022 10:31:49 -0700 (PDT) X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Received-SPF: pass client-ip=2607:f8b0:4864:20::832; envelope-from=sam.steingold@gmail.com; helo=mail-qt1-x832.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:242622 Archived-At: Hi, When the buffer is smaller than the window, move the point to the end and do `C-x w -` (fit-window-to-buffer). The window shrinks, but it is empty - the whole buffer is above. One has to move the point to the beginning-of-buffer to make the buffer visible. I think this is a bug - the window should show the whole buffer; after all this is the raison d'etre of `fit-window-to-buffer', right? Basically, after `fit-window-to-buffer' is called, the following should evaluate to t: --8<---------------cut here---------------start------------->8--- (and (pos-visible-in-window-p (point-min)) (pos-visible-in-window-p (point-max))) --8<---------------cut here---------------end--------------->8--- Thank you. In GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.5.1 (Build 21G83)) of 2022-09-13 built on 3c22fb11fdab.ant.amazon.com Repository revision: 7df898d532f922ea2a7acce4446bc35eec1da38e Repository branch: master Windowing system distributor 'Apple', version 10.3.2113 System Description: macOS 12.5.1 Configured using: 'configure 'LDFLAGS=-fsanitize=address -fno-omit-frame-pointer' 'CFLAGS=-g -O0 -fsanitize=address -fno-omit-frame-pointer'' Configured features: ACL GIF GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP ZLIB Important settings: value of $LANG: C locale-coding-system: utf-8-unix Major mode: Help Minor modes in effect: outline-minor-mode: t pyvenv-mode: t shell-dirtrack-mode: t global-edit-server-edit-mode: t winner-mode: t which-function-mode: t url-handler-mode: t desktop-save-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t isearch-fold-quotes-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t -- Sam Steingold (https://aphar.dreamwidth.org/) on darwin Ns 10.3.2113 https://lastingimpactpsychology.com https://steingoldpsychology.com https://camera.org https://www.dhimmitude.org https://fairforall.org If you need to keep a secret, keep it a secret that you have a secret to keep.