lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV -color/-nocolor development confusion (was: fotemods.zip update


From: Klaus Weide
Subject: LYNX-DEV -color/-nocolor development confusion (was: fotemods.zip update)
Date: Tue, 22 Jul 1997 12:56:22 -0500 (CDT)

On Mon, 21 Jul 1997, Foteos Macrides wrote:
>       An update of fotemods.zip is available in:
> 
>       http://www.slcc.edu/lynx/fote/patches/
> 
> 1997-07-21
> * Added the "show color (&)" binary (ON/OFF) choice in the 'o'ption menu.
>   It will be present if color is supported, and the setting can be saved
                                                              ^^^^^^^^^^^^
>   to the .lynxrc file.  Once saved, it will be used as the startup default,
    ^^^^^^^^^^^^^^                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   but if OFF it can be overridden via the -color command line switch or
>   the COLORTERM environment variable.  Also, updated the online 'h'elp
>   accordingly. - FM

Very bad idea.

The setting "can be saved" == "it *will* be saved" when a user with this code
presses '>' on the Options Screen - whether the user has changed it or not,
whether the user is aware of it or not, whether it is appropriate or not.

This may help some who otherwise have no way of setting a terminal
type or command line flag to control use of color, *and* who always
uses the same kind of terminal.  It messes things up for all those who
are using terminal types as they should be used, and have the curses
(or slang) system automatically decide on startup whether to use
color.

Apparently you have taken part of Tom's code and/or user interface
(which he wrote mostly for color-curses in mind) and "adapted" it to
work "better" with slang in the fotemods code.  Well in some respects
it works better, in others it is worse.

Neither your code nor devel ac-0.38 always show the current status
(whether color or not) correctly on the Options Screen.

There is some flaw in the logic of the FM code when determining the
current state of the variable for the Options Screen, and/or in the
code which determines whether the screen needs to be refreshed
after a (presumed) change:
   #                    No saved color setting in .lynxrc
   unset COLORTERM
   TERM=linux lynx .  # a TERM which supports color
   'O'ptions          # show color falsely shown as OFF (!)
   '&'
   RETURN             # immediately, without change
                      # show color still falsely shown as OFF
   '&'                # again
   RETURN             # again immediately, without change
After this, color use is turned off but without a screen refresh.
It makes a mess of the screen if colors with non-default bachgrounds
(the default colors) are used.

You have changed the function of that new Options Screen setting
(and of the LYShowColor variable) significantly: in Tom's code it only
applies for his color-curses, not for slang color.  In Tom's code it
can only be used to force color OFF (against what terminfo says).  In
your implementation it can force color ON or OFF, against what
terminfo says.  I think that is a resonable extension, given that
slang-color can do that while the curses-color implementation cannot.
But Tom and you should be aware of the different semantics when
comparing the code.

What I would like to see for the devel code:

- NO saving of LYShowColor in .lynxrc.
  [currently: FM-no, TD-ok]

- A -nocolor flag that works for both slang and curses.
  [currently: FM-no, TD-for curses only]

- Continued support for -color and COLORTERM for slang (as it is now).
  It doesn't make sense for curses color since there are no default
  ANSI-ish color escapes built in, so one cannot force color on if the
  terminal type says "no way".
  [currently: FM-ok, TD-ok]

- Possibility to toggle color on and off on the Options Screen, for
  the current session only (like the User-Agent string), if color
  is compiled in.  
  [currently: FM-slang only and will be saved, TD-for curses only]

- The setting shown on Options Screen should always show the state
  currently in effect (except while it's being changed, of course).
  I.e. it is not just an additional requirement for <Is-color-being-used>
  (as in Tom's code), it is <Is-color-being-used> itself (as apparently 
  intended by fotemods).
  [currently: FM-no, TD-no]

- Options screen toggle should work the same for slang and curses color
  support, as far as possible.  The reservation means that for curses
  color, one cannot turn color on if the terminal description says that
  the terminal doesn't support color.
  [currently: FM-no, TD-no]

- Trying to change the color setting on the Options Screen when it is
  not possible (will have no effect) should result in an appropriate
  statusline message.
  [currently: FM-no, TD-no]

"Currently" refers to fotemods of 1997-07-21 for FM, to code 2.7.1ac-0.38
for TD.

Tom, please don't just copy Fote's for-slang code without checking.
We can create our own bugs just fine :) :).

   Klaus
  


;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]