public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom de Vries <tdevries@suse.de>,  Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH] [gdb/tui] Add set tui hide-last-column on/off/auto
Date: Wed, 10 May 2023 09:20:27 -0600	[thread overview]
Message-ID: <87lehw5i2s.fsf@tromey.com> (raw)
In-Reply-To: <20230509132004.22669-1-tdevries@suse.de> (Tom de Vries via Gdb-patches's message of "Tue, 9 May 2023 15:20:04 +0200")

>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:

Tom> But it's different when we define TERM=ansi, because of the implications for
Tom> the xenl flag:
Tom> ...
Tom> $ TERM=xterm tput xenl; echo $?
Tom> 0
Tom> $ TERM=ansi tput xenl; echo $?
Tom> 1
Tom> ...
Tom> which stands for "eat newline glitch".

I wonder if it's possible to also set TERMCAP to deal with this.

Tom> At this point, we could just disregard this as a user problem, but there is an
Tom> interest in having this TERM=ansi working somewhat.  This is because the
Tom> native TERM for our tuiterm terminal emulator is ansi, and it's worthwhile:
Tom> - being able to compare behaviour in the tuiterm and an actual terminal
Tom>   emulator like konsole or gnome-terminal (which typically will have the
Tom>   glitch), as well as
Tom> - playing around with the TUI and explore new scenarios with TUI running in a
Tom>   mode as close as possible to tuiterm to increase the likeliness that the
Tom>   scenario can be reproduced in the tuiterm.

Another option would be to change the test suite to also have the glitch
and to set 'TERM=xterm' or something.

Tom> So, we expose the fix at user level using a "set tui hide-last-column
Tom> on/off/auto", with auto behaving like this:
Tom> ...
Tom> $ TERM=xterm gdb -q  -ex "show tui hide-last-column"
Tom> TUI last column hiding is "auto; currently off".
Tom> $ TERM=ansi gdb -q -ex "show tui hide-last-column"
Tom> TUI last column hiding is "auto; currently on".
Tom> ...
Tom> and use "set tui hide-last-column off" in the testsuite.

So IIUC, the idea here is that sometimes you may want to try out
TERM=ansi interactively, even though your actual terminal is different.
This of course causes problems because TERM doesn't match the
capabilities of the actual terminal.  So then this setting works around
one bug that's exposed?

If that's accurate, and you still want this setting, then perhaps it
should be under "maint".  Ordinary users should not be doing this kind
of thing and, for all we know, there are other incompatibilities that we
just haven't stumbled across yet.

Tom

  parent reply	other threads:[~2023-05-10 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 13:20 Tom de Vries
2023-05-10 13:48 ` Andrew Burgess
2023-05-10 15:21   ` Tom de Vries
2023-05-10 15:20 ` Tom Tromey [this message]
2023-05-22 13:45   ` Tom de Vries

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=87lehw5i2s.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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.
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).