From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jens.Schmidt27@epost.de (Jens Schmidt) Newsgroups: gmane.emacs.help Subject: Re: emacs doesn't use the X clipboard Date: 15 Jan 2004 08:26:54 -0800 Organization: http://groups.google.com Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <958686cf.0401150826.c97a734@posting.google.com> References: <20040111002614.GM6119@luna.mooo.com> <958686cf.0401130323.64afc317@posting.google.com> NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1074190856 28720 80.91.224.253 (15 Jan 2004 18:20:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2004 18:20:56 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 15 19:20:50 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AhC6s-0006pA-00 for ; Thu, 15 Jan 2004 19:20:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AhAOg-0007Ou-5N for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2004 11:31:06 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!cyclone-sf.pbi.net!216.218.192.242!news.he.net!newsfeed1.easynews.com!easynews.com!easynews!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed2.dallas1.level3.net!news.level3.com!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 80 Original-NNTP-Posting-Host: 217.163.5.253 Original-X-Trace: posting.google.com 1074184015 21339 127.0.0.1 (15 Jan 2004 16:26:55 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 15 Jan 2004 16:26:55 +0000 (UTC) Original-Xref: shelby.stanford.edu gnu.emacs.help:120132 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16075 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16075 LEE Sau Dan writes: > If I have found the patterns, I would have come up with workarounds > and also reported the bug. Since I haven't been able to confidently > reproduce the misbehaviour, I refrain from filing a bug report. Here are some more details, probably they are of some help. First, on my side things run in VNC. The VNC server cannot set the PRIMARY selection, it has to use the (deprecated) cut buffers. The only thing it can do to the selection is to clear it (according to some comment in the source code - I am not familiar with X11 programming at all). In contrast to that, xterm and Solaris Emacs both evaluate the cut buffer *and* the PRIMARY selection. So it also might be the VNC server who is the bad guy, at least in my case. For the following tests, the snippet below has been useful: (defun show-selections () (interactive) (insert "prm: <" (or (condition-case c (x-get-selection) (error nil)) "") ">\n" "cut: <" (x-get-cut-buffer) ">\n")) Now I've run the following tests (xterm and Solaris Emacs running inside VNC server, NT Emacs running outside VNC server): 1. prm: cut: 3. prm: cut: 5. prm: cut: 6. prm: <> cut: 8. prm: cut: 9. prm: cut: You may note that - the cut buffer always gets updated. If you're copying and pasting between outside VNC server, xterm and Emacs only, you may replace `x-cut-buffer-or-selection-value' by something that is based on `x-set-selection' only and you'll be happy with that. However, you won't be happy with that approach as soon as you'll use more recent X11 software. - a call to `x-set-selection' on Solaris Emacs (8. and, implictly 2.) followed by the VNC server setting the cut buffer (9. and 3.) makes Solaris Emacs break - it does not notice changes in the primary selection any more (4. and 10.) - the workaround I've sent before simplifies to `x-set-selection' on Solaris Emacs (5.) immediately followed by the xterm setting the cut buffer and the primary selection (6.).