* copy/paste & Emacs on XWindows @ 2003-03-17 23:59 Peter Lee 2003-03-18 21:25 ` Roman A. Lagunov [not found] ` <mailman.3341.1048023843.21513.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 8+ messages in thread From: Peter Lee @ 2003-03-17 23:59 UTC (permalink / raw) Is there something special you have to do to get copy/paste working between emacs and other apps on xwindows ? If I M-w some text in emacs it doesn't appear to store it in the "clipboard" (whatever the xwindows equivalent of that is). I'm sure it's just a setting as I can't imagine not have this functionality. TIA. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: copy/paste & Emacs on XWindows 2003-03-17 23:59 copy/paste & Emacs on XWindows Peter Lee @ 2003-03-18 21:25 ` Roman A. Lagunov 2003-03-19 9:52 ` Ittay Dror [not found] ` <mailman.3367.1048067622.21513.help-gnu-emacs@gnu.org> [not found] ` <mailman.3341.1048023843.21513.help-gnu-emacs@gnu.org> 1 sibling, 2 replies; 8+ messages in thread From: Roman A. Lagunov @ 2003-03-18 21:25 UTC (permalink / raw) >>>>> "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. -- Roman ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: copy/paste & Emacs on XWindows 2003-03-18 21:25 ` Roman A. Lagunov @ 2003-03-19 9:52 ` Ittay Dror [not found] ` <mailman.3367.1048067622.21513.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 8+ messages in thread From: Ittay Dror @ 2003-03-19 9:52 UTC (permalink / raw) 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.3367.1048067622.21513.help-gnu-emacs@gnu.org>]
* Re: copy/paste & Emacs on XWindows [not found] ` <mailman.3367.1048067622.21513.help-gnu-emacs@gnu.org> @ 2003-03-19 18:41 ` Peter Lee 2003-03-20 5:59 ` Ittay Dror [not found] ` <mailman.3403.1048139991.21513.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 8+ messages in thread From: Peter Lee @ 2003-03-19 18:41 UTC (permalink / raw) Ittay Dror <ittay@qlusters.com> writes: > 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. Thanks a bunch! I will try this when I get home. One other thing... what about copying from clipboard to Emacs? Any tricks for that ? Or should that just work as is? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: copy/paste & Emacs on XWindows 2003-03-19 18:41 ` Peter Lee @ 2003-03-20 5:59 ` Ittay Dror [not found] ` <mailman.3403.1048139991.21513.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 8+ messages in thread From: Ittay Dror @ 2003-03-20 5:59 UTC (permalink / raw) On Wed, 2003-03-19 at 20:41, Peter Lee wrote: > Ittay Dror <ittay@qlusters.com> writes: > > > 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. > > Thanks a bunch! I will try this when I get home. One other > thing... what about copying from clipboard to Emacs? Any tricks for > that ? Or should that just work as is? it should work as it. check that the variable x-select-enable-clipboard is set to t. however, i think that the middle mouse button will try to paste from there and not the primary selection, as it normally does. anyway, below are other hacks i use. (defadvice mouse-yank-at-click (around yank-from-primary last act) "i want the middle mouse button to always paste the primary selection" (let ((x-select-enable-clipboard nil)) ad-do-it)) (defadvice mouse-set-region (around kill-to-primary last act) "i want the mouse drags to copy only to primary selection" (let ((x-select-enable-clipboard nil)) ad-do-it)) (defadvice mouse-drag-region (around kill-to-primary last act) "i want the mouse drags to copy only to primary selection" (let ((x-select-enable-clipboard nil)) ad-do-it)) and while i'm at it, these are my hacks for using the cut buffers instead of the kill ring (if you use kde, then the cut buffers is the history you see in klipper). (defadvice current-kill (around use-cut-buffer first act) "use the cut buffer instead of the kill ring" (let ((text (if (> n 0) (x-get-cut-buffer n) ad-do-it))) (setq ad-return-value text))) (defadvice yank (before fix-arg last act) "when invoked with prefix argument, yank passes current-kill the value of arg-1. so if i do <esc> 1 <shift>-<insert>, i get the same as just <shift>-<insert>" (if (not (or (listp arg) (eq arg '-))) (setq arg (1+ arg)))) -- =================================== Ittay Dror (ittay@qlusters.com) User Space Team, R&D Qlusters Inc. +972-3-6081976 Fax: +972-3-6081841 ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.3403.1048139991.21513.help-gnu-emacs@gnu.org>]
* Re: copy/paste & Emacs on XWindows [not found] ` <mailman.3403.1048139991.21513.help-gnu-emacs@gnu.org> @ 2003-03-20 16:17 ` Peter Lee 2003-04-18 4:24 ` David Combs 1 sibling, 0 replies; 8+ messages in thread From: Peter Lee @ 2003-03-20 16:17 UTC (permalink / raw) Ittay Dror <ittay@qlusters.com> writes: > it should work as it. check that the variable x-select-enable-clipboard > is set to t. however, i think that the middle mouse button will try to > paste from there and not the primary selection, as it normally does. > anyway, below are other hacks i use. Thanks again... these are very helpful. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: copy/paste & Emacs on XWindows [not found] ` <mailman.3403.1048139991.21513.help-gnu-emacs@gnu.org> 2003-03-20 16:17 ` Peter Lee @ 2003-04-18 4:24 ` David Combs 1 sibling, 0 replies; 8+ messages in thread From: David Combs @ 2003-04-18 4:24 UTC (permalink / raw) On CDE, I have no problem. Now, I don't use the mouse's buttons (just because I don't like mice); I use the KEYS for copy and paste. When do I need this copy/paste stuff? Wnen logged into my shell-account, and want to either copy stuff from an emacs-region into eg a remote "cat >> t.foo" or appending in vi, or via mouse-blackening of dtterm showing my shell-acct, pasting (via the paste key) into an emacs buffer (at point). Usually C-Y works, but if it doesn't, I simply hit paste. The pasted stuff ends up being a region in emacs. And, I need no special hacks; works just fine with emacs as-is. Again, I've never tried the middle or right keys on the mouse; maybe that's related. David ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.3341.1048023843.21513.help-gnu-emacs@gnu.org>]
* Re: copy/paste & Emacs on XWindows [not found] ` <mailman.3341.1048023843.21513.help-gnu-emacs@gnu.org> @ 2003-03-19 9:41 ` Tim X 0 siblings, 0 replies; 8+ messages in thread From: Tim X @ 2003-03-19 9:41 UTC (permalink / raw) >>>>> "Roman" == Roman A Lagunov <BigPenguin@yandex.ru> writes: >>>>> "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). Roman> You can try to do it with mouse - just drag around block of Roman> text you want to yank. Roman> Then, in xterm for exapmle, just click middle button. Roman> That's a trick. It's works perfectly for me. I mark the region with C-space at the beginning, move point to the end and then M-w, move to another window with some other X app, hit the middle button on my mouse and there it is. So, it should work. Maybe something is funny with your config? Tim -- Tim Cross The e-mail address on this message is FALSE (obviously!). My real e-mail is to a company in Australia called rapttech and my login is tcross - if you really need to send mail, you should be able to work it out! ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-04-18 4:24 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-03-17 23:59 copy/paste & Emacs on XWindows Peter Lee 2003-03-18 21:25 ` Roman A. Lagunov 2003-03-19 9:52 ` Ittay Dror [not found] ` <mailman.3367.1048067622.21513.help-gnu-emacs@gnu.org> 2003-03-19 18:41 ` Peter Lee 2003-03-20 5:59 ` Ittay Dror [not found] ` <mailman.3403.1048139991.21513.help-gnu-emacs@gnu.org> 2003-03-20 16:17 ` Peter Lee 2003-04-18 4:24 ` David Combs [not found] ` <mailman.3341.1048023843.21513.help-gnu-emacs@gnu.org> 2003-03-19 9:41 ` Tim X
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).