[bug #27650] Line wrap in ICS mode

View: New views
17 Messages — Rating Filter:   Alert me  

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


URL:
  <http://savannah.gnu.org/bugs/?27650>

                 Summary: Line wrap in ICS mode
                 Project: XBoard
            Submitted by: None
            Submitted on: Sat 10 Oct 2009 09:52:30 AM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

In xboard 4.2.7 : If e.g. a tell is longer than the xterm width
the word that doesn't fit gets wrapped to the next line starting with "\  ".

In xboard 4.4.1.pre this is not done anymore.
(FICS variable width is set correctly)




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #1, bug #27650 (project xboard):

Indeed, XBoard 4.4 does not join the lines that were broken off by the ICS.
This is intended behavior. The ICS console itself should be responsible for
the wrapping, which might be different for each user: not everyone might use a
window of the same width, and the ICS is not aware how wide the console window
is. So it makes more sense to do this at the client side.

More importantly, the board12 style can be so wide that the ICS puts a line
break in it, and the XBoard board parser chokes on this. Joining continuation
lines guarantees that XBoard will understand all boards the ICS sends it, no
matter how wide.

Is there any reason not to join the lines?

H.G.Muller

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #2, bug #27650 (project xboard):

Sorry, I meant to write: "XBoard 4.4 does re-join the lines ..."

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #3, bug #27650 (project xboard):

The reason is, that it is completely annoying, if a line en
ds in the middle of a w
ord. :-)

And I don't see a way how to make xterm do that kind of wrap.

Also, to make the ICS aware of my console width I just need to set the width
variable (FICS).

Just rejoining board12 strings isn't an option?

Ok, I try to fix that myself.
Probably even better to forget the whole upgrade plan.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #4, bug #27650 (project xboard):

I checked at FICS: style12 board strings don't get split, even
with width set to 32 (=minimum).
So I removed the rejoining code and found no problems so far.
Output is "nicely wrapped" again. I consider this solved for me. No action
from your side required :-)

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #5, bug #27650 (project xboard):

Unfortunately this is not true for every ICS (in particular not for the
open-source Lasker 2.2.3 code). Also, board that are part of a move list (with
non-standard opening position) seem to be more critical. I just had to patch
the code this mornning, because although I could play  game of Capablanca
Chess on ICS using WinBoard, I could not summon up the game afterwards with
the smoves command, because the board line was broken, and joined in a wrong
way, with a space too many. Some ICS remove the space at which they break the
line, but apparently others do leave it dangling at the end of the upper
line.

Solving it in the board parser is a bit difficult.

The true problem is that an xterm is really too primitive a device to make an
acceptable console. It does not even seem possible to edit the line you are
typing using arrow keys. I am not really an XBoard user, I am used to
WinBoard, and compared to that XBoard in ICS mode is truly appalling. The
long-term solution to this problem is therefore to crank up the quaity of the
ICS console to WinBoard level.

WinBoard 4.4.1 will have separate chat windows anyway. (Not available in
XBoard, though).

H.G. Muller


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #6, bug #27650 (project xboard):

There is a bug in the splicing code... somewhere.  I tried to track it down
once and made little progress.  It's noticeable if you finger some people with
long finger notes.  eg.  EJD, Opinel, etc.  (at FICS)

The ICS servers have a width variable that some commands obey with internal
formatting, and some obey by splitting lines and providing the "   "
continuation sequence.

I may have a chance to do this today: add code so that when the font changes
or when the window width changes, a command is sent to the ICS giving the
correct width.  That way the server and client are dealing with text
optimally.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

Re: [bug #27650] Line wrap in ICS mode

by h.g. muller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, it would be great if you could fix this.

But be sure it works on the ICS at 80.100.28.169 in Courier Chess, as
this seems to be the most critical case (widest board).


_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #7, bug #27650 (project xboard):

I think catoring to an ICS server that actually splits up style12 lines (or
anything not really intended to be seen by users) is just encouraging more of
that.

If a server is really splitting style12, then it deserves to have the weak
client support it will get.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #8, bug #27650 (project xboard):

The problem seems to be not the board that is sent during the game, but the
initial board of a move list. This is split up according to the ICS "width"
variable. And the default setting of the width variable is such that it
already causes problems.

There is not a whole lot of choice between open-source ICS codes...

H.G. Muller

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #9, bug #27650 (project xboard):

If the ICS splits the line in the middle of a style12 board, that would screw
things up for other interfaces besides xboard, wouldn't it?  So I'd think we
could get the ICS folks to fix that, though it's nice to tolerate it if we
can.

Can we arrange to join lines only if they are part of a style12 board? I.e.,
we've seen the <12> (or whatever the marker is, I'm not sure I remembered
right).

A small bit of irony: the reason WinBoard has a nice custom widget for the
board console is that the native Windows console windows are truly horrible,
much worse than an xterm.  The first version of WinBoard used the native
console windows, just like xboard uses the xterm you started it from, and it
was unusable.  So I unhappily put in a lot of work writing a replacement, but
I never got around to doing it for xboard because the xterm wasn't as nice,
but was tolerable to me.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

Re: [bug #27650] Line wrap in ICS mode

by Eric Mullins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

anonymous wrote:
> Follow-up Comment #4, bug #27650 (project xboard):
>
> I checked at FICS: style12 board strings don't get split, even
> with width set to 32 (=minimum).
> So I removed the rejoining code and found no problems so far.
> Output is "nicely wrapped" again. I consider this solved for me. No action
> from your side required :-)
>  

I can't believe that various xterms don't have a way to control how text
is wrapped.  But I've been looking and found nothing relevant.  How
irritating.

What about having an argument that controls if xboard/winboard does any
rejoining?

Can you think of any way that xboard might be notified when the xterm
window changes size?  It would be nice to have the width variable
altered accordingly whenever the user changes the xterm size.  I just
made that modification for winboard, and it's very nice, particularly
when joining is disabled.  I'd be happy to implement both of these, but
I'm not sure how I can get notified when the xterm changes size.



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

Re: [bug #27650] Line wrap in ICS mode

by Arun Persaud :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

> I can't believe that various xterms don't have a way to control how text
> is wrapped.  But I've been looking and found nothing relevant.  How
> irritating.

mine has a "set-autowrap(on/off/toggle)" function according to the man
page at least. Never used it though, so I can't say what it does :)

> What about having an argument that controls if xboard/winboard does any
> rejoining?

I think that would be nice.

> Can you think of any way that xboard might be notified when the xterm
> window changes size?

My xterm has a $COLUMNS and $LINES variable and after a "eval $(resize)"
they have the correct value... so I guess xboard could monitor these.

Another option that might be better is to use "stty size" which prints
columns and lines.

On

http://www.ohse.de/uwe/software/resize.c.html

they use ioctl to get the information. See get_term_size on that page.

>  It would be nice to have the width variable
> altered accordingly whenever the user changes the xterm size.  I just
> made that modification for winboard, and it's very nice, particularly
> when joining is disabled.  I'd be happy to implement both of these, but
> I'm not sure how I can get notified when the xterm changes size.

yep that would be cool... Another thing that would make xterm a lot
better is if xboard would use gnu-readline. I tried it out once

(http://nubati.net/cgi-bin/gitweb.cgi?p=xboard-old.git;a=shortlog;h=refs/heads/gnu-readline-support)

seemed to work ok, but the login prompt for FICS, etc wasn't correctly
handled.

ARUN


_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

Re: [bug #27650] Line wrap in ICS mode

by Eric Mullins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Arun Persaud wrote:

>>  It would be nice to have the width variable
>> altered accordingly whenever the user changes the xterm size.  I just
>> made that modification for winboard, and it's very nice, particularly
>> when joining is disabled.  I'd be happy to implement both of these, but
>> I'm not sure how I can get notified when the xterm changes size.
>>    
>
> yep that would be cool... Another thing that would make xterm a lot
> better is if xboard would use gnu-readline. I tried it out once
>
>  

This is a much needed feature for xboard.  I highly recommend getting
this into the next release if possible.  Xboard needs love too!



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27650 (project xboard):

                  Status:                    None => Ready For Test        
             Assigned to:                    None => nematocyst            

    _______________________________________________________

Follow-up Comment #10:

I added various things to support internal line wrapping.  This works both in
XBoard and Winboard, but it's off by default in Winboard.

To use:
 1) add -useInternalWrap to command line
 2) make sure -keepLineBreaksICS is false (it is by default)
 3) you can -wrapContinuationSequence "foo" to customize wrapped lines
(default is "\   " just like most ICS)

In XBoard, the defaults for 1) and 2) are such that internal wrapping will
occur.

Additionally, both Winboard and XBoard now auto-update the server's width
setting based on the actual client width.  For XBoard, this may not work if
the ioctl() and signal() functions don't support the types used.  This should
optimize the screen use as much as possible, both for ICS commands that obey
the width, and for commands that wrap instead.

The patches are in git now.  Please try them and report back.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #11, bug #27650 (project xboard):

I only tested XBoard.
All options work like expected. Also resizing xterm did update "width".

The minor differences between internal and ICS wrapping can be ignored.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27650] Line wrap in ICS mode

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27650 (project xboard):

             Open/Closed:                    Open => Closed                


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard