Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: dag.odenhall@gmail.com (Dag Odenhall)
Subject: [sup-talk] [PATCH] use any custom colors configured in config.yaml
Date: Tue, 29 Apr 2008 01:01:41 +0200	[thread overview]
Message-ID: <1209422677-sup-2455@psilocybic> (raw)
In-Reply-To: <1209421539-sup-5981@south>

Excerpts from William Morgan's message of Tue Apr 29 00:28:29 +0200 2008:
> Hi Dag,
> 
> Thanks for the patch! People have been clamoring for this functionality
> forever and I have been cruelly not doing it for them.

Well thanks for the thanks! :)

> 
> A few minor comments:
> 
> Reformatted excerpts from Dag Odenhall's message of 2008-04-25:
> > +    confcolor = $config[:colors][sym.to_s[0..-7].to_sym] rescue nil
> > +    fg = Curses.const_get "COLOR_#{confcolor[:fg].upcase}" rescue fg
> > +    bg = Curses.const_get "COLOR_#{confcolor[:bg].upcase}" rescue bg
> > +    attrs = confcolor[:attrs].map {|a| Curses.const_get "A_#{a.upcase}" } rescue attrs
> 
> 1. Can you wrap all this in an if statement, rather than having sequence of
>    post-fix rescue stuff? You could do something like "if(confcolor
>    = $config[...)" and set fg and bg within that.
> 
> 2. Errors in the color names will be silently ignored. The
>    NameError exception should be caught and turned into a
>    BufferManager.flash and a Redwood::log to inform the user.

I'll give it a try.

> 3. Since I feel like people will write a lot of these descriptions, I
>    would load in colors from a colors.yaml file instead of from the
>    config file. (I can do this one instead if you're unsure.)

I could give this a try too, then again you are probably better at
getting it the way you envision it... I guess we'll see. :)


      reply	other threads:[~2008-04-28 23:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-25 19:12 Dag Odenhall
2008-04-28 22:28 ` William Morgan
2008-04-28 23:01   ` Dag Odenhall [this message]

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=1209422677-sup-2455@psilocybic \
    --to=dag.odenhall@gmail.com \
    /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