Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7661)

Issue 104720047: Issue 3925: lilypond -d leads to weird output (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 10 months ago by dak
Modified:
8 years, 10 months ago
Reviewers:
lemzwerg
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Issue 3925: lilypond -d leads to weird output C++ string manipulation is a fragile bolt-on onto the type system. "-" + 'd' evaluates to a pointer 100 bytes after a constant string "-" in the data section. This fixes this bug, and also changes the fixed message from lilypond: option `-d, `--define-default'' requires an argument to lilypond: option `-d, --define-default' requires an argument In general, it does not appear to make sense quoting the long options while not quoting the short options.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M flower/getopt-long.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4
lemzwerg
Mhmm, having quotes like `-foo', `--bar' , or maybe '-foo', '--bar' , to follow the ...
9 years, 10 months ago (2014-06-01 16:00:24 UTC) #1
dak
On 2014/06/01 16:00:24, lemzwerg wrote: > Mhmm, having quotes like > > `-foo', `--bar' , ...
9 years, 10 months ago (2014-06-01 16:23:30 UTC) #2
lemzwerg
OK, I have admittedly not looked at lilypond's help message. I agree that it is ...
9 years, 10 months ago (2014-06-01 22:00:17 UTC) #3
dak
9 years, 10 months ago (2014-06-02 07:42:02 UTC) #4
On 2014/06/01 22:00:17, lemzwerg wrote:
> OK, I have admittedly not looked at lilypond's help message.

The help message does not use quoting.  It uses block formatting, and "-d,
--define-var" is formatted as one block.

> I agree that it is
> useful to harmonize quoting – given that
> 
>   '-f, --foo'
> 
> is not correct, I vote for *not* using any quotes, as is done e.g. with the
> output of `grep --help'.  In lilypond's info manual, it should also be done as
> in grep's info manual.

This issue is not a documentation reformatting issue.  It fixes the command line
error message bug.  If you want to file a documentation enhancement request
(which would touch quite a bit more code and ultimately all translations), feel
free to do so.

However, the current option formatting in the manual has been the result of
various issues and discussions already.  The quotes are not actually generated
explicitly, but are in the info manual incidentally because of the formatting

    @table @code

    @item -d, --define-default=@var{var}=@var{val}
[...]

In the web version, we have
<URL:http://lilypond.org/doc/v2.18/Documentation/usage/command_002dline-usage#basic-command-line-options-for-lilypond>
namely no quote characters but a font change.

We are talking here, in this issue, about an error message putting quote marks
around the option and its variant in question.

I am not going to engage in bike shedding in this issue.  Either it goes in as
`-d, --define-default' as the minimal sanity change I added on top of the bug
fix, or it goes in without the sanity fix as `-d, `--define-default'' as the
original code would do.  I'd also be willing to entertain `-d',
`--define-default' as a best guess that it was rather this which was intended by
the original code, but since this is the target of a to_string call, it would
mean that this call can output one _or_ two comma-separated quoted items, making
it harder to pick the right grammar for embedding the output.

In the light of that, I prefer erring on the safe side and returning, as
previously, a single quoted item, just removing the insane inner quote.

I repeat: this is a bug fix issue, not a reformatting issue.  Before engaging in
any endless discussion, I will rather keep this at `-d, `--define-default'' and
let someone who cares to do the work and discussion do the respective issue.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b