I've had a several occasions in the last week or so when selecting in an xterm doesn't get into the Apple buffer for pasting. It's terribly intermittent and I haven't tried to reproduce it. My usual ploy is to kill X11 and restart - because of course I am in the middle of something. Is there anything useful I can do when this happens to determine the cause?? Regards _____________________________________________ Peter Collinson
On Jan 21, 2009, at 11:00, Peter Collinson wrote:
I've had a several occasions in the last week or so when selecting in an xterm doesn't get into the Apple buffer for pasting. It's terribly intermittent and I haven't tried to reproduce it. My usual ploy is to kill X11 and restart - because of course I am in the middle of something.
Is there anything useful I can do when this happens to determine the cause??
How are you expecting it to get there? Are you pressing cmd-c? Do you have 'enable key equivalents' enabled? The contents are copied over when you leave X11, so the command 'pbpaste' won't show the new contents.
This is generally between and xterm and another Mac app. I have a Logitech MX mouse so at have at least three buttons. I do have Enable Key Equivalents set - never bothered to train my body to use the Meta key:-) Here's what I do: To copy Cx) In X11 - point with left button, hold down button and sweep contents Cm) In Mac App - Same as above but use Cmd-C to copy To paste Px) In X11 - (point where relevant) and middle click mouse Pm) In Mac - create entry point with left mouse button and Cmd-V 99.9% of the time - this just works. What occasionally happens is that I do Cx - and then attempt Pm - but get the old buffer contents. If I redo Cx - and redo the Pm - but the buffer doesn't change. As I said I am generally in the middle of something, so don't stop and poke about to find out what else isn't happening. It's quicker often to kill and restart X11 get the contents I need again and pick them up. I suppose it would be helpful to find out if Px works at this point. On 21 Jan 2009, at 20:14, Jeremy Huddleston wrote:
On Jan 21, 2009, at 11:00, Peter Collinson wrote:
I've had a several occasions in the last week or so when selecting in an xterm doesn't get into the Apple buffer for pasting. It's terribly intermittent and I haven't tried to reproduce it. My usual ploy is to kill X11 and restart - because of course I am in the middle of something.
Is there anything useful I can do when this happens to determine the cause??
How are you expecting it to get there? Are you pressing cmd-c? Do you have 'enable key equivalents' enabled? The contents are copied over when you leave X11, so the command 'pbpaste' won't show the new contents.
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
On Jan 22, 2009, at 05:11, Peter Collinson wrote:
This is generally between and xterm and another Mac app. I have a Logitech MX mouse so at have at least three buttons. I do have Enable Key Equivalents set - never bothered to train my body to use the Meta key:-)
Here's what I do:
To copy Cx) In X11 - point with left button, hold down button and sweep contents
Ok, then do you have the last option in the pasteboard preferences enabled? "Update Pasteboard immediately when text is selected" If not, enable it. Note the text underneath that option. Because of how X11 copy/paste is designed, we can't guarantee that will always work. Thew only way to guarantee it copying is to use cmd-c.
99.9% of the time - this just works. What occasionally happens is that I do Cx - and then attempt Pm - but get the old buffer contents.
Yeah, look in the mailing list logs for discussion as to why this is happening and why there's nothing we can do about it without severely changing how the copy/paste proxying works... hence the note/warning underneath the preference.
If I redo Cx - and redo the Pm - but the buffer doesn't change. As I said I am generally in the middle of something, so don't stop and poke about to find out what else isn't happening. It's quicker often to kill and restart X11 get the contents I need again and pick them up.
Chances are if you selected text in another X11 app, then selected the text in the original app, it would work for you. The problem boils down to us not knowing when the same app selects new text.
I suppose it would be helpful to find out if Px works at this point.
It will.
On 22 Jan 2009, at 18:07, Jeremy Huddleston wrote:
"
If not, enable it. Note the text underneath that option. Because of how X11 copy/paste is designed, we can't guarantee that will always work. Thew only way to guarantee it copying is to use cmd-c.
I have all the Pasteboard options on.
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
On Jan 22, 2009, at 10:36, Peter Collinson wrote:
On 22 Jan 2009, at 18:07, Jeremy Huddleston wrote:
"
If not, enable it. Note the text underneath that option. Because of how X11 copy/paste is designed, we can't guarantee that will always work. Thew only way to guarantee it copying is to use cmd-c.
I have all the Pasteboard options on.
Right, then you are experiencing the issue I discussed and will need to use the workaround I mentioned or just use cmd-c.
OK thanks for the assist. On 22 Jan 2009, at 22:14, Jeremy Huddleston wrote:
On Jan 22, 2009, at 10:36, Peter Collinson wrote:
On 22 Jan 2009, at 18:07, Jeremy Huddleston wrote:
"
If not, enable it. Note the text underneath that option. Because of how X11 copy/paste is designed, we can't guarantee that will always work. Thew only way to guarantee it copying is to use cmd-c.
I have all the Pasteboard options on.
Right, then you are experiencing the issue I discussed and will need to use the workaround I mentioned or just use cmd-c.
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
Here's what I do:
To copy Cx) In X11 - point with left button, hold down button and sweep contents Cm) In Mac App - Same as above but use Cmd-C to copy
To paste Px) In X11 - (point where relevant) and middle click mouse Pm) In Mac - create entry point with left mouse button and Cmd-V
This has happened again to me. I've re-loaded my coding above to help with description. What's happening is: Cuts from X11 using Cx are pasted correctly in the X11 app world - but Pm supplies old contents Cms are pasted correctly into both worlds. Changing the Cx source to a different X11 app (tried xterm, emacs and nedit) makes no difference - pasting in the X11 world has the last paste contents but it still doesn't change the paste contents in the Mac world. Using Cmd-c or the menu option in place of Cx in the X11 app makes no difference. Typing pbpaste in the xterm after a Cx (or a Cmd-C) yields the old contents. Typing echo "new contents" | pbcopy loads the paste board in both worlds. Essentially what seems to be happening is that the copy - presumably through the X11 server - has stopped talking to the Mac world. Regards _____________________________________________ Peter Collinson
Quoted Peter Collinson <pc@hillside.co.uk>:
Here's what I do:
To copy Cx) In X11 - point with left button, hold down button and sweep contents
That will work for X11 to X11 pasting, but you really need to tell XQuartz it's time to copy by going to the Edit->Copy menu item, so that you can paste into a Mac app. Note: there is a way of enabling an automatic copy of text when PRIMARY changes, but it may not work perfectly with all applications. The problem is there is no way of knowing when some toolkits have changed the selection, if they have previously owned it. See the Pasteboard preferences in the X11 preferences.
Cm) In Mac App - Same as above but use Cmd-C to copy
To paste Px) In X11 - (point where relevant) and middle click mouse Pm) In Mac - create entry point with left mouse button and Cmd-V
This has happened again to me. I've re-loaded my coding above to help with description.
What's happening is:
Cuts from X11 using Cx are pasted correctly in the X11 app world - but Pm supplies old contents Cms are pasted correctly into both worlds.
Changing the Cx source to a different X11 app (tried xterm, emacs and nedit) makes no difference - pasting in the X11 world has the last paste contents but it still doesn't change the paste contents in the Mac world.
You really need to use the Edit->Copy menu or the key shortcut after selecting text in an X11 app.
Using Cmd-c or the menu option in place of Cx in the X11 app makes no difference.
Typing pbpaste in the xterm after a Cx (or a Cmd-C) yields the old contents.
Typing echo "new contents" | pbcopy loads the paste board in both worlds.
Essentially what seems to be happening is that the copy - presumably through the X11 server - has stopped talking to the Mac world.
It sounds like the xpbproxy code just hasn't copied the data (text or images) from X11 to the Mac NSPasteboard yet. The X11 copy and paste works differently than the Mac. For instance there is no common way to paste into an X11 app, that's why the Paste menu item doesn't exist in X11. An X11 toolkit can implement the paste support using the middle mouse buton, or key shortcuts, or menu items, but there is no common event or X11 call that will trigger it. The X11 selection data is usually created on demand, so once a requestor has copied the data, it may change or not even exist, and the requestor often has no way of knowing if the data has changed unless it tries to request it again. This is why the Edit->Copy is required in X11 to copy from X11 to a Mac app. Note: we have some automatic CLIPBOARD copying that can occur as a Pasteboard preference. It works similarly to xclipboard by using a greedy model of copying CLIPBOARD, setting xpbproxy as the owner, and doing the same pattern over again, if the CLIPBOARD is lost/owned by another application again. George -- http://people.freedesktop.org/~gstaplin/
participants (3)
-
George Peter Staplin
-
Jeremy Huddleston
-
Peter Collinson