Re: How to solve: E254: Cannot allocate color darkyellow

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: How to solve: E254: Cannot allocate color darkyellow

Alan Schmitt
Le 7 juin 05, à 09:31, A. J. Mechelynck a écrit :

> Alan Schmitt wrote:
>> Le 7 juin 05, à 07:16, A. J. Mechelynck a écrit :
>>
>>> IIUC, "darkyellow" is not a standard symbolic colour name. For
>>> portability, I would suggest to replace it (after guifg= or guibg=)
>>> either by a numeric value such as #BBBB00, or by a "standard"
>>> symbolic
>>> name; here are a few examples:
>>>
>>> #A52A2A Brown
>>> #808000 Olive (not in my rgb.txt)
>>> #FFFF00 Yellow
>>
>>
>> The problem is that I do not know where this "darkyellow" comes from.
>> I
>> have the error when I edit otl files (vimoutliner files) and ml files
>> using the omlet filetype. I guess these syntax hilighters are using
>> this
>> colour.
>>
>> Alan
>
> Well, it must come from some script that you sourced. All those
> scripts'
> names are listed by the ":scriptnames" command. You may want to search
> scripts in that list for /darkyellow/
Thanks for the suggestion. The culprit was syntax/vo_base.vim. I'm
putting the vimoutliner mailing list in copy, as this script comes from
there.

Executive summary: darkyellow does not exist and is not defined on some
systems, so it should not be used as a color.

Thanks again,

Alan

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner

PGP.sig (193 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to solve: E254: Cannot allocate color darkyellow

Eric Arnold

> Alan Schmitt wrote:
[...]
> > The problem is that I do not know where this "darkyellow" comes from. I
> > have the error when I edit otl files (vimoutliner files) and ml files
> > using the omlet filetype. I guess these syntax hilighters are using this
> > colour.

Well, there's two questions about "where" it(the Problem Color) comes from,
i.e. two conceptual directions, from inside or outside of the Vim core:

  1) The "darkyellow" that is supposed to be defined by Vim.

     "darkyellow" seems to be defined with a default set of other colors
     for varying GUI types.  There doesn't seem to be any runtime files
     where it is defined.

  2) The "darkyellow" that is used in your scripts that are causing your
     errors:  "otl" and "omlet" filetypes( ftplugin/ ), syntax/ ,
     and/or other supporting files.  [(newsflash:) syntax/vo_base.vim ]

--- "A. J. Mechelynck" <[hidden email]> wrote:
> Well, it must come from some script that you sourced. All those scripts'
> names are listed by the ":scriptnames" command. You may want to search
> scripts in that list for /darkyellow/

> Alan Schmitt wrote:
>
> Thanks for the suggestion. The culprit was syntax/vo_base.vim. I'm
> putting the vimoutliner mailing list in copy, as this script comes from
> there.
>
> Executive summary: darkyellow does not exist and is not defined on some
> systems, so it should not be used as a color.


If it is a single file, this is a good solution.  It does make one
wonder if this is a problem that might crop up again.  It comes down to
a question of what is more maintainable.  Changing the "rgb.txt", which
is part of the Vim distribution, or changing one or more scripts in
various places.  (Changing them to use #BBBB00, or another color,
instead of "darkyellow".) If the number of files you have to change
isn't too large, and they won't be a problem with further releases, then
that might be better, else I'd say it would be better to make a single
annoying change("rgb.txt") that fixes all the other current
and future problems.  Of course, you could do some of both, as it
seems you have done already.

It is odd that "darkyellow" managed to get into the Vim color set
without being in any standard.  It begs the question of what other colors
are in this catagory, and whether it's a problem worth fixing at the
source:
 
  1) by clearly defining what colors Vim will be supporting as a
     basic set across all platforms ( I couldn't find a definitive
     list in the doc.s, though several misc sets were discussed ).

and/or

  2) by adhering to whatever the standard might be (and make that list
     clear in the doc.s also).


P.S.  It wasn't clear to me whether   rgb_file   was supposed to be
useful for Vim use, or for fvwm specific use.  In any case, I can't get
it to work for this problem on WinXP.

    let rgb_file = "/usr/X11/lib/X11/rgb.txt"


_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Re: How to solve: E254: Cannot allocate color darkyellow

Noel Henson
In reply to this post by Alan Schmitt
On Tuesday 07 June 2005 07:08 am, Alan Schmitt wrote:
>
> Executive summary: darkyellow does not exist and is not defined on some
> systems, so it should not be used as a color.
>

I'll make the fix today. VO 0.3.4 should be out in a day or two. It will
support user-defined color schems.

Noel

--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: How to solve: E254: Cannot allocate color darkyellow

A.J.Mechelynck
In reply to this post by Eric Arnold
Eric Arnold wrote:
[...]
> P.S.  It wasn't clear to me whether   rgb_file   was supposed to be
> useful for Vim use, or for fvwm specific use.  In any case, I can't get
> it to work for this problem on WinXP.
>
>     let rgb_file = "/usr/X11/lib/X11/rgb.txt"

"/usr/X11/lib/X11/rgb.txt" is a typical Unix path. On Windows, paths are
different. If you have a "home-brewed" rgb.txt in your home directory,
you might want to try something like (untested)

        :let rgb_file = "~/rgb.txt"

or

        :let rgb_file = "C:\DOCUME~1\arnold\rgb.txt"

IOW, wherever the rgb.txt that you want to use, you have to tell Vim
exactly where it is to be found (if you don't, $VIMRUNTIME/rgb.txt will
be used by default). A nonexistent path is of course of no help. And
it's still not clear to me whether rgb_file is usable on all Vim
versions, or just on Unix versions (which can interface with the fvwm
window manager). I suspect the former, but only experiment will prove me
right or wrong.


Best regards,
Tony.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner