* Re: Scrolling over images/tall lines
[not found] <043AA439-A3AA-4736-8A76-1A8B8344819A@gmail.com>
@ 2020-11-03 15:14 ` Eli Zaretskii
2020-11-03 18:06 ` Yuan Fu
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2020-11-03 15:14 UTC (permalink / raw)
To: Yuan Fu; +Cc: emacs-devel
> From: Yuan Fu <casouri@gmail.com>
> Date: Mon, 2 Nov 2020 16:48:59 -0500
>
> P.S. The case where I have to set window-start and window-vscroll in the same time is this: consider this window:
>
> (1)--------------------+
> | |
> | image |
> | |
> | |
> | |
> +----------------------+
> +------window top--------------+
> |==========line========== |
> |==========line========== |
> |==========line========== |
>
> If I now scroll up one line, I want to see this:
>
> (1)--------------------+
> | |
> | image |
> | |
> | |
> +------window top--------------+
> || | |
> |+----------------------+ |
> |==========line========== |
> |==========line========== |
> |==========line========== |
>
> Which requires setting window-start to (1) and setting vscroll to image-height - default-line-height.
Why can't you achieve the same by leaving window-start at its original
place (2) and setting vscroll to get the display you want, like this:
+----------------------+
| |
| image |
| |
| |
+------window top--------------+--
|| | | ^
|+----------------------+ | | vscroll (negative)
|(2)=======line========== | v
|==========line========== |
|==========line========== |
Did you try this method?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Scrolling over images/tall lines
2020-11-03 15:14 ` Scrolling over images/tall lines Eli Zaretskii
@ 2020-11-03 18:06 ` Yuan Fu
2020-11-03 18:09 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Yuan Fu @ 2020-11-03 18:06 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
>
> Why can't you achieve the same by leaving window-start at its original
> place (2) and setting vscroll to get the display you want, like this:
>
> +----------------------+
> | |
> | image |
> | |
> | |
> +------window top--------------+--
> || | | ^
> |+----------------------+ | | vscroll (negative)
> |(2)=======line========== | v
> |==========line========== |
> |==========line========== |
>
> Did you try this method?
I did, but (set-window-vscroll nil -20 t) returned 0 and didn’t have any effect, so I thought that’s not a valid thing to do. And that feels worse than setting window-start and vscroll in the same time too, because with a negative vscroll you don’t even know where to start the glyph matrix.
Yuan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Scrolling over images/tall lines
2020-11-03 18:06 ` Yuan Fu
@ 2020-11-03 18:09 ` Eli Zaretskii
2020-11-03 18:46 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2020-11-03 18:09 UTC (permalink / raw)
To: Yuan Fu; +Cc: emacs-devel
> From: Yuan Fu <casouri@gmail.com>
> Date: Tue, 3 Nov 2020 13:06:49 -0500
> Cc: emacs-devel@gnu.org
>
> >
> > Why can't you achieve the same by leaving window-start at its original
> > place (2) and setting vscroll to get the display you want, like this:
> >
> > +----------------------+
> > | |
> > | image |
> > | |
> > | |
> > +------window top--------------+--
> > || | | ^
> > |+----------------------+ | | vscroll (negative)
> > |(2)=======line========== | v
> > |==========line========== |
> > |==========line========== |
> >
> > Did you try this method?
>
> I did, but (set-window-vscroll nil -20 t) returned 0 and didn’t have any effect, so I thought that’s not a valid thing to do.
Can you show a simple example of code where it doesn't work? I'll
have a look; AFAICT it should work.
> And that feels worse than setting window-start and vscroll in the same time too, because with a negative vscroll you don’t even know where to start the glyph matrix.
??? Of course we know where to start the glyph matrix. And Lisp
programs shouldn't be bothered by that anyway.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Scrolling over images/tall lines
2020-11-03 18:09 ` Eli Zaretskii
@ 2020-11-03 18:46 ` Eli Zaretskii
2021-01-05 19:54 ` Yuan Fu
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2020-11-03 18:46 UTC (permalink / raw)
To: casouri; +Cc: emacs-devel
> Date: Tue, 03 Nov 2020 20:09:35 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
>
> > > Did you try this method?
> >
> > I did, but (set-window-vscroll nil -20 t) returned 0 and didn’t have any effect, so I thought that’s not a valid thing to do.
>
> Can you show a simple example of code where it doesn't work? I'll
> have a look; AFAICT it should work.
Forget it, I see now that it indeed shouldn't work.
Hmm... let me think about this some more.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Scrolling over images/tall lines
2020-11-03 18:46 ` Eli Zaretskii
@ 2021-01-05 19:54 ` Yuan Fu
2021-01-05 20:06 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Yuan Fu @ 2021-01-05 19:54 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
> On Nov 3, 2020, at 1:46 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> Date: Tue, 03 Nov 2020 20:09:35 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: emacs-devel@gnu.org
>>
>>>> Did you try this method?
>>>
>>> I did, but (set-window-vscroll nil -20 t) returned 0 and didn’t have any effect, so I thought that’s not a valid thing to do.
>>
>> Can you show a simple example of code where it doesn't work? I'll
>> have a look; AFAICT it should work.
>
> Forget it, I see now that it indeed shouldn't work.
>
> Hmm... let me think about this some more.
Have you come up with some ideas? In my opinion, smooth scrolling images in regular buffer is an important feature and so I really hope Emacs can support it. (It does with the code I wrote but you didn’t approve the implementation, I hope to integrate it into Emacs once we agree on the code.)
Yuan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Scrolling over images/tall lines
2021-01-05 19:54 ` Yuan Fu
@ 2021-01-05 20:06 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2021-01-05 20:06 UTC (permalink / raw)
To: Yuan Fu; +Cc: emacs-devel
> From: Yuan Fu <casouri@gmail.com>
> Date: Tue, 5 Jan 2021 14:54:17 -0500
> Cc: emacs-devel@gnu.org
>
> > Hmm... let me think about this some more.
>
> Have you come up with some ideas?
Sorry, no. Too many things on my plate these days.
> In my opinion, smooth scrolling images in regular buffer is an important feature and so I really hope Emacs can support it.
I agree, but we need ideas that don't change the semantics of
set-window-start.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-01-05 20:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <043AA439-A3AA-4736-8A76-1A8B8344819A@gmail.com>
2020-11-03 15:14 ` Scrolling over images/tall lines Eli Zaretskii
2020-11-03 18:06 ` Yuan Fu
2020-11-03 18:09 ` Eli Zaretskii
2020-11-03 18:46 ` Eli Zaretskii
2021-01-05 19:54 ` Yuan Fu
2021-01-05 20:06 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).