public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Pacho Ramos <pacho@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: readme.gentoo.eclass: use echo -e instead of plain echo (Was: Re: [gentoo-dev] readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable=
Date: Tue, 29 Jan 2013 22:47:26 +0100	[thread overview]
Message-ID: <1359496046.2927.55.camel@belkin4> (raw)
In-Reply-To: <CAB9SyzQ8KXv2+XTHfTDoks8tX-e4X++6v=CjJ2bFtkSXLpkhyA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]

El mar, 29-01-2013 a las 14:03 +0800, Ben de Groot escribió:
> On 29 January 2013 03:30, Pacho Ramos <pacho@gentoo.org> wrote:
> > El lun, 28-01-2013 a las 14:37 +0800, Ben de Groot escribió:
> >> I've started using this eclass, but with README files, not the variable,
> >> because this is currently the only way I can make sure it honours my
> >> formatting.
> >>
> >
> > Couldn't it be covered if "echo -e" was used (even with fmt) and you,
> > then, control formatting with some of the sequences it allows (they are
> > shown in its man page)?
> 
> No. The eclass should assume that DOC_CONTENTS is already correctly
> formatted. If you must, you can add a convenience function for people
> who do want reformatting, but this should NOT be the default. Please
> don't make this eclass harder to use than it needs to be.
> 

I can add a variable (and probably will), but would prefer to keep it
formatting messages by default, otherwise, how will you set DOC_CONTENTS
variable inside a pkg phase (instead of global scope) without adding
tabs to it? You can of course add it, but it will be read as something
like:
src_prepare() {
	DOC_CONTENTS="blablabla
blablabla"
	# Rest of src_prepare stuff
}

Also, autoformatting will help to prevent every package setting messages
with different lines length (in some cases really long lines that I
finally reported some bugs in the past to get them fitting in "standard"
80 characters per line). 

I would then switch to "echo -e" and also add a function (like my
original solution in this thread) to allow you to disable formatting if
you want

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-01-29 21:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-27 14:00 [gentoo-dev] readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable Pacho Ramos
2013-01-27 17:47 ` readme.gentoo.eclass: use echo -e instead of plain echo (Was: Re: [gentoo-dev] readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable= Pacho Ramos
2013-01-27 18:05   ` Mike Frysinger
2013-01-27 18:21     ` Pacho Ramos
2013-01-28  4:37       ` Mike Frysinger
2013-01-28  6:37         ` Ben de Groot
2013-01-28 19:30           ` Pacho Ramos
2013-01-29  2:28             ` Mike Frysinger
2013-01-29  6:03             ` Ben de Groot
2013-01-29 21:47               ` Pacho Ramos [this message]
2013-01-29 22:06                 ` Michał Górny
2013-01-30  8:27                 ` Ralph Sennhauser
2013-01-30 13:24                 ` Ben de Groot
2013-01-30 18:43                   ` Pacho Ramos
2013-01-31 18:59   ` Pacho Ramos
2013-02-01  9:55     ` Ben de Groot
2013-02-01 11:07       ` Michael Weber
2013-02-01 20:34       ` Pacho Ramos
2013-02-02 11:04         ` Pacho Ramos
2013-01-31 15:22 ` [gentoo-dev] readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable Dan Douglas
2013-01-31 20:43   ` [gentoo-dev] " Duncan

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=1359496046.2927.55.camel@belkin4 \
    --to=pacho@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox