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.devel Subject: Re: Redisplay issues with 'space' display properties on overlays Date: Sat, 16 Apr 2022 19:49:10 +0300 Message-ID: <83pmlhynw9.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32776"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: dalanicolai Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 16 18:51:31 2022 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 1nfldz-0008PZ-DO for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Apr 2022 18:51:31 +0200 Original-Received: from localhost ([::1]:59626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nfldy-0008SX-EC for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Apr 2022 12:51:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nflbu-0006xX-Op for emacs-devel@gnu.org; Sat, 16 Apr 2022 12:49:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nflbn-0006Q8-9T; Sat, 16 Apr 2022 12:49:22 -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=WKqDla6ZVjDoYi9qcURu6yeJ/lDgbQwytsLbrWcAlKo=; b=QU/5lD64X4fe zfBvsnhX1WP3zti2CoTBv47Muk4BR+fTLB8y0VtMga70bjWujTbrEgwjKDttafdJ/esAPWKBqdr7M x3eJY2++ghzkFyhnuCOX0q/s+2rnBDMYhHzds1aQUJ55ZsvlyCWu96v1OGSVdzTXDsfiARa1yv/+g 8eJf2ubujyb4c8du34qRlmOcVvzUQcKPFBz2RlebEBkjHzdwAY0Eqp9iZnAnCOJnX/JPRhy2lgu7+ pxkyJ7/nZ2CJYpK6Ryb2wC5B6CAiFFDcEg7rpoSgCAB5L6kEep9yIdSwP+JXXRjB7BO4Ola+/Lt0B gWdS7zNDATteZDNa3a4A/A==; Original-Received: from [87.69.77.57] (port=2795 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 1nflbm-0002sg-P0; Sat, 16 Apr 2022 12:49:15 -0400 In-Reply-To: (message from dalanicolai on Sat, 16 Apr 2022 18:37:24 +0200) 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" Xref: news.gmane.io gmane.emacs.devel:288487 Archived-At: > From: dalanicolai > Date: Sat, 16 Apr 2022 18:37:24 +0200 > > 1. papyrus.el uses the `papyrus-redisplay` function, which creates the 'scroll' > by adding 'space' display properties to the overlays, and page images to > the 'currently visible overlays'. The redisplay works fine on Spacemacs/Doom, > but for vanilla Emacs, in order to 'finalize' the process requires a hack which is > to 'print' something to the echo area, after which the 'redisplay' will finish > and show the images. > > I have tried to use `redisplay/force-window-update` for this, but those do not > seem to have the right effect. > > Obviously, my question is if you can tell me why the hack 'is required' and what > would be the better way to achieve/finalize the redisplay. > > 2. I would expect that a specified space (space display property for the 'gap' > overlays, i.e. the space between the pages) could be smaller than the default > 'line-pixel-height`. However, this does not seem possible by just setting a > smaller :height for the space display property, as the overlay will always have > a minimum height of the default 'line-pixel-height' > > To see/reproduce what I mean you can simply load `papyrus.el` and do > `M-x papyrus-demo`. You can experiment with the 'gap/space-height' by setting > the `papyrus-gap-height`. > > For 'reproducing' the 'issue' of the first question, you can simply load > pdf-scroll.el (but first set the correct path to `papyrus.el` at the beginning > of that file. Also, pdf-scroll.el requires pdf-tools to be correctly installed). > Subsequently, open some pdf file, and split the window. I hope you will find > that the continuous scroll, including the functionality of the > `pdf-tools-enabled-modes`, works perfectly fine in vanilla Emacs (scroll with arrows > and page-down/up). Now, to see what I mean with the display 'issue' comment out the > last two lines of the `papyrus-redisplay` function, and again try to split the > window from the pdf buffer, you will find that the extra step of printing is > required before the image will show correctly. Since using the actual code requires complex setups, would you please show simpler recipes for these two issues, ones that can be used easily from "emacs -Q"? Then I will try to answer your questions above. Thanks.