Discussion:
Copy-Paste problem on 5.6 / 5.5
Erez Amit
2009-05-13 07:36:57 UTC
Permalink
Hi,

I have a copy-paste issue that appears once in a while, usually after the
nedit process has been running for a long time (days).

I'm using NEdit 5.6:
NEdit release of Aug 20, 2004
Built on: Linux, 386, GNU C
Built at: Feb 26 2009, 17:07:45
With Motif: 2.2.3 [@(#)Motif Version 2.2.3]
Running Motif: 2.2 [unknown]
Server: The X.Org Foundation 60900000
Visual: 16-bit TrueColor (ID 0x23, Default)
Locale: en_US
I get this error message on the stderr:
NEdit warning:
XmClipboardLock() failed: clipboard locked.
and:
NEdit warning:
XmClipboardInquireLength() failed: clipboard locked.
Once I close all open NEdit sessions and re-open the problem usually
disappears. BTW - I had the same issue with 5.5 .

Any suggestions on how to solve / work around this?

Thanks,
Erez
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Thomas Orgis
2009-05-13 07:45:06 UTC
Permalink
Am Wed, 13 May 2009 10:36:57 +0300
Post by Erez Amit
Hi,
I have a copy-paste issue that appears once in a while, usually after the
nedit process has been running for a long time (days).
[...]
Once I close all open NEdit sessions and re-open the problem usually
disappears. BTW - I had the same issue with 5.5 .
I can confirm that with 5.6 (patched lesstif cvs). Same description applies.


Alrighty then,

Thomas.

PS: One may have a look at the revived lesstif development... there is a guy
to took care of reverting some troublesome patches from the past.
Paul Gevers
2009-08-20 08:11:41 UTC
Permalink
Post by Erez Amit
I have a copy-paste issue that appears once in a while, usually after the
nedit process has been running for a long time (days).
Would you be running on a KDE system. I have seen this kind of problems
with the lesstif library in combination with klipper (the clipboard
history manager of KDE). For me it helped to turn off actions for nedit
in klipper. Described in [1] and below.

A related question: can anybody tell me if nedit uses the PRIMARY and
CLIPBOARD from X or uses the (as far as I understand it) not recommended
cut buffers [2]? Or does the answer depend on the *tif library that one
uses?

With kind regards,
Paul
[1]
http://sourceforge.net/tracker/index.php?func=detail&aid=1637320&group_id=8596&atid=108596

Just a "might work" work-around for the time being: configure klipper to
ignore actions from nedit and allow the clipboard to be empty:
In klipper -> Configure -> Actions -> Advanced -> Disabled Actions for
Windows of Type WM_CLASS : nedit
In klipper -> Configure -> General -> UNMARK "Prevent empty clipboard"

Or change/add the following in your klipperrc
(~/.kde/share/config/klipperrc)
NoActionsForWM_CLASS=nedit,<lots of other apps...>
PreventEmptyClipboard=false

[2]http://www.jwz.org/doc/x-cut-and-paste.html
Joerg Fischer
2009-08-20 16:20:58 UTC
Permalink
Post by Paul Gevers
A related question: can anybody tell me if nedit uses the PRIMARY and
CLIPBOARD from X
Yes, it does, and also the SECONDARY, cf. help -> basic operations -> selecting text.

--Jörg
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Paul Gevers
2009-08-24 18:00:36 UTC
Permalink
Post by Joerg Fischer
Post by Paul Gevers
A related question: can anybody tell me if nedit uses the PRIMARY and
CLIPBOARD from X
Yes, it does, and also the SECONDARY, cf. help -> basic operations -> selecting text.
Thanks. About the clipboard, I also found this in the Problems/defects
section of the help:
"""
DEFECT
Cut and Paste menu items fail, or possibly crash, for very large
(multi-megabyte) selections.

Work Around
Use selection copy (middle mouse button click) for transferring larger
quantities of data. Cut and Paste save the copied text in server memory,
which is usually limited.
"""

Does this mean that NEdit does NOT use the clipboard (which is very much
like the primary/secondary buffer) in the way it is nowadays meant to be
used? This looks like the (discouraged) cut buffers to me, but I might
be very wrong... Or is this the result of the implementation by the *tif
library? I see that lesstif supports copying by name, I do not no about
motif. It would help me if somebody could explain. Again, I have [1] in
mind.

Paul
[1] http://www.jwz.org/doc/x-cut-and-paste.html
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Joerg Fischer
2009-08-24 19:52:50 UTC
Permalink
Post by Paul Gevers
Thanks. About the clipboard, I also found this in the Problems/defects
"""
DEFECT
Cut and Paste menu items fail, or possibly crash, for very large
(multi-megabyte) selections.
Work Around
Use selection copy (middle mouse button click) for transferring larger
quantities of data. Cut and Paste save the copied text in server memory,
which is usually limited.
"""
Does this mean that NEdit does NOT use the clipboard (which is very much
like the primary/secondary buffer) in the way it is nowadays meant to be
used?
No, this only means this part of the help section is obsolete. Again,
NEdit uses only the X selection mechanism. It's all open source, so
there are no secrets involved ;-)

Cheers,
Jörg
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Paul Gevers
2009-08-24 19:57:55 UTC
Permalink
Post by Joerg Fischer
No, this only means this part of the help section is obsolete. Again,
NEdit uses only the X selection mechanism. It's all open source, so
there are no secrets involved ;-)
Thanks for explaining and the patience. I will now shut up and try to
understand some of the code...

Paul

Loading...