From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 1/4] Add highlight style, title style, fputs_highlighted. Improve 'show style'
Date: Sat, 01 Jun 2019 08:47:00 -0000 [thread overview]
Message-ID: <1559378849.1454.48.camel@skynet.be> (raw)
In-Reply-To: <87ef4epeqb.fsf@tromey.com>
On Fri, 2019-05-31 at 14:10 -0600, Tom Tromey wrote:
> Philippe> +{
> Philippe> + cli_style_option *cso = (cli_style_option *) get_cmd_context (cmd);
> Philippe> + fputs_filtered (_("The \""), file);
> Philippe> + fprintf_styled (file, cso->style (), "%s", cso->name ());
>
> Can't this use fputs_styled instead?
>
> It seems like the output might be a bit odd, in that the text will refer
> to one aspect of the style, but it will be styled using the entire
> style.
The idea is effectively to show the entire style in the output,
so as to see how all styles look like, close to each other.
To make it more clear, I have changed the output to be:
style address foreground:Â Â The "address" style foreground color is: blue
^^^^^^^^^^^^^^
So, I have added the word style after the style name and styled all what
is underlined.
Does that look less odd ?
>
> Philippe> +readibility."));
>
> Typo, "readability".
>
> Philippe> + /* Output the part before pmatch with current style. */
> Philippe> + while (pmatch.rm_so > 0)
> Philippe> + {
> Philippe> + fputc_filtered (*str, stream);
> Philippe> + pmatch.rm_so--;
> Philippe> + str++;
>
> Sometimes I wish the lower layers of the I/O system dealt with
> string views instead of terminated strings...
>
> I wondered if "highlight" was too generic a name, but I suppose it fits
> well enough. The only other idea I came up with was "search", which in
> the end didn't really seem better.
Yes, the name (for both title and highlight) were not straightforward
to choose. The idea is that these styles should be relatively generic,
but not too much :).
The very first trial I did used the "header" instead of "title", but header
was too specific.
Otherwise, I hesitated between "attention" and "highlight" style.
Of course, easy to change if you deem "attention" (or something else)
is better.
Philippe
next prev parent reply other threads:[~2019-06-01 8:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 13:19 [RFA 0/4] Improve "show style", use style in "help" and "apropos" Philippe Waroquiers
2019-05-31 13:19 ` [RFA 1/4] Add highlight style, title style, fputs_highlighted. Improve 'show style' Philippe Waroquiers
2019-05-31 20:10 ` Tom Tromey
2019-06-01 8:47 ` Philippe Waroquiers [this message]
2019-06-03 14:21 ` Tom Tromey
2019-05-31 13:19 ` [RFA 4/4] Document in NEWS and gdb.texinfo the "help", "apropos" and "show style" changes Philippe Waroquiers
2019-05-31 13:46 ` Eli Zaretskii
2019-05-31 13:19 ` [RFA 2/4] Improve usability and/or readibility of help and apropos output Philippe Waroquiers
2019-05-31 20:22 ` Tom Tromey
2019-05-31 13:19 ` [RFA 3/4] Update tests following changes to "help" and "apropos" Philippe Waroquiers
2019-05-31 20:34 ` Tom Tromey
2019-05-31 20:35 ` [RFA 0/4] Improve "show style", use style in " Tom Tromey
2019-06-18 13:09 ` Pedro Alves
2019-06-18 16:04 ` Tom Tromey
2019-06-18 20:11 ` Philippe Waroquiers
2019-06-18 20:46 ` Tom Tromey
2019-06-18 20:53 ` Philippe Waroquiers
2019-06-18 20:58 ` Philippe Waroquiers
2019-06-18 22:40 ` Pedro Alves
2019-06-19 0:25 ` Philippe Waroquiers
2019-06-19 19:44 ` Tom Tromey
2019-06-19 19:26 ` Tom Tromey
2019-06-19 22:56 ` Pedro Alves
2019-06-20 14:21 ` Tom Tromey
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=1559378849.1454.48.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox