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 18:24:32 +0100 Message-ID: <87wmpm2rd7.fsf@zohomail.eu> References: <87ttkrl8w1.fsf@gmail.com> <86zfuihp7t.fsf@gnu.org> <87bk6yl4hu.fsf@gmail.com> <8734sal2bc.fsf@gmail.com> 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="27184"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.5; emacs 29.3 Cc: Eli Zaretskii , 70038@debbugs.gnu.org To: Ramon Diaz-Uriarte Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 28 18:34:26 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 1rptdy-0006o6-FV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Mar 2024 18:34:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rptdd-0006dg-Rg; Thu, 28 Mar 2024 13:34:05 -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 1rptdZ-0006dR-Iz for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 13:34:01 -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 1rptdZ-0004t2-AH for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 13:34:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rptdZ-0000dN-UP for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 13:34: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 17:34:01 +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.17116472382415 (code B ref 70038); Thu, 28 Mar 2024 17:34:01 +0000 Original-Received: (at 70038) by debbugs.gnu.org; 28 Mar 2024 17:33:58 +0000 Original-Received: from localhost ([127.0.0.1]:41074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rptdU-0000ca-B7 for submit@debbugs.gnu.org; Thu, 28 Mar 2024 13:33:57 -0400 Original-Received: from sender-pp-o91.zoho.eu ([136.143.169.91]:37251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rptdQ-0000cF-FE for 70038@debbugs.gnu.org; Thu, 28 Mar 2024 13:33:54 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1711647223; cv=none; d=zohomail.eu; s=zohoarc; b=VeU9DX/UezY/b499ucFh6T8fsU688xKVEH+89liPhR69HWAdruhJWSy+lhK1cTEOrIR6oK1SEEmhnf1als2346c2EMFkLE9MtDqXfmPas77VfvwiPNdpYzz3bDP3dOi6FmGZn3zMELTRfZDe7WV4FgskJkTtizcFdOzPNCunNgs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1711647223; 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=7zw9oSFasC/FleAjtDPaCI/P0RWP/7Qx/sRokUXRT/E=; b=WCUC/KJIE4BWOvSacLAyFE9LGDefKlZPbgB4UtJ2p++OUPluKctH0Z6umi5x/n6SPjDGerJ4VxnZJ7nDeOgoVN5Fej5jsMgtsfqeyctXvaEo6Kwr10hiZwPjNmZ8Sz+QVaJlxDVFmtPjjGmS89+rFmDL81Ap9W38VGRLQKatE9U= 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=1711647223; 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=7zw9oSFasC/FleAjtDPaCI/P0RWP/7Qx/sRokUXRT/E=; b=SDhO5nfs7Av48GroMQHYMul0T7yCmLl5UuJMOAO0s+Wqz/07u6WPoR2ubOudmzVt I0Gk9yE1Kb2siMAVZDheZdZ4T4E8Pv6x4uXfYGcROBiJlG/KTvWbLG1awiXuhYf8MLL 1aIitTiSrkC/JoEJBnQ6rwgpuFXZCIbEHTrXfvYs= Original-Received: from localhost (emp-94-233.eduroam.uu.se [130.238.94.233]) by mx.zoho.eu with SMTPS id 1711647221898380.5644683513219; Thu, 28 Mar 2024 18:33:41 +0100 (CET) In-reply-to: <8734sal2bc.fsf@gmail.com> 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:282245 Archived-At: 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