all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: kuragin@google.com, 57434@debbugs.gnu.org
Subject: bug#57434: 28.1.91; Terminal Emacs Mac OS flickering.
Date: Tue, 30 Aug 2022 14:10:10 +0300	[thread overview]
Message-ID: <83wnaqugvh.fsf@gnu.org> (raw)
In-Reply-To: <m2ler6fejm.fsf@Mini.fritz.box> (message from Gerd Möllmann on Tue, 30 Aug 2022 08:09:33 +0200)

> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  57434@debbugs.gnu.org
> Date: Tue, 30 Aug 2022 08:09:33 +0200
> 
> Dmitrii Kuragin <kuragin@google.com> writes:
> 
> > So far:
> > ```
> > :~/Desktop% tput al; echo $?
> > 0
> > :~/Desktop% tput AL; echo $?
> > 1%dL0
> > :~/Desktop% tput dl; echo $?
> > 0
> > :~/Desktop% tput DL; echo $?
> > 1%dM0
> > :~/Desktop% tput sf; echo $?
> >
> > 0
> > 0~/Desktop% tput sr; echo $?
> > :~/Desktop% tput wi; echo $?
> > tput: unknown terminfo capability 'wi'
> > 4
> > :~/Desktop% tput cs; echo $?
> > %p1%d;%p2%dr0
> > :~/Desktop% tput cS; echo $?
> > tput: unknown terminfo capability 'cS'
> > 4
> > ```
> 
> Same here.

Thanks.

But I'm quite confused by all of this, because you don't show all the
relevant capabilities, AFAICT.

We have in term.c:

  tty->scroll_region_ok
    = (tty->Wcm->cm_abs
       && (tty->TS_set_window || tty->TS_set_scroll_region || tty->TS_set_scroll_region_1));

  tty->line_ins_del_ok
    = (((tty->TS_ins_line || tty->TS_ins_multi_lines)
        && (tty->TS_del_line || tty->TS_del_multi_lines))
       || (tty->scroll_region_ok
           && tty->TS_fwd_scroll && tty->TS_rev_scroll));

Please try all of the relevant capabilities and tell me which ones are
supported and which aren't.  (Please also mention both the capability
string and its term.c flag name, so that I shouldn't need to jump
back-and-forth in the source looking up each one to understand what it
means.)

Then we have in dispnew.c:

  /* If we cannot insert/delete lines, it's no use trying it.  */
  if (!FRAME_LINE_INS_DEL_OK (f))
    inhibit_id_p = 1;
  [...]
  /* Try doing i/d line, if not yet inhibited.  */
  if (!inhibit_id_p && i < desired_matrix->nrows)
    force_p |= scrolling (f);

Which means that 'scrolling', and thus 'scrolling_1' (where the
problem happens) will not be called if the line_ins_del_ok flag is not
set.

Furthermore, we have in scrolling_1:

  if (FRAME_SCROLL_REGION_OK (frame))
    {
      calculate_direct_scrolling (frame, matrix, window_size,
				  unchanged_at_bottom,
				  draw_cost, old_draw_cost,
				  old_hash, new_hash, free_at_end);
      do_direct_scrolling (frame, frame->current_matrix,
			   matrix, window_size, unchanged_at_top);
    }
  else
    {
      calculate_scrolling (frame, matrix, window_size, unchanged_at_bottom,
			   draw_cost, old_hash, new_hash,
			   free_at_end);
      do_scrolling (frame,
                    frame->current_matrix, matrix, window_size,
		    unchanged_at_top);
    }

which means do_direct_scrolling (which causes the problem) will not be
called if the terminal's scroll_region_ok flag is not set.

So given all of this, can you tell whether Emacs does TRT here?  That
is:

  . are all the capabilities that are supposed to be available for
    these two flags are indeed available?
  . do we need to check any additional capabilities, which are in fact
    used in the problematic scenario, but not tested as part of
    setting these two flags?

Assuming that Emacs does TRT, i.e. sets the flags correctly and uses
only the capabilities that are conditions for the flags set, then the
next important question is: why doesn't Gerd see the flickering on a
very similar system and the same terminal emulator?  Is it possible
that some other local software configuration on Dmitrii's machine
causes this, directly or indirectly?  E.g., Dmitrii, do you have some
display-related software/driver that has some "optimization" features
turned on?  If so, can you turn them off and try again?

