[bug #27810] Copy Game / Position do not work in XBoard?

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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

                 Summary: Copy Game / Position do not work in XBoard?
                 Project: XBoard
            Submitted by: None
            Submitted on: Mon 26 Oct 2009 10:28:29 AM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

When I use the XBoard menu items File -> Copy Game or File -> Copy Position,
the clipboard seems to stay empty: I cannot paste anything with Ctrl+V in
gedit. When I save the game on a file, load that file in gedit, copy it from
gedit with Ctrl+C, I can use the File -> Paste Game menu to load the game in
XBoard. When I then try to use File -> Copy Position, the game stays in the
clipboard.

It seems like the Copy Game / Position menu items are ompletely ignored. The
temporary file .xboard?????p.pgn seems to be created, though.

Any ideas on this one? I vaguey remember having once seen a complaint
somewhere that XBoard does not respect clipboard conventions, but I forgot
where, and did not know enough about Linux to understand what was written.

H.G.




    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

I use that a lot, and it always worked. But I don't paste with Ctrl-V, but by
pressing the middle mouse button.


    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

There seem to be 2 different copy/paste mechanisms.
(1). copy by marking text with the mouse  / paste by middle mouse button.
This even works in xterm,vi etc.

(2). Ctrl-c Ctrl-v. This seems to require special application assistance.
Those don't work in vi.

Xboard seems to handle only (1). e.g. I can mark any text with the mouse and
do pasteGame/Position in xboard.


    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

This might be a gedit rather than an xboard problem, then. I can use Copy
Game on one XBoard, and then Paste Game to load it in another. But I could not
copy the game into gedit. Ctrl-V does not work. I have no middle mouse button
on my laptop, and trying Shift + right mouse button (which does work to bring
up the xboard white piece menu) does pop up a menu in gedit identical to when
I press the right mouse button plain, where ' Paste' is grayed out.

    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

There is a Emulate3Button option for the Xserver. When this is on, pressing
Left&Right at the same time emulates the middle button.

In the X config file (probably /etc/X11/XF86Config-6):
Section "InputDevice"
Option      "Emulate3Buttons" "true"

should be present.

    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

I don't have gedit, but I tried with opera mail.
I can't paste anything into mail that I copied from xboard.
Neither middle button, nor Ctrl-V works.
But I can paste text into mail, that I just mouse-selected in an xterm.
Here the middle button works, but not Ctrl-V.

To transfer a game to mail, this works:
1.Copy game in xboard
2.Open vi, switch to insert mode
3.Press middle button in vi (game appears).
4.Mouse-Select the text in vi.
5.Press middle button in mail (game appears).

Pretty strange, isn't it?



    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

The accepted way to do copy/paste in X has changed over the years.  There is
an excellent explanation at
http://www.freedesktop.org/wiki/Specifications/ClipboardsWiki.  xboard uses
the old historical interpretation 1.

In a bit more detail:

Currently, the "copy" position/game menu items in xboard actually just set
the PRIMARY selection (which is global to the whole X server), and the "paste"
items just paste in the current PRIMARY selection.  They don't use CLIPBOARD
at all.

This works between xboard instances and also works together with apps that
set PRIMARY when you select text (most should do that) and that have a "paste
selection" feature (many have that, usually on middle-click).  But it should
be updated to work with the new guidelines.

We can't follow the new guidelines quite exactly, though:

* We don't have a concept of "selecting with no explicit copy".  So let's
have the "copy" menu items set both PRIMARY and CLIPBOARD.

* I'm a bit torn about the guideline "explicit paste commands should paste
CLIPBOARD, not PRIMARY".  I'm tempted to say that to keep the old behavior
working for people who are used to it, the "paste" items should paste PRIMARY
if it's non-empty and otherwise paste CLIPBOARD.  However, maybe that is a bad
idea for people who are used to how copy/paste with clipboards are supposed to
work, so I'd be OK with pasting only CLIPBOARD and including a mention of the
change in the release message for the next version of xboard.


    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Could you let an option decide on the paste behaviour, so that those who
prefer the current method can keep it?

    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27810 (project xboard):

             Assigned to:                    None => mann                  

    _______________________________________________________

Follow-up Comment #8:

We already have 9 million obscure options, so I suppose we can add another to
give the old paste behavior.  Yuck.

I'll fool with this a bit and see if I can get it working.


    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27810 (project xboard):

                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #9:

That turned out to be pretty easy.  I've committed a fix.

The idea of trying to paste both PRIMARY and CLIPBOARD wasn't workable, but I
added an option to let people who are used to the old-fashioned behavior of
pasting PRIMARY get it back.

Please let me know if there are still copy/paste problems with any apps.  I
didn't really understand the behavior reported with Opera Mail, so there's
some chance Opera Mail is expecting something weird and that xboard still
isn't doing that.


    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27810 (project xboard):

                  Status:                   Fixed => In Progress            
             Open/Closed:                  Closed => Open                  

    _______________________________________________________

Follow-up Comment #10:

Crap, I spoke too soon.  Testing with gedit, it doesn't think that we have
put anything on the clipboard.  Seems like it is using some still newer kind
of clipboard...????  I will have to look into this some more.  In the meantime
my commit might have made things worse.


    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27810 (project xboard):

                  Status:             In Progress => Ready For Test        

    _______________________________________________________

Follow-up Comment #11:

Fixed.  This was a separate bug -- we weren't implementing the part of the X
selection/clipboard protocol that lets another app ask what data format(s) the
selection owner can provide the data in.  Simple apps don't use this but just
ask for string data; more sophisticated ones evidently do use it and don't
enable their Paste menu item if the selection owner doesn't implement it.

I can now copy from xboard and paste into gedit using gedit's Paste menu
item.  I imagine this may fix the issue with Opera Mail too.

I'll leave this in "ready for test" since it's a big enough change now to
need more testing than I gave it.


    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #12, bug #27810 (project xboard):

Both paste methods work now in opera mail. Also "-pasteSelection" works as
expected.
I just had to remove the XA_UTF8_STRING stuff, because that's not provided by
my X-libs, but that's ok - my system must be the oldest still in use :)

Remark to the "obscure options": This is one of the best parts of XBoard.
Since I first read the man page (ca. 1996) I know, XBoard is the perfect
interface for me. Before that read I had my doubts, though.



    _______________________________________________________

Reply to this item at:

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

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



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

[bug #27810] Copy Game / Position do not work in XBoard?

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27810 (project xboard):

                  Status:          Ready For Test => Fixed                  
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #13:

Cool, thanks for testing!

    _______________________________________________________

Reply to this item at:

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

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



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