unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: luangruo@yahoo.com, 70038@debbugs.gnu.org
Subject: bug#70038: 29.3.50; Shift up/down in buffer with images on M-x other-window with some fonts
Date: Mon, 29 Apr 2024 15:51:46 +0300	[thread overview]
Message-ID: <8634r4s55p.fsf@gnu.org> (raw)
In-Reply-To: <26d27f66-e4df-43a2-8968-18b3cc013137@gmx.at> (message from martin rudalics on Sun, 28 Apr 2024 10:51:38 +0200)

> Date: Sun, 28 Apr 2024 10:51:38 +0200
> Cc: luangruo@yahoo.com, 70038@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 
>  > Where would you like to put the comment, and what should that comment
>  > say?
> 
> There are three issues I don't understand well in this context.  The
> first one concerns the preserve_vscroll_p flag we currently check as:
> 
>        if (!w->preserve_vscroll_p && !window_frozen_p (w))
> 	w->vscroll = 0;
> 
> Here, in all scenarios I tried, I observed that w->preserve_vscroll_p
> implies window_frozen_p (w) which IIUC means that the preserve_vscroll_p
> flag is not needed and we could simplify the above to
> 
>        if (!window_frozen_p (w))
> 	w->vscroll = 0;
> 
> What am I missing here?

I'll let Po Lu answer that, since the preserve_vscroll_p flag was
introduced to support precise pixelwise scrolling.

> The second issue is why we freeze window starts at all.  Conceptually,
> when window starts are frozen, redisplay should not change the start
> position of _any_ window whenever we enlarge the mini window.  But
> window_frozen_p returns false for the selected and minibuffer scroll
> windows.  Hence, freezing does not set force_start for these windows.
> 
> While this discrimination seems unwanted (in particular when resizing
> the echo area), it apparently doesn't matter in any of the scenarios I
> tried here - the start positions of all windows remain unchanged in
> precisely the same way regardless of whether they are selected or not.
> So IIUC we could do away with freezing as well.

Your conclusions are too drastic, IMO.  Freezing window-starts is an
advisory, not a mandatory, setting.  So the fact that it isn't always
obeyed doesn't mean it has no place: when it _is_ obeyed, it enables
some optimizations, as I described several messages up-thread.  Giving
up those optimizations when we can use them is not wise.

> I suppose that I'm missing some optimization issue here but fail to see
> what it is.

I described those optimizations in so many words in one of my previous
messages.

> The third issue is that of the optional_new_start flag: All 'recenter'
> effectively does is to calculate a new start position of a window and
> ask redisplay to apply it.  Now why does 'recenter' in particular set
> that flag and why does none of the other functions that set a window's
> start position like 'scroll-up' or 'scroll-down' set it?

Scrolling commands set force_start, which is a stronger condition than
optional_new_start.  I guess recenter doesn't have to make sure the
window starts exactly where it thinks it should, or something.

> Note that I'm not asking to revise code that works sufficiently well
> now.  But clarifying the issues I tried to sketch above in the comment
> preceding redisplay_window could be useful to better understand bugs
> like the one that triggered this thread.

I still don't know what to comment, because you seem to ask the same
questions again, although I already answered them.  So I'm probably
missing something here.  I can think about comments once you say that
you understand and agree with the explanations, but would like to see
them spelled out in comments, but not before that.





  parent reply	other threads:[~2024-04-29 12:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 20:25 bug#70038: 29.3.50; Shift up/down in buffer with images on M-x other-window with some fonts Ramon Diaz-Uriarte
2024-03-28  5:58 ` Eli Zaretskii
2024-03-28  7:52   ` Rahguzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-28  8:36     ` Eli Zaretskii
2024-03-28 16:12   ` Ramon Diaz-Uriarte
2024-03-28 16:59     ` Ramon Diaz-Uriarte
2024-03-28 17:24       ` Rahguzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-28 19:50         ` Rahguzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-31 18:43           ` Ramon Diaz-Uriarte
2024-04-06 12:33         ` Eli Zaretskii
2024-04-06 14:08           ` Eli Zaretskii
2024-04-06 14:20             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07  8:24             ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07  9:13               ` Eli Zaretskii
2024-04-07 10:12                 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 11:28                   ` Eli Zaretskii
2024-04-08  9:07                     ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-13 10:10                       ` Eli Zaretskii
2024-04-14  8:31                         ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-14  9:28                           ` Eli Zaretskii
2024-04-15  9:23                             ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-15 13:54                               ` Eli Zaretskii
2024-04-17  8:02                                 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-17 12:58                                   ` Eli Zaretskii
2024-04-28  8:51                                     ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-28  9:15                                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-29  9:47                                         ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-29 12:51                                       ` Eli Zaretskii [this message]
2024-04-11 13:56           ` Ramon Diaz-Uriarte
2024-04-11 15:36             ` Eli Zaretskii
2024-04-12 16:43               ` Ramon Diaz-Uriarte

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=8634r4s55p.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70038@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=rudalics@gmx.at \
    /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 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).