Thanks.





  reply	other threads:[~2022-08-30 11:10 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26 16:54 bug#57434: 28.1.91; Terminal Emacs Mac OS flickering Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-27  5:34 ` Gerd Möllmann
2022-08-27  5:41   ` Gerd Möllmann
2022-08-27 15:03     ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-27 15:46       ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-27 15:58         ` Eli Zaretskii
2022-08-27 16:01           ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-27 16:14             ` Eli Zaretskii
2022-08-29 14:18               ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29 14:38                 ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29 16:04                   ` Eli Zaretskii
2022-08-29 16:05                     ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29 16:07                       ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29 16:27                         ` Eli Zaretskii
2022-08-29 15:15                 ` Gerd Möllmann
2022-08-29 16:22                   ` Eli Zaretskii
2022-08-29 17:14                     ` Gerd Möllmann
2022-08-29 18:24                       ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29 18:57                         ` Eli Zaretskii
2022-08-29 19:04                           ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29 19:17                             ` Eli Zaretskii
2022-08-29 19:26                               ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29 19:37                                 ` Eli Zaretskii
2022-08-29 20:25                                   ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29 20:44                                     ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29 21:08                                       ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-30 11:28                                         ` Eli Zaretskii
2022-08-30  6:09                                     ` Gerd Möllmann
2022-08-30 11:10                                       ` Eli Zaretskii [this message]
2022-08-30 11:23                                         ` Gerd Möllmann
2022-08-30 13:48                                           ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-30 16:19                                         ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-30 16:34                                           ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-30 17:00                                             ` Eli Zaretskii
2022-08-30 17:22                                               ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-30 11:11                                     ` Eli Zaretskii
2022-08-30  6:04                                   ` Gerd Möllmann
2022-08-30 11:46                                     ` Eli Zaretskii
2022-08-30 11:53                                       ` Gerd Möllmann
2022-08-30 12:07                                         ` Eli Zaretskii
2022-08-30 12:15                                           ` Gerd Möllmann
2022-08-30 12:48                                             ` Eli Zaretskii
2022-08-30 13:25                                     ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-30 13:48                                     ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-31  6:14                                       ` Gerd Möllmann
2022-08-31  6:14                                       ` Gerd Möllmann
2022-08-31  7:02                                         ` Gerd Möllmann
2022-08-31 11:09                                           ` Eli Zaretskii
2022-08-31 11:54                                             ` Gerd Möllmann
2022-08-31 14:12                                               ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-31 14:38                                                 ` Gerd Möllmann
2022-08-31 16:00                                                   ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-31 16:21                                                     ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-31 16:34                                                       ` Eli Zaretskii
2022-08-31 17:11                                                         ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-31 16:25                                                     ` Eli Zaretskii
2022-09-01  5:44                                                       ` Gerd Möllmann
2022-09-01  6:11                                                         ` Eli Zaretskii
2022-09-01  6:45                                                           ` Gerd Möllmann
2022-09-01  8:18                                                             ` Gerd Möllmann
2022-09-01  8:25                                                               ` Eli Zaretskii
2022-09-01  8:56                                                                 ` Gerd Möllmann
2022-09-01 11:30                                                                   ` Eli Zaretskii
2022-09-01 12:27                                                                     ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-01 12:32                                                                       ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-01 12:36                                                                         ` Gerd Möllmann
2022-09-02  7:16                                                         ` Eli Zaretskii
2022-09-02  7:26                                                           ` Eli Zaretskii
2022-09-02  9:21                                                             ` Gerd Möllmann
2022-09-03  8:04                                                               ` Gerd Möllmann
2022-09-03  9:06                                                                 ` Eli Zaretskii
2022-09-03 16:35                                                                   ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-03 16:51                                                                     ` Eli Zaretskii
2022-09-03 17:14                                                                       ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-03 17:21                                                                         ` Eli Zaretskii
2022-09-04  4:55                                                                         ` Gerd Möllmann
2022-09-07  4:59                                                                           ` Gerd Möllmann
2022-09-07 16:11                                                                             ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-07 18:17                                                                               ` Eli Zaretskii
2022-09-08  5:31                                                                                 ` Gerd Möllmann
2022-09-08  6:25                                                                                   ` Eli Zaretskii
2022-09-08  6:43                                                                                     ` Gerd Möllmann
2022-09-08  8:20                                                                                       ` Eli Zaretskii
2022-09-08  8:43                                                                                         ` Gerd Möllmann
2022-09-08  9:16                                                                                           ` Eli Zaretskii
2022-09-08  9:35                                                                                             ` Gerd Möllmann
2022-09-08 15:59                                                                                               ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-09 15:48                                                                                                 ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-09 16:00                                                                                                   ` Eli Zaretskii
2022-09-20 16:35                                                                                                     ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-20 16:45                                                                                                       ` Eli Zaretskii
2022-09-21  6:10                                                                                                         ` Gerd Möllmann
2022-09-21 11:17                                                                                                           ` Eli Zaretskii
2022-09-02  9:20                                                           ` Gerd Möllmann
2022-08-29 16:01                 ` Eli Zaretskii
2022-08-29 16:03                   ` Dmitrii Kuragin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29 16:27                     ` Eli Zaretskii

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=83wnaqugvh.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=57434@debbugs.gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=kuragin@google.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 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.