all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: dalanicolai <dalanicolai@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Redisplay issues with 'space' display properties on overlays
Date: Sat, 16 Apr 2022 20:32:52 +0200	[thread overview]
Message-ID: <CACJP=3m=g76wM8oN_ZG-VfvAmyoc+WHRvYvR=MFf0LFsGTnk_Q@mail.gmail.com> (raw)
In-Reply-To: <CACJP=3nO7Eo0oEhrsz0i6V+rS4APRK+xRDHDeTFPBbCz=fp07g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4037 bytes --]

Or actually simpler, for the first question, with pdf-tools installed,
- first load pdf-scroll.el (after first setting the path to papyrus.el at
the beginning
of the file)
- open some pdf and scroll down/up a few pages
- now split the buffer (the page in the second window does not display)
- then do `M-: (print "test"), and 'hide' the echo area by pressing `esc`
Now the page will display.

So my question is, which 'action' is responsible for getting that page
displayed
(I guess it is just the vscroll does not get set, because when splitting
the window
immediately after opening, without scrolling, then the page in the other
window
does get displayed).

On Sat, 16 Apr 2022 at 20:17, dalanicolai <dalanicolai@gmail.com> wrote:

> 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 <eliz@gnu.org> wrote:
>
>> > From: dalanicolai <dalanicolai@gmail.com>
>> > 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.
>>
>

[-- Attachment #2: Type: text/html, Size: 5253 bytes --]

  parent reply	other threads:[~2022-04-16 18:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-16 16:37 papyrus.el, improved/simplified/"final" implementation of continuous scroll dalanicolai
2022-04-16 16:46 ` Eli Zaretskii
2022-04-16 19:00   ` dalanicolai
2022-04-16 16:49 ` Redisplay issues with 'space' display properties on overlays Eli Zaretskii
2022-04-16 18:17   ` dalanicolai
2022-04-16 18:32     ` Eli Zaretskii
2022-04-16 18:40       ` dalanicolai
2022-04-16 19:02         ` Eli Zaretskii
2022-04-16 18:47       ` dalanicolai
2022-04-16 18:57         ` dalanicolai
2022-04-16 19:06         ` Eli Zaretskii
2022-04-16 19:16           ` dalanicolai
2022-04-16 19:18             ` Eli Zaretskii
2022-04-16 19:33               ` dalanicolai
2022-04-16 19:52                 ` dalanicolai
2022-04-16 21:39                   ` dalanicolai
2022-04-16 19:36           ` dalanicolai
2022-04-16 18:32     ` dalanicolai [this message]
2022-04-16 18:36       ` Eli Zaretskii
2022-04-16 18:38         ` Eli Zaretskii
2022-04-16 18:49           ` dalanicolai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACJP=3m=g76wM8oN_ZG-VfvAmyoc+WHRvYvR=MFf0LFsGTnk_Q@mail.gmail.com' \
    --to=dalanicolai@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.