From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rahguzar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70038: 29.3.50; Shift up/down in buffer with images on M-x other-window with some fonts Date: Thu, 28 Mar 2024 20:50:49 +0100 Message-ID: <87sf0a2kyh.fsf@zohomail.eu> References: <87ttkrl8w1.fsf@gmail.com> <86zfuihp7t.fsf@gnu.org> <87bk6yl4hu.fsf@gmail.com> <8734sal2bc.fsf@gmail.com> <87wmpm2rd7.fsf@zohomail.eu> Reply-To: Rahguzar Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37495"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.5; emacs 29.3 Cc: Ramon Diaz-Uriarte , Eli Zaretskii , 70038@debbugs.gnu.org To: Rahguzar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 28 20:53:35 2024 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 1rpvoZ-0009Re-VV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Mar 2024 20:53:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpvoD-0004h0-JU; Thu, 28 Mar 2024 15:53:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpvo7-0004dC-Uf for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 15:53:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpvo5-0007Z5-Mf for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 15:53:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rpvo6-0001Iw-5y for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 15:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rahguzar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Mar 2024 19:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70038 X-GNU-PR-Package: emacs Original-Received: via spool by 70038-submit@debbugs.gnu.org id=B70038.17116555464944 (code B ref 70038); Thu, 28 Mar 2024 19:53:02 +0000 Original-Received: (at 70038) by debbugs.gnu.org; 28 Mar 2024 19:52:26 +0000 Original-Received: from localhost ([127.0.0.1]:41190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpvnV-0001Hf-JL for submit@debbugs.gnu.org; Thu, 28 Mar 2024 15:52:26 -0400 Original-Received: from sender-pp-o91.zoho.eu ([136.143.169.91]:37294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpvnQ-0001HT-QS for 70038@debbugs.gnu.org; Thu, 28 Mar 2024 15:52:24 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1711655530; cv=none; d=zohomail.eu; s=zohoarc; b=grymMb5x/NJG4uIeDCu77rpWV7LUKWhqFU4IwIVSICLWC1HBFet+8N0qNSOugOh8H4kqLuq4KA3Xv4XEGQl7KXnLawHjFS/Gp8dDVNK5YDB+v/XT2op727nZ42UlHkEItsA5un3UB2r6w/fxVdBWljxnoRv0umHAY82zJl6rlFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1711655530; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=poFb8r6Wajjpfv7oLZkOXlkrSHur18Panxeh+4V4ArE=; b=Y5Ki6tH4P9tW+mlkyAqlhjCNzcU7NvmZwgqaMswhZRGvaFn4qtY0FfS1Jz4u0c1qY2xqQL8/ODlaVV4aQUVc6SKW2U15JO8Iej7WfAABhtPIotnVWGdhyTD+HwmjCRm8KRYpgRO/sonEoAlgh5swE3RDVjHZo8saaXeE4BpQrHQ= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=zohomail.eu; spf=pass smtp.mailfrom=rahguzar@zohomail.eu; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1711655530; s=zoho; d=zohomail.eu; i=rahguzar@zohomail.eu; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To; bh=poFb8r6Wajjpfv7oLZkOXlkrSHur18Panxeh+4V4ArE=; b=MBBPT26MmYxNA78SaUP9rQyyNykxNX3aAJs1E1gsMR/uKmJwES3p6mBVy3AsAZ2e L3FMSrfLo+W+RGlIdq/nBdtKhlLW+QULC0IcDUrT2IBHMa23JY9vXJo2+DorFCguZaQ 9+vEoOTQ7xZiHkuiqg5qxjveoK/UEH9BQhhm9FYY= Original-Received: from localhost (46.252.3.32 [46.252.3.32]) by mx.zoho.eu with SMTPS id 1711655528157490.5786491377572; Thu, 28 Mar 2024 20:52:08 +0100 (CET) In-reply-to: <87wmpm2rd7.fsf@zohomail.eu> X-ZohoMailClient: External 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282254 Archived-At: On further testing, (setq read-minibuffer-restore-windows nil) makes the problem go away. Rahguzar writes: > Hi Ramon, > > Ramon Diaz-Uriarte writes: > >> Actually, maybe I can claim those bonus points: this does not depend on fonts, though I am triggering it using the package vertico (so maybe this example is vertico's fault): >> >> >> Steps: >> >> 1. emacs -Q >> 2. eval this code >> >> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >> (package-initialize) >> (vertico-mode 1) >> >> (progn >> (defun pin-vscroll-down (win) >> (set-window-vscroll win 200 t)) >> (let* ((height (/ (* 2 (frame-pixel-height)) 15)) >> (image1 (create-image "/tmp/image1.png" nil nil :height height)) >> (image2 (create-image "/tmp/image2.png" nil nil :height height)) >> (image3 (create-image "/tmp/image3.png" nil nil :height height))) >> (with-current-buffer (get-buffer-create "*image-scroll-test*") >> (insert " \n \n \n \n \n \n") >> (put-image image1 1) >> (put-image image2 5) >> (put-image image3 9) >> ;; With larger image sizes (goto-char 3) >> ;; also consistently triggers the problem. >> (goto-char 11) >> (add-hook 'pre-redisplay-functions #'pin-vscroll-down nil t)) >> (split-window-right) >> (other-window 1) >> (switch-to-buffer "*image-scroll-test*"))) >> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >> >> 3. Do `M-x` (or C-x b). No need to execute anything or switch buffers, just have the minibuffer show options. >> >> 4. `C-x o` a few times. You'll see the images move up and down. >> >> I am seeing this in Lucid and GTK builds. > > I can also reproduce this now! And vertico mode can be replaced with the > builtin icomplete-vertical-mode. So, the following recipe starting with > emacs -Q works for me: > > 1) Paste > (let ((height (/ (* 2 (frame-pixel-height)) 15))) > (icomplete-vertical-mode) > (defun pin-vscroll-down (win) > (set-window-vscroll win (/ height 2) t)) > (let ((image1 (create-image "~/Downloads/image1.png" nil nil :height height)) > (image2 (create-image "~/Downloads/image2.png" nil nil :height height)) > (image3 (create-image "~/Downloads/image3.png" nil nil :height height))) > (with-current-buffer (get-buffer-create "*image-scroll-test*") > (insert " \n \n \n \n \n \n") > (put-image image1 1) > (put-image image2 5) > (put-image image3 9) > ;; With larger image sizes (goto-char 3) > ;; also consistently triggers the problem. > (goto-char 11) > (add-hook 'pre-redisplay-functions #'pin-vscroll-down nil t)) > (split-window-right) > (other-window 1) > (switch-to-buffer "*image-scroll-test*"))) > > into scratch buffer. > > 2) Evaluate the form above using `C-M-x`. > > 3) Type M-x t > > 4) Wait till minibuffer expands to show completions, then type `C-g` to > quit minibuffer. > > 5) Typing `C-x 0` results in the window with images losing vscroll. > >> Best, >> >> R. > > Rahguzar