all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jens.Schmidt27@epost.de (Jens Schmidt)
Subject: Re: emacs doesn't use the X clipboard
Date: 15 Jan 2004 08:26:54 -0800	[thread overview]
Message-ID: <958686cf.0401150826.c97a734@posting.google.com> (raw)
In-Reply-To: m3isjgdom7.fsf@mika.informatik.uni-freiburg.de

LEE Sau Dan <danlee@informatik.uni-freiburg.de> 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))
                       "<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. <Select "Stopped" from xterm>
  prm: <Stopped>
  cut: <Stopped>
2. <Select "xterm" from Solaris Emacs>
  prm: <xterm>
  cut: <xterm>
3. <Select "interactive" from NT Emacs>
  prm: <xterm>
  cut: <interactive>
4. <Select "kill-element" from xterm>
  prm: <xterm>
  cut: <kill-element>
5. <Eval (x-set-selection 'PRIMARY "fromemacs") from Solaris Emacs>
  prm: <fromemacs>
  cut: <kill-element>
6. <Select "Data may be" from xterm>
  prm: <DATA may be>
  cut: <DATA may be>
7. <Select "x-last" from NT Emacs>
  prm: <<nil>>
  cut: <x-last>
8. <Eval (x-set-selection 'PRIMARY "fromemacs2") from Solaris Emacs>
  prm: <fromemacs2>
  cut: <x-last>
9. <Select "newer" from NT Emacs>
  prm: <fromemacs2>
  cut: <newer>
10. <Select "closed" from xterm>
  prm: <fromemacs2>
  cut: <closed>

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.).

  parent reply	other threads:[~2004-01-15 16:26 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-11  0:26 emacs doesn't use the X clipboard Micha Feigin
2004-01-11  5:46 ` Eli Zaretskii
     [not found] ` <mailman.387.1073803639.928.help-gnu-emacs@gnu.org>
2004-01-12 17:59   ` LEE Sau Dan
2004-01-13  0:18     ` Carsten Weinberg
2004-01-13  6:48     ` Eli Zaretskii
     [not found]     ` <mailman.495.1073964322.928.help-gnu-emacs@gnu.org>
2004-01-13  5:00       ` Ian Zimmerman
2004-01-13 12:06         ` LEE Sau Dan
2004-01-13 18:35           ` Carsten Weinberg
2004-01-14  6:37           ` Eli Zaretskii
2004-01-14  7:59             ` Micha Feigin
2004-01-14 13:33               ` Eli Zaretskii
2004-01-14  7:16           ` Micha Feigin
     [not found]           ` <mailman.606.1074062176.928.help-gnu-emacs@gnu.org>
2004-01-14 21:40             ` LEE Sau Dan
2004-01-17 18:41               ` Eli Zaretskii
     [not found]           ` <mailman.665.1074118187.928.help-gnu-emacs@gnu.org>
2004-01-15 12:49             ` Kester Clegg
2004-01-22 21:29               ` Jeff
2004-01-13 11:23       ` Jens Schmidt
2004-01-13 12:22         ` LEE Sau Dan
2004-01-15 12:51           ` Kester Clegg
2004-01-15 21:44             ` LEE Sau Dan
2004-01-18 23:54               ` Ian Zimmerman
2004-01-15 16:26           ` Jens Schmidt [this message]
2004-01-13 14:38         ` Tim McNamara
2004-01-13 22:19           ` LEE Sau Dan
     [not found]     ` <mailman.510.1073976607.928.help-gnu-emacs@gnu.org>
2004-01-13 12:28       ` LEE Sau Dan
2004-01-13 15:50         ` Maurizio Loreti
2004-01-13 18:13           ` Gian Uberto Lauri
2004-01-13 22:14           ` LEE Sau Dan
     [not found]           ` <mailman.545.1074017499.928.help-gnu-emacs@gnu.org>
2004-01-15 12:54             ` Kester Clegg
2004-01-15 21:56               ` LEE Sau Dan
2004-01-13 17:19         ` Eli Zaretskii
     [not found]         ` <mailman.542.1074014317.928.help-gnu-emacs@gnu.org>
2004-01-14 21:34           ` LEE Sau Dan
     [not found] <mailman.381.1073784888.928.help-gnu-emacs@gnu.org>
2004-01-11 13:02 ` Henrik Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=958686cf.0401150826.c97a734@posting.google.com \
    --to=jens.schmidt27@epost.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.