All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/3] package_ipk.bbclass: make DESCRIPTION support newline
Date: Fri, 28 Jun 2013 11:21:56 +0800	[thread overview]
Message-ID: <51CD0154.9090108@windriver.com> (raw)
In-Reply-To: <lyy5a675lc.fsf@ensc-virt.intern.sigma-chemnitz.de>


Sorry, it's only replied to Enrico, now, reply to the list ...

On 06/19/2013 06:33 PM, Enrico Scholz wrote:
>
>
> Robert Yang <liezhi.yang-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
> writes:
>
>> The recipe's DESCRIPTION is wrapped automatically by textwrap, make it
>> support newline ("\n") to let the user can wrap it manually, e.g.:
>>
>> -                    ctrlfile.write('Description: %s\n' % summary)
>> -                    ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' '))
>> +                    for t in description.split('\\n'):
>> +                        ctrlfile.write('%s\n' % textwrap.fill(t, width=74, initial_indent=' ', subsequent_indent=' '))
>
> When user wrapped lines manually, why is textwrap.fill() called on the
> lines again?  E.g. when user wrapped manually at 78 columns, this will
> create long - short - long - short lines (in german, why call this
> effect "Kammquoting" (comb quoting)) .
>
> I suggest to avoid textwrap.fill() when text contains '\n'.
>

Because I think that the "\n" is mainly used for splitting paragraph,
so the auto wrap is still useful when there is a "\n", e.g.:

DESCRIPTION = "FOO \n<Too many characters>"

The ouput is:
  FOO
  <74 characters>
  <74 characters>
  [snip]

I think that this is better than:
  FOO
  <Too many characters>

// Robert

>
>
> Enrico
>
>
>


  reply	other threads:[~2013-06-28  3:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19  9:00 [PATCH 0/3] make DESCRIPTION support newline Robert Yang
2013-06-19  9:00 ` [PATCH 1/3] package_rpm.bbclass: " Robert Yang
2013-06-19  9:00 ` [PATCH 2/3] package_ipk.bbclass: " Robert Yang
2013-06-19  9:29   ` Martin Jansa
2013-06-19  9:49     ` Richard Purdie
2013-06-19 10:10     ` Phil Blundell
2013-06-19 10:33   ` Enrico Scholz
2013-06-28  3:21     ` Robert Yang [this message]
2013-06-19  9:00 ` [PATCH 3/3] package_deb.bbclass: " Robert Yang
2013-06-26  3:27 ` [PATCH 0/3] " Robert Yang
2013-06-26 16:05   ` Saul Wold
2013-06-28  2:04     ` Robert Yang
2013-06-28  6:50       ` Martin Jansa
2013-06-28  7:34         ` Robert Yang
  -- strict thread matches above, loose matches on Subject: below --
2013-07-08  3:17 [PATCH 0/3 V2] " Robert Yang
2013-07-08  3:17 ` [PATCH 2/3] package_ipk.bbclass: " Robert Yang

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=51CD0154.9090108@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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 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.