This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
RE: Reproducing the cygwin X problems
Dan Tsafrir wrote:
> I confirm this exact behavior.
>
> This is exactly the problem I'm experiencing in terms of copy-paste on
> my XP machine. Specifically, if the vncviewer (TightVNC) is open, and
> I select a text in a cygwin xterm or emacs, then copy-paste /
> cut-and-paste completely stops functioning on my machine.
This doesn't fix the problem, but in the meantime you might find the
following makes emacs more usable (and quicker too). I use it because
emacs was almost unusable over a slow VPN connection, but it should also
help in this situation too.
It prevents normal selections in emacs from synchronizing with the X
clipboard. Cut/copy/paste within emacs itself works as normal, but much
quicker. If you do need to copy from emacs to another app, just use
S-delete instead of M-w. To paste from another app into emacs, use
S-insert instead of C-y. It's a bit inconvenient, but I soon got used
to
it.
Just add the following code to your .emacs
--- snip ---
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Code to prevent emacs synchronizing the clipboard with X for every
;; cut & paste operation. This is what slows down emacs most on slow
;; connections.
;; Originally obtained from:
;; http://snarfed.org/space/Emacs%20and%20remote%20X%20Windows
;; but changed the keystrokes to avoid messing up use of escape as
meta
(setq interprogram-cut-function nil)
(setq interprogram-paste-function nil)
(global-set-key [S-delete]
(lambda ()
(interactive)
(eval-expression
'(setq interprogram-cut-function
'x-select-text))
(kill-ring-save (region-beginning) (region-end))
(eval-expression
'(setq interprogram-cut-function nil))))
(global-set-key [S-insert]
(lambda ()
(interactive)
(eval-expression
'(setq interprogram-paste-function
'x-cut-buffer-or-selection-value))
(yank)
(eval-expression
'(setq interprogram-paste-function nil))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- snip ---
Phil
--
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/