Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Special characters in doc strings of GDB commands
@ 2007-01-19 11:37 Eli Zaretskii
  2007-02-10 20:47 ` Daniel Jacobowitz
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2007-01-19 11:37 UTC (permalink / raw)
  To: gdb

I see in cli-decode.c:print_doc_line that it displays the first line
only up to the first comma or period.  However, I don't see this
special treatment of these two characters documented anywhere, neither
in gdb.texinfo (where it matters for doc strings given to user-defined
commands), nor in gdbint.texinfo (where it is important for GDB
developers who add new commands).

Am I missing something?

Btw, should we have a mechanism to escape these special characters, at
least the comma?  Sometimes a sentence looks very awkward or even
unclear unless you use a comma.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Special characters in doc strings of GDB commands
  2007-01-19 11:37 Special characters in doc strings of GDB commands Eli Zaretskii
@ 2007-02-10 20:47 ` Daniel Jacobowitz
  2007-02-11  4:13   ` Eli Zaretskii
  2007-02-12 17:58   ` Jim Blandy
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel Jacobowitz @ 2007-02-10 20:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

On Fri, Jan 19, 2007 at 01:36:56PM +0200, Eli Zaretskii wrote:
> I see in cli-decode.c:print_doc_line that it displays the first line
> only up to the first comma or period.  However, I don't see this
> special treatment of these two characters documented anywhere, neither
> in gdb.texinfo (where it matters for doc strings given to user-defined
> commands), nor in gdbint.texinfo (where it is important for GDB
> developers who add new commands).
> 
> Am I missing something?

Not as far as I know.

> Btw, should we have a mechanism to escape these special characters, at
> least the comma?  Sometimes a sentence looks very awkward or even
> unclear unless you use a comma.

Isn't this whole mechanism horribly i18n-unfriendly already?  Perhaps
we should just change it...

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Special characters in doc strings of GDB commands
  2007-02-10 20:47 ` Daniel Jacobowitz
@ 2007-02-11  4:13   ` Eli Zaretskii
  2007-02-11 18:09     ` Daniel Jacobowitz
  2007-02-12 17:58   ` Jim Blandy
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2007-02-11  4:13 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

> Date: Sat, 10 Feb 2007 15:47:29 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb@sources.redhat.com
> 
> Isn't this whole mechanism horribly i18n-unfriendly already?  Perhaps
> we should just change it...

But how to change that?  Any ideas?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Special characters in doc strings of GDB commands
  2007-02-11  4:13   ` Eli Zaretskii
@ 2007-02-11 18:09     ` Daniel Jacobowitz
  2007-02-11 20:17       ` Daniel Jacobowitz
  2007-02-11 20:43       ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel Jacobowitz @ 2007-02-11 18:09 UTC (permalink / raw)
  To: gdb, gdb

On Sun, Feb 11, 2007 at 06:13:34AM +0200, Eli Zaretskii wrote:
> > Date: Sat, 10 Feb 2007 15:47:29 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: gdb@sources.redhat.com
> > 
> > Isn't this whole mechanism horribly i18n-unfriendly already?  Perhaps
> > we should just change it...
> 
> But how to change that?  Any ideas?

I haven't thought about it.  Probably we'd have to add an additional
argument to everywhere that registers a command, to provide the string
explicitly.  I'm not thrilled with the idea of duplicating that much
text though!

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Special characters in doc strings of GDB commands
  2007-02-11 18:09     ` Daniel Jacobowitz
@ 2007-02-11 20:17       ` Daniel Jacobowitz
  2007-02-11 20:43       ` Eli Zaretskii
  1 sibling, 0 replies; 9+ messages in thread
From: Daniel Jacobowitz @ 2007-02-11 20:17 UTC (permalink / raw)
  To: gdb, gdb

On Sun, Feb 11, 2007 at 06:13:34AM +0200, Eli Zaretskii wrote:
> > Date: Sat, 10 Feb 2007 15:47:29 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: gdb@sources.redhat.com
> > 
> > Isn't this whole mechanism horribly i18n-unfriendly already?  Perhaps
> > we should just change it...
> 
> But how to change that?  Any ideas?

I haven't thought about it.  Probably we'd have to add an additional
argument to everywhere that registers a command, to provide the string
explicitly.  I'm not thrilled with the idea of duplicating that much
text though!

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Special characters in doc strings of GDB commands
  2007-02-11 18:09     ` Daniel Jacobowitz
  2007-02-11 20:17       ` Daniel Jacobowitz
