From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.devel Subject: Re: Question about weird vscroll behavior Date: Sun, 5 Nov 2023 17:36:26 +0100 Message-ID: References: <8334xk41fx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000068fb0606096a577f" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27081"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 05 17:37:20 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qzg7i-0006mz-GU for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Nov 2023 17:37:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzg79-0007Wh-Fi; Sun, 05 Nov 2023 11:36:43 -0500 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 1qzg78-0007WY-3V for emacs-devel@gnu.org; Sun, 05 Nov 2023 11:36:42 -0500 Original-Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzg76-00074Z-Av; Sun, 05 Nov 2023 11:36:41 -0500 Original-Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40853c639abso27799905e9.0; Sun, 05 Nov 2023 08:36:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699202198; x=1699806998; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jf/4xyLjkONwp+2hyC2iSXQpplvKU/wOrSX7AM7+jW4=; b=MPGzBzixkhBlukth34n+mVh4/4Aqzo2870OsUkqDRZfXwMAKe2igQ/FIuIAnZuBigk TUm6qNfOnl9clZ+dprhnocbD/63uV4NW1hAgCvVb0W9j7W21YAJYREkDsI1e+KPmtdEx FraGRyEwHkMy/jLkXtVyOR6mQB1F9O+jkXBZ03cKpg59yWJuns3hrWu68utqdh4r/SK3 LuUsHfJtkXqv6PmevnFR1W8CsG3AD/qgGXUQdVEGOf7lQCUeKz+0I3Q6AYrZK4z1l31m Gct/Ug26rVQaydr9XshRguPbE6hZrT8q1l6hqfaXB9ClNQYokn4Verm1r6DcysTttkHt lG3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699202198; x=1699806998; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jf/4xyLjkONwp+2hyC2iSXQpplvKU/wOrSX7AM7+jW4=; b=CfnaGUOaeS/CIVRb3uc8XD/bZte3bU7BjB1UqJWmQaLpEjRF6dkKWOPAbFmZgKC68S wFOWHo77t5t/Z3Yq6HaQK0iY0ty/LrOTM1HmL+zxe86G+TXJMas9byfAcgly0o0zV+DI qOX39fsD0A7pmOBiYOEQFf9lYr5H48iryT1D2lFxz+v183JQLkeSyRloyAC+ag3F6RSi lMwxGLv3PiytYanijz/4IUXL2dp7Nu7X1UZr2dMLd7U0vSpX1sTFaWgkcCJDxTszbMyq AyBiI/iQV1rxeRzsBauZMbREYSdArBbDhsv99shEge1gx5W8Utdwap8hIxjAcmB9FQqu 5RVQ== X-Gm-Message-State: AOJu0Yz/wJF2g3OevJtnq3g46d37omtlPUPE22+/1aTjNSFUyHz6Yl4N Sjq9KokUg5gX/eUodRnMDZAFZx515pzvfqkr6P6CNtndoRg= X-Google-Smtp-Source: AGHT+IGWwXAiFFEXtKhst7+Acp8MrK94QCVYcXDbMQyB/pQVXD8qhfXi/a9m7cUTWm8Q0rEYkIBc6SoZENeNUOWJF/Q= X-Received: by 2002:a05:600c:4454:b0:407:7e5f:ffb9 with SMTP id v20-20020a05600c445400b004077e5fffb9mr23797866wmn.9.1699202197943; Sun, 05 Nov 2023 08:36:37 -0800 (PST) In-Reply-To: <8334xk41fx.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=dalanicolai@gmail.com; helo=mail-wm1-x329.google.com 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:312252 Archived-At: --00000000000068fb0606096a577f Content-Type: text/plain; charset="UTF-8" Thank you Eli, I just realized I forgot to be clear about my question. The problem is that after evaluating the code, here, after starting from emacs -Q, the vscroll value is still zero. So I was wondering what is the value when doing > M-: (window-vscroll nil t) > after evaluating the example code. So Eli, when you say it works, do you mean that vscroll value is 300? Thanks again... On Sun, 5 Nov 2023 at 17:20, Eli Zaretskii wrote: > > From: dalanicolai > > Date: Sun, 5 Nov 2023 16:49:04 +0100 > > > > It works when I simply load my Emacs configuration, but for some > > reason it does not work when I start from emacs -Q. > > > > Although I guess vscroll should be working on lines smaller than the > > screen, just for testing I now display 3 'spaces' and then try to set > > vscroll as follows: > > > > (progn > > (pop-to-buffer "example") > > (dotimes (i 3) > > (let ((o (make-overlay (point) > > (progn (insert " ") > > (point))))) > > (insert "\n") > > (overlay-put o 'display `(space . (:width (600) :height (800)))) > > (overlay-put o 'face (list :background (pcase (% i 3) > > (0 "red") > > (1 "green") > > (2 "blue")))))) > > (goto-char (point-min)) > > > > (set-window-vscroll nil 300 t)) > > > > I have tested it on Emacs 29.1 and 28.3. > > > > I wonder if this is a bug, or if I am missing something. Could you > > please evaluate the above code starting from emacs -Q, and confirm > > this is a bug (or tell me what I am missing)? > > Works for me in "emacs -Q". > --00000000000068fb0606096a577f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you Eli,

<= div>I just realized I forgot to be clear about my question.
The p= roblem is that after evaluating the code, here,
after starting fr= om emacs -Q, the vscroll value is still
zero.

So I was wondering what is the value when doing
M-: (window-vscroll nil t)
after evaluating the example code.

=
So Eli, when you say it works, do you mean that
vscroll valu= e is 300?

Thanks again...

=
On Su= n, 5 Nov 2023 at 17:20, Eli Zaretskii <eliz@gnu.org> wrote:
> From: dalanicolai <dalanicolai@gmail.com>
> Date: Sun, 5 Nov 2023 16:49:04 +0100
>
> It works when I simply load my Emacs configuration, but for some
> reason it does not work when I start from emacs -Q.
>
> Although I guess vscroll should be working on lines smaller than the > screen, just for testing I now display 3 'spaces' and then try= to set
> vscroll as follows:
>
>=C2=A0 (progn
>=C2=A0 =C2=A0 (pop-to-buffer "example")
>=C2=A0 =C2=A0 (dotimes (i 3)
>=C2=A0 =C2=A0 =C2=A0 (let ((o (make-overlay (point)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(progn (insert " ")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (point)))))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (insert "\n")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (overlay-put o 'display `(space . (:wid= th (600) :height (800))))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (overlay-put o 'face (list :background = (pcase (% i 3)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(0 "red")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(1 "green")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(2 "blue"))))))
>=C2=A0 =C2=A0 (goto-char (point-min))
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 (set-window-vscroll nil 300 t))
>
> I have tested it on Emacs 29.1 and 28.3.
>
> I wonder if this is a bug, or if I am missing something.=C2=A0 Could y= ou
> please evaluate the above code starting from emacs -Q, and confirm
> this is a bug (or tell me what I am missing)?

Works for me in "emacs -Q".
--00000000000068fb0606096a577f--