help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copy/paste & Emacs on XWindows


From: Ittay Dror
Subject: Re: copy/paste & Emacs on XWindows
Date: 19 Mar 2003 11:52:54 +0200

On Tue, 2003-03-18 at 23:25, Roman A. Lagunov wrote:
> >>>>> "PL" ==> Peter Lee  writes:
> 
>  PL> Is there something special you have to do to get copy/paste
>  PL> working between emacs and other apps on xwindows ?
> 
>  PL> If I M-w some text in emacs it doesn't appear to store it in the
>  PL> "clipboard" (whatever the xwindows equivalent of that is).
> 
>  You can try to do it with mouse - just drag around block of text you
>  want to yank.
> 
>  Then, in xterm for exapmle, just click middle button.
>  
>  That's a trick. It's works perfectly for me.
i have this hack:
(defun if-copy-mark-to-primary-selection ()
  (if mark-active
          (x-set-selection 'PRIMARY (buffer-substring (region-beginning)
(region-end)))))

(add-hook 'post-command-hook 'if-copy-mark-to-primary-selection)

what it does is copy the region to the primary selection, (which is not
the clipboard), use the middle mouse button to paste it in another
window. if you wish to copy to the clipboard, change PRIMARY to
CLIPBOARD.

hope it helps,
ittay
-- 
===================================
Ittay Dror (ittay@qlusters.com)
User Space Team, R&D
Qlusters Inc.
+972-3-6081976 Fax: +972-3-6081841





reply via email to

[Prev in Thread] Current Thread [Next in Thread]