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: Redisplay issues with 'space' display properties on overlays Date: Sat, 16 Apr 2022 20:17:11 +0200 Message-ID: References: <83pmlhynw9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d85cdc05dcc98923" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32210"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 16 20:18:13 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 1nfmzt-0008Bs-8g for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Apr 2022 20:18:13 +0200 Original-Received: from localhost ([::1]:60894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nfmzr-00073A-Hz for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Apr 2022 14:18:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfmz8-0006Mw-Uv for emacs-devel@gnu.org; Sat, 16 Apr 2022 14:17:27 -0400 Original-Received: from mail-yb1-xb2d.google.com ([2607:f8b0:4864:20::b2d]:39870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nfmz6-0002ds-Cj; Sat, 16 Apr 2022 14:17:26 -0400 Original-Received: by mail-yb1-xb2d.google.com with SMTP id q19so19375694ybd.6; Sat, 16 Apr 2022 11:17:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GQTdskA5xVFrnBH1Q0kBBSe4RGN8pA/Jf71GYnevBMY=; b=JyFD7OX+E1p7sCiJIdzXTT8sBFpX7vOifsv9l90QdyydKrApGiq2iAbqy8UX+slvhh OSOJ1RnTuUWM4nW571szZYpOhenHGW4v0AYLC7DB/FlNr332ElVh5ZIT6e39T+iGd++k o+TVfALP8+XKyg1jXYP8yWDQjF8zPW1GUjHwELPkEMpOrmBNAuEMrcUst8k/cpE7L9nb HRyb2J+CnvX6WlEod4PvC+3FvZLi0h8KJKnIMMXlVlVIkj9pvZFO6ZtQz8U+goJqZEgN qcpsiA9JrR8AzF+XY73IlpEJ9Vyz5X7Hz5k9kksosJjjdvsOBaud6Yr71Xk+x8xjzpDh l0kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GQTdskA5xVFrnBH1Q0kBBSe4RGN8pA/Jf71GYnevBMY=; b=xBkelmFFzknp4R+f3TOQuGpVzv+JOKOTdy0OqmE9iojF9wd4h2y0pYx64feXA0py11 7HMHFIMt1GTKHPE4EeeWeUDV1/eMLO0ah6CUlDEsue7GDwuxDVaNYnKAvGQsmfygRvB9 65aIHkh6z2NeKy8SaslDJpH2OE8nXMrGcaRzgg4ZPrwq18GX3z3EOye0D5QHDp8q/Ll/ 4/UhoFi0ZDJjm+ALpILwm3v0mkdE2tJLM92XIHxIE+YuMjvRDB8NYsYQk1fhhNQRulXr o93wFrY1KHMNuG1g1yV+VdUjof3Q9wYrh0EimEqZB9XX/0RRyIAWWk4jhRl5fbva08Pc VgUg== X-Gm-Message-State: AOAM530NyqiDuCiZwNRKvFhD5iIAYWLfvuATHBtMnJ07C2uNlxj94n5P g4ObixJUGCCdHqXRuwAclzYb+aw9OkDQUnf/w2NSS3QQ8d4= X-Google-Smtp-Source: ABdhPJxmhSllhQwDUJxiRx7gBApMTJoeT4zYdAOHneBG7/0/EFJUApaDFY6RMMn4Z33Qk2TAQWp4tivRw4G/XVlhxxI= X-Received: by 2002:a25:ed07:0:b0:63f:b34:94c5 with SMTP id k7-20020a25ed07000000b0063f0b3494c5mr3891464ybh.488.1650133042747; Sat, 16 Apr 2022 11:17:22 -0700 (PDT) In-Reply-To: <83pmlhynw9.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::b2d; envelope-from=dalanicolai@gmail.com; helo=mail-yb1-xb2d.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" Xref: news.gmane.io gmane.emacs.devel:288489 Archived-At: --000000000000d85cdc05dcc98923 Content-Type: text/plain; charset="UTF-8" Well, for the second question, just do emacs -q, then load papyrus.el and do `M-x papyrus-demo`. For the first question pdf-tools is required to be installed, I am not sure how to achieve that from emacs -q (well besides building the server manually, after installing pdf-tools using `list-packages` I guess). So maybe you could answer/comment on the second question. And maybe someone who has pdf-tools installed can answer/comment on the first question. But I have commented out the 'print hack' now, so that the instruction becomes to 'uncomment` it (and 'slurp' it as final statements inside the `papyrus-redisplay` function`), after testing the behavior with the lines commented out first. On Sat, 16 Apr 2022 at 18:49, Eli Zaretskii wrote: > > 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. > --000000000000d85cdc05dcc98923 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Well, for the second question, just do emacs -q,
=C2=A0then load papyrus.el and do `M-x papyrus-demo`.

<= /div>
For the first question pdf-tools is required to be installed,
I am not sure how to achieve that from emacs -q
(well besi= des building the server manually, after installing
pdf-tools usin= g `list-packages` I guess).

So maybe you could ans= wer/comment on the second question.

And maybe some= one who has pdf-tools installed can
answer/comment on the first q= uestion.
But I have commented out the 'print hack' now, s= o that the
instruction becomes to 'uncomment` it (and 'sl= urp' it as final
statements inside the `papyrus-redisplay` fu= nction`), after testing
the behavior with the lines commented out= first.

On Sat, 16 Apr 2022 at 18:49, Eli Zaretskii <eliz@gnu.org> wrote:
> From: dalanicolai <dalanicolai@gmail.com><= br> > 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 requ= ires a hack which is
> to 'print' something to the echo area, after which the 're= display' will finish
> and show the images.
>
> I have tried to use `redisplay/force-window-update` for this, but thos= e do not
> seem to have the right effect.
>
> Obviously, my question is if you can tell me why the hack 'is requ= ired' and what
> would be the better way to achieve/finalize the redisplay.
>
> 2. I would expect that a specified space (space display property for t= he '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 al= ways 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&= #39; by setting
> the `papyrus-gap-height`.
>
> For 'reproducing' the 'issue' of the first question, y= ou can simply load
> pdf-scroll.el (but first set the correct path to `papyrus.el` at the b= eginning
> of that file. Also, pdf-scroll.el requires pdf-tools to be correctly i= nstalled).
> Subsequently, open some pdf file, and split the window. I hope you wil= l find
> that the continuous scroll, including the functionality of the
> `pdf-tools-enabled-modes`, works perfectly fine in vanilla Emacs (scro= ll 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 s= plit the
> window from the pdf buffer, you will find that the extra step of print= ing 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"?=C2=A0 Then I will try to answer your ques= tions
above.

Thanks.
--000000000000d85cdc05dcc98923--