@ 2007-02-11 20:43       ` Eli Zaretskii
  2007-02-12  3:11         ` Eli Zaretskii
  2007-02-12 17:25         ` Daniel Jacobowitz
  1 sibling, 2 replies; 9+ messages in thread
From: Eli Zaretskii @ 2007-02-11 20:43 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb, gdb

> Date: Sun, 11 Feb 2007 13:08:55 -0500
> From: Daniel Jacobowitz <drow@false.org>
> 
> I haven't thought about it.  Probably we'd have to add an additional
> argument to everywhere that registers a command, to provide the string
> explicitly.  I'm not thrilled with the idea of duplicating that much
> text though!

Right.  Another possibility would be to enclose the short description
part in some control sequence, which will be stripped by the commands
that print the doc strings.  For example, like makeinfo uses ^[..^]
for similar purposes.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Special characters in doc strings of GDB commands
  2007-02-11 20:43       ` Eli Zaretskii
@ 2007-02-12  3:11         ` Eli Zaretskii
  2007-02-12 17:25         ` Daniel Jacobowitz
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2007-02-12  3:11 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb, gdb

> Date: Sun, 11 Feb 2007 13:08:55 -0500
> From: Daniel Jacobowitz <drow@false.org>
> 
> I haven't thought about it.  Probably we'd have to add an additional
> argument to everywhere that registers a command, to provide the string
> explicitly.  I'm not thrilled with the idea of duplicating that much
> text though!

Right.  Another possibility would be to enclose the short description
part in some control sequence, which will be stripped by the commands
that print the doc strings.  For example, like makeinfo uses ^[..^]
for similar purposes.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Special characters in doc strings of GDB commands
  2007-02-11 20:43       ` Eli Zaretskii
  2007-02-12  3:11         ` Eli Zaretskii
@ 2007-02-12 17:25         ` Daniel Jacobowitz
  1 sibling, 0 replies; 9+ messages in thread
From: Daniel Jacobowitz @ 2007-02-12 17:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

On Sun, Feb 11, 2007 at 10:17:25PM +0200, Eli Zaretskii wrote:
> Right.  Another possibility would be to enclose the short description
> part in some control sequence, which will be stripped by the commands
> that print the doc strings.  For example, like makeinfo uses ^[..^]
> for similar purposes.

I guess that's better for translation purposes (tell translators to
leave those untranslated)?  It still seems problematic, e.g. if the
natural phrasing of the long descripton doesn't have the short
description as a substring.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Special characters in doc strings of GDB commands
  2007-02-10 20:47 ` Daniel Jacobowitz
  2007-02-11  4:13   ` Eli Zaretskii
@ 2007-02-12 17:58   ` Jim Blandy
  1 sibling, 0 replies; 9+ messages in thread
From: Jim Blandy @ 2007-02-12 17:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb


Daniel Jacobowitz <drow@false.org> writes:
> On Fri, Jan 19, 2007 at 01:36:56PM +0200, Eli Zaretskii wrote:
>> I see in cli-decode.c:print_doc_line that it displays the first line
>> only up to the first comma or period.  However, I don't see this
>> special treatment of these two characters documented anywhere, neither
>> in gdb.texinfo (where it matters for doc strings given to user-defined
>> commands), nor in gdbint.texinfo (where it is important for GDB
>> developers who add new commands).
>> 
>> Am I missing something?
>
> Not as far as I know.
>
>> Btw, should we have a mechanism to escape these special characters, at
>> least the comma?  Sometimes a sentence looks very awkward or even
>> unclear unless you use a comma.
>
> Isn't this whole mechanism horribly i18n-unfriendly already?  Perhaps
> we should just change it...

My understanding is that the first line should be a self-contained
summary.  If there is additional text on the first line, it should be
moved onto the second line.  Then, print_doc_line could stop at the
line break.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-02-12 17:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-19 11:37 Special characters in doc strings of GDB commands Eli Zaretskii
2007-02-10 20:47 ` Daniel Jacobowitz
2007-02-11  4:13   ` Eli Zaretskii
2007-02-11 18:09     ` Daniel Jacobowitz
2007-02-11 20:17       ` Daniel Jacobowitz
2007-02-11 20:43       ` Eli Zaretskii
2007-02-12  3:11         ` Eli Zaretskii
2007-02-12 17:25         ` Daniel Jacobowitz
2007-02-12 17:58   ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox