FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 06-05-2008, 12:52 AM
"William L. Thomson Jr."
 
Default Default blank lines for error, elog, einfo, etc

On Wed, 2008-06-04 at 18:45 -0600, Ryan Hill wrote:
>
> I just throw a couple echos around any output.

Surely more than one way

> I think doing any kind of automatic pretty-print formatting is
> overkill, but that's just my opinion.

Yes to a point. Starting having multiple blocks like that, and your
added 2 lines per for really no reason.

I think a more ideal solution, less drastic to implement might be
allowing 2 arguments to be passed. So you could do like

elog "" "A blank line precedes this one"
elog "A blank line follow this one" ""

Then maybe if a argument = "" it can be swapped out for echo

--
William L. Thomson Jr.
amd64/Java/Trustees
Gentoo Foundation
 
Old 06-05-2008, 12:59 AM
"William L. Thomson Jr."
 
Default Default blank lines for error, elog, einfo, etc

On Wed, 2008-06-04 at 20:52 -0400, William L. Thomson Jr. wrote:
>
> I think a more ideal solution, less drastic to implement might be
> allowing 2 arguments to be passed. So you could do like
>
> elog "" "A blank line precedes this one"
> elog "A blank line follow this one" ""

Actually 3, not sure there would be any need for more. 3 for 1 liners

elog "" "USE flag milf not set" ""

--
William L. Thomson Jr.
amd64/Java/Trustees
Gentoo Foundation
 
Old 06-06-2008, 11:31 PM
"William L. Thomson Jr."
 
Default Default blank lines for error, elog, einfo, etc

On Sat, 2008-06-07 at 00:42 +0200, Vlastimil Babka wrote:
> Joe Peterson wrote:
> > The problem with a simple echo is that no "*" appears on the left to
> > maintain continuity with the rest of the output - and in a color that
> > makes sense in the context (maybe this isn't a "problem" - it depends on
> > whether that visual continuity is desired).
>
> The far biggest problem of echo is IMHO that it's not part of the elog
> framework,

Well I mostly included echo as a joke/pun per one of the other
comments

> So how bout some switch to elog
> commands that adds extra newline after the message, might look better
> than wltjr's "" proposal.

Crude I agree, but at least point for shorthand was understood

> There could be also switch to add newline
> before the message but I can't think of a use for it myself.
> The question is how to name the switch "-n" could be confusing as
> "echo -n" has the opposite effect. Maybe "-b" for "blank"?

Or -p for preceding -t for trailing. Which would make one liner

elog -pt "One line with blank ones before and after"

--
William L. Thomson Jr.
amd64/Java/Trustees
Gentoo Foundation
 
Old 06-15-2008, 10:02 AM
Peter Volkov
 
Default Default blank lines for error, elog, einfo, etc

В Срд, 11/06/2008 в 19:45 -0400, Jim Ramsay пишет:
> Vlastimil Babka <caster@gentoo.org> wrote:
>
> > I would prefer something that
> > doesn't add extra lines to ebuild.
>
> I think I would disagree with you here. I think that having a special
> 'eblank' or 'eseparator' command is much more readable in an ebuild.

Taking into account that as einfo, ewarn and eerror work without any
arguments too are there any benefits from eblank/eseparator?

Speaking about blank lines around elog functions I think they could be
useful and I like idea of adding options (switches) to said functions.
But speaking about names of options - -A and -B are easier to remember
as -A stands for above and -B for below and grep users already knew
that.

BTW, have anybody filled feature request?

--
Peter.

--
gentoo-dev@lists.gentoo.org mailing list
 
Old 06-15-2008, 01:14 PM
Peter Volkov
 
Default Default blank lines for error, elog, einfo, etc

В Вск, 15/06/2008 в 13:19 +0200, Benedikt Morbach пишет:
> > But speaking about names of options - -A and -B are easier to
> remember
> > as -A stands for above and -B for below and grep users already knew
> > that.
>
> for grep -A means after and -B before

True. And still, one day I learn this options for grep, it'll became
trivial to learn them for einfo functions.

--
Peter.

--
gentoo-dev@lists.gentoo.org mailing list
 
Old 06-16-2008, 05:05 PM
"William L. Thomson Jr."
 
Default Default blank lines for error, elog, einfo, etc

On Sun, 2008-06-15 at 14:02 +0400, Peter Volkov wrote:
> В Срд, 11/06/2008 в 19:45 -0400, Jim Ramsay пишет:
> > Vlastimil Babka <caster@gentoo.org> wrote:
> >
> > > I would prefer something that
> > > doesn't add extra lines to ebuild.
> >
> > I think I would disagree with you here. I think that having a special
> > 'eblank' or 'eseparator' command is much more readable in an ebuild.
>
> Taking into account that as einfo, ewarn and eerror work without any
> arguments too are there any benefits from eblank/eseparator?

Not really and part of my thought process was less lines, less code. Not
more or staying the same. No matter what it is, typing anything on a
single line to get a new line is more than should be required IMHO.

Want a single line of output with blanks lines before and after. One has
to code 3 lines in ebuild. That should be 1 line to get 1 comment, with
auto-blanks per flag/switch, or etc. 1 line of code 3 lines of output,
efficient. 3 lines of code, 3 lines of output. Not so much.

--
William L. Thomson Jr.
amd64/Java/Trustees
Gentoo Foundation
 
Old 06-16-2008, 05:08 PM
"William L. Thomson Jr."
 
Default Default blank lines for error, elog, einfo, etc

On Mon, 2008-06-16 at 17:01 +0000, Duncan wrote:
> Joe Peterson <lavajoe@gentoo.org> posted 485697D3.6070303@gentoo.org,
> excerpted below, on Mon, 16 Jun 2008 10:41:55 -0600:
>
> > I am leaning more and more toward the idea of a neutral color for
> > eblanks, as this would indeed be trivial to code and it would make
> > output make more sense, especially for conditionals, but for other cases
> > as well.
>
> Yes, a neutral grey, as you suggested, makes sense. That'd cure my
> problem of visual separator as well, and as you said, would be trivial to
> code compared to the complexity of trying to figure out dynamically which
> color to use. I like it! =8^)

With flags/switches coloring is moot. One can always add a different
switch/flag to get a diff color line before or after any one section.
Which is easier IMHO, less logic in detecting and setting the right
color. Which is pretty moot per my initial thoughts. Which was just to
reduce size of ebuilds (slightly), write less code.

--
William L. Thomson Jr.
amd64/Java/Trustees
Gentoo Foundation
 

Thread Tools




All times are GMT. The time now is 12:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org