[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
using PRIMARY and CLIPBOARD w/o using the mouse
From: |
James H. Cloos Jr. |
Subject: |
using PRIMARY and CLIPBOARD w/o using the mouse |
Date: |
12 Sep 2003 05:45:58 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Using a laptop has me a bit spoiled by having the handy track stick
between the GH&B keys, and buttons just below -- and just as easily
thumbed as -- the spacebar.
Reaching for the rodent is a RFPITA.
In X, using the GUI, is there a command that will copy the region
between current and point to PRIMARY, SECONDARY and/or CLIPBOARD?
My searches through info, docstrings and the (lisp) src hasn't
hit on any.
It looks as though I need something like this:
(defun my-x-selection (beg end)
"select between point and current into PRIMARY"
(interactive "r")
(let ((data (list (buffer-substring beg end)))
(type (if (not current-prefix-arg) 'PRIMARY 'CLIPBOARD)))
(if data
(x-own-selection-internal type data)
(x-disown-selection-internal type))))
(The idea is that it should copy to CLIPBOARD if prefix arg, else to PRIMARY.)
Any thoughts on improving that?
-JimC
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- using PRIMARY and CLIPBOARD w/o using the mouse,
James H. Cloos Jr. <=