unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: dick <dick.r.chiang@gmail.com>
Cc: 52676@debbugs.gnu.org
Subject: bug#52676: 28.0.50; [PATCH] Rationalize window-text-pixel-size
Date: Mon, 20 Dec 2021 17:19:43 +0200	[thread overview]
Message-ID: <83zgov1ey8.fsf@gnu.org> (raw)
In-Reply-To: <87wnk0xaz4.fsf@dick> (message from dick on Sun, 19 Dec 2021 21:32:15 -0500)

> From: dick <dick.r.chiang@gmail.com>
> Date: Sun, 19 Dec 2021 21:32:15 -0500
> 
> Even if 43c4cc2 did anything (it doesn't), it was obviously
> the wrong way to go about it.

It's WIP.  It's too early IMNSHO to judge it, because alone it does
very little.

>    start_display (&it, w, startp);
> -  int start_y = it.current_y;
> -  /* It makes no sense to measure dimensions of region of text that
> -     crosses the point where bidi reordering changes scan direction.
> -     By using unidirectional movement here we at least support the use
> -     case of measuring regions of text that have a uniformly R2L
> -     directionality, and regions that begin and end in text of the
> -     same directionality.  */
> -  it.bidi_p = false;

Why was this removed? what's the rationale?  Did you understand the
underlying problem about which the comment hints?

> -  /* If FROM is on a newline, pretend that we start at the beginning
> -     of the next line, because the newline takes no place on display.  */
> -  if (FETCH_BYTE (start) == '\n')
> -    it.current_x = 0;

And why was this removed?

> -  if (!NILP (x_limit))
> -    {
> -      it.last_visible_x = max_x;
> -      /* Actually, we never want move_it_to stop at to_x.  But to make
> -	 sure that move_it_in_display_line_to always moves far enough,
> -	 we set to_x to INT_MAX and specify MOVE_TO_X.  */
> -      move_op |= MOVE_TO_X;
> -      to_x = INT_MAX;
> -    }

And this?

> -  /* We could have a display property at END, in which case asking
> -     move_it_to to stop at END will overshoot and stop at position
> -     after END.  So we try again, stopping before END, and account for
> -     the width of the last buffer position manually.  */
> -  if (IT_CHARPOS (it) > end)
> -    {
> -      end--;
> -      RESTORE_IT (&it, &it2, it2data);
> -      x = move_it_to (&it, end, to_x, max_y, -1, move_op);
> -      /* Add the width of the thing at TO, but only if we didn't
> -	 overshoot it; if we did, it is already accounted for.  Also,
> -	 account for the height of the thing at TO.  */

And this?

So basically, you removed code which was there to handle real
problems, with no explanations and with log messages whose content
includes no useful information.  The Git history should have pointed
you to the bug reports and discussions which caused us to add those
code fragments you removed, with recipes to create those problematic
situation; did you try those recipes? did you find them not
reproducible, or thought that the fixes are no longer needed, or have
better ideas for how to fix them?  If so, how about including all that
information in your patch submissions?

Without all this information, how can you expect us to use your
patches?  All I see is that you delete code that is there for a
reason.





      parent reply	other threads:[~2021-12-20 15:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20  2:32 bug#52676: 28.0.50; [PATCH] Rationalize window-text-pixel-size dick
2021-12-20  3:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-20  5:20   ` dick
2021-12-20 17:11     ` Eli Zaretskii
2021-12-21  1:36       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-21  3:30         ` Eli Zaretskii
2021-12-21  3:38           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-21 12:12             ` Eli Zaretskii
2021-12-21 12:19               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-21 17:56                 ` dick
2021-12-21 18:05                   ` Robert Pluim
2021-12-22  0:59                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-21 18:06                   ` Eli Zaretskii
2021-12-22  0:58                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-21  1:34     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-20 15:19 ` Eli Zaretskii [this message]

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=83zgov1ey8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=52676@debbugs.gnu.org \
    --cc=dick.r.chiang@gmail.com \
    /